fayz Posted September 20, 2023 Report Share Posted September 20, 2023 Following is the link to source code. https://edaplayground.com/x/hqtB following lines in design.cpp cout << "fetched data :" << writedata << "at:" << sc_time_stamp() << endl; //getting value 0 but writedata is updated at 0s,but in gtkwave getting desired output. Quote Link to comment Share on other sites More sharing options...
Eyck Posted September 20, 2023 Report Share Posted September 20, 2023 You are using a signal (via a port) and expect an immediate update of the value. This is true for plain C++ data types but not for signals. Signals provide the value (via read() ) being written in the next delta cycle. Please consult the SystemC LRM or some books about SystemC... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.