SDOCM00103935:Update to work with different cluster base id
authorJudah Vang <judah@ti.com>
Fri, 20 Sep 2013 19:24:17 +0000 (12:24 -0700)
committerChris Ring <cring@ti.com>
Thu, 26 Sep 2013 00:41:40 +0000 (17:41 -0700)
packages/ti/sdo/ipc/family/f28m35x/NotifyDriverCirc.xs
packages/ti/sdo/ipc/family/f28m35x/TransportCirc.xdc
packages/ti/sdo/ipc/family/f28m35x/TransportCirc.xs

index 61cf07d2a21374b44aaa27be5a8b135c5e69298b..7d2b41005e0e97d3861f5d598346f0b0f45126fa 100644 (file)
@@ -103,12 +103,14 @@ function sharedMemReqMeta(params)
 function viewInitBasic(view, obj)
 {
     var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
+    var MultiProcCfg = Program.getModuleConfig('ti.sdo.utils.MultiProc');
     var modCfg =
         Program.getModuleConfig('ti.sdo.ipc.family.f28m35x.NotifyDriverCirc');
 
     /* view.remoteProcName */
     try {
-        view.remoteProcName = MultiProc.getName$view(obj.remoteProcId);
+        view.remoteProcName = MultiProc.getName$view(obj.remoteProcId -
+                                  MultiProcCfg.baseIdOfCluster);
     }
     catch(e) {
         Program.displayError(view, 'remoteProcName',
@@ -166,6 +168,9 @@ function getEventData(view, obj, bufferPtr, putIndex, getIndex)
         view.elements.$add(elem);
 
         i++;
+        if ((i % modCfg.numMsgs) == 0) {
+            i = 0;
+        }
     }
 }
 
index 2e781bf2524e741056f59505132d74cb2ea9f99d..5285a12c11e7fa1b28d773c5e7ec1b269169b6f9 100644 (file)
@@ -52,10 +52,10 @@ import xdc.rov.ViewInfo;
  *  NOTE: Processor '0' corresponds to the M3 and '1' corresponds to the C28
  *
  * sharedAddr -> --------------------------- bytes
- *               |  entry0  (0) [Put]      | 4
- *               |  entry1  (0)            | 4
+ *               |  entry0  (0) [Put]      | msgSize
+ *               |  entry1  (0)            | msgSize
  *               |  ...                    |
- *               |  entryN  (0)            | 4
+ *               |  entryN  (0)            | msgSize
  *               |                         |
  *               |-------------------------|
  *               |  putWriteIndex (0)      | 4
@@ -64,10 +64,10 @@ import xdc.rov.ViewInfo;
  *               |  getReadIndex (1)       | 4
  *               |                         |
  *               |-------------------------|
- *               |  entry0  (1) [Get]      | 4
- *               |  entry1  (1)            | 4
+ *               |  entry0  (1) [Get]      | msgSize
+ *               |  entry1  (1)            | msgSize
  *               |  ...                    |
- *               |  entryN  (1)            | 4
+ *               |  entryN  (1)            | msgSize
  *               |                         |
  *               |-------------------------|
  *               |  putWriteIndex (1)      | 4
@@ -99,7 +99,6 @@ module TransportCirc inherits ti.sdo.ipc.interfaces.IMessageQTransport
     metaonly struct EventDataView {
         UInt        index;
         String      buffer;
-        Ptr         addr;
         Ptr         message;
     }
 
index 462e29310e93b9bf6a2bfcb828fa9132ef5a30f6..46a86e65daafca001023d5755fce57f86d327bcd 100644 (file)
@@ -125,10 +125,12 @@ function sharedMemReqMeta(params)
 function viewInitBasic(view, obj)
 {
     var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
+    var MultiProcCfg = Program.getModuleConfig('ti.sdo.utils.MultiProc');
 
     /* view.remoteProcName */
     try {
-        view.remoteProcName = MultiProc.getName$view(obj.remoteProcId);
+        view.remoteProcName = MultiProc.getName$view(obj.remoteProcId -
+                                  MultiProcCfg.baseIdOfCluster);
     }
     catch(e) {
         Program.displayError(view, 'remoteProcName',
@@ -156,7 +158,7 @@ function getEventData(view, obj, bufferPtr, putIndex, getIndex)
     }
 
     try {
-        var putBuffer = Program.fetchArray(TransportCirc.msgSize$fetchDesc,
+        var putBuffer = Program.fetchArray(ScalarStructs.S_Bits32$fetchDesc,
                                            bufferPtr,
                                            modCfg.numMsgs);
     }
@@ -174,13 +176,15 @@ function getEventData(view, obj, bufferPtr, putIndex, getIndex)
 
         elem.index = i;
         elem.buffer = bufferName;
-        elem.addr = utils.toHex(putBuffer[i].$addr);
-        elem.message = utils.toHex(putBuffer[i].elem);
+        elem.message = utils.toHex(Number(bufferPtr) + (i * modCfg.msgSize));
 
         /* Create a new row in the instance data view */
         view.elements.$add(elem);
 
         i++;
+        if ((i % modCfg.numMsgs) == 0) {
+            i = 0;
+        }
     }
 }