Hi,
I am getting the same sequence of random numbers every time I run my SystemC code ... there is too much code to post here, so I will attempt to describe what I am doing ...
I have written a DUT (SC_MODULE) with 9 input ports and I have written a Driver (SC_MODULE) to drive one of those ports, I have instantiated 9 Drivers and 1 DUT in sc_main ... the Driver uses rand() ...
Each Driver produces the exact same sequence of random numbers ...
I didn't some looking on the C++ forums and tried the following ...
1. Adding srand(time(NULL)) to the Driver ... but it won't compile
2. Adding srand(time(NULL)) to just sc_main ... compiled ok but made no difference
3. Adding srand(time(NULL)) to the constructor, I added it to the Driver SC_CTOR ... compiled ok but again made no difference
Those were the only possible solutions I found on the C++ forums ... I didn't see anything related on here ...
As always any and all help would be greatly appreciated :-)