KMLM List
View email archives for the history of this mailing list.
|
|
|
|
systemc-forum - Re: [systemc-forum] Cannot set time resolution at end of elaboration
|
Message Thread:
Previous |
Next
|
- To: systemc-forum@xxxxxxxxxxxxxxxxxxx, Michael <michael6866@xxxxxxxxx>
- From: amal banerjee <dakupoto@xxxxxxxxx>
- Date: Sat, 24 Mar 2012 23:18:27 -0400
- Send Email to systemc-forum@lists.accellera.org:
- Send new message
- Reply to this message
|
Hello, Which version of SystemC are you using ? I have faced the same problem with SystemC-2.2.0, the current stable version. I could not resolve it despite advice from the forum gurus and ended up
just removing it and using only sc_core::sc_clock. Let us see what the others say. On Sat, Mar 24, 2012 at 8:32 PM, Michael <michael6866@xxxxxxxxx> wrote:
Hi guys,
On page 15 of IEEE 1666-2011 it states that “The simulation time resolution can be set during elaboration”. But when I tried to use sc_set_time_resolution() in end_of_elaboration() callback it reports an error “sc_time object<s> constructed”. If I do that in end_of_construction() instead then it’s fine. But clearly on page 12 it says end_of_elaboration() is a part of elaboration phase. Am I missing anything?
SC_MODULE(Top) {
void end_of_elaboration() {
sc_set_time_resolution(100,SC_PS); // error }
void end_of_construction()
{ //sc_set_time_resolution(100,SC_PS); // fine
}
SC_CTOR(Top) {} };
int sc_main (int argc, char* argv[])
{ Top top(“top”); sc_start(); return 0;
} Regards, Michael
|
|