I am very disappointed that I get different results from the same initializing code in SC_CTOR from 6.6 and 10.0 versions of ModelsimSE. In ModelsimSE6.6 I can initialize the sc_signal vector (array) as it has to be but in ModelsimSE10.0c all the chProcPos elements are "posLeft" which is zero, since the compiler starts with zero to my "position" enumaration type. I believe this is a bug in ModelsimSE10.0c.
PS: I also tried initializing with .write() member function.
I have a code like this:
typedef enum position_tag {posLeft, posRight, posUp, posDown, posLeftUp, posRightUp, posLeftDown, posRightDown, posInner} position;
/*****/ sc_signal chProcPos[NODES_IN_ROW][NODES_IN_COL];
SC_CTOR(..) { /*...*/ for (int i = 0; i < NODES_IN_ROW; i++) for (int k = 0; k < NODES_IN_COL; k++) { if (i == 0) if (k == 0) chProcPos[i][k] = posLeftUp; else if (k == NODES_IN_COL - 1) chProcPos[i][k] = posRightUp; else chProcPos[i][k] = posUp; else if (i == NODES_IN_ROW - 1) if (k == 0) chProcPos[i][k] = posLeftDown; else if (k == NODES_IN_COL - 1) chProcPos[i][k] = posRightDown; else chProcPos[i][k] = posDown; else if (k == 0) chProcPos[i][k] = posLeft; else if (k == NODES_IN_COL - 1) chProcPos[i][k] = posRight; else chProcPos[i][k] = posInner; } /*...*/ }
--------------------------------------- Posted through