Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SystemC Simple Question

Status
Not open for further replies.

pmat

Member level 5
Joined
Mar 26, 2007
Messages
91
Helped
15
Reputation
28
Reaction score
9
Trophy points
1,288
Location
Grenoble, France, EU
Activity points
1,790
I want to update the value of a signal which is struct. I create a struct variable v2
and i update its fields. Afterwards i call the write() function on the v1_sig with v2 as an
argument. Then i call wait() (the code is in a SC_THREAD being sensitive to a clock)
to let the signal being updated and finally print both values. However, v1_sig is still
not updated... What am i missing here???

sc_signal<myStruct> v1_sig;

myStruct v2;

v2.field1 = ...;
v2.field2 = ...;
etc.

v1_sig.write(v2);

wait();

cout<<v1_sig;
cout<<v2;
 

can you check whether wait task is in effect and v2 value is transferred to v1 signal!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top