Skip Nav
Home » Forums » SystemC Forum

Icon - KMLM List KMLM List

View email archives for the history of this mailing list.

List Home All Archives Dates Threads Authors Subjects
systemc-forum - RE: [systemc-forum] Cannot set time resolution at end of elaboration Message Thread: Previous | Next
  • To: "'amal banerjee'" <dakupoto@xxxxxxxxx>, <systemc-forum@xxxxxxxxxxxxxxxxxxx>
  • From: "Michael" <michael6866@xxxxxxxxx>
  • Date: Sat, 24 Mar 2012 23:23:18 -0400
Send Email to systemc-forum@lists.accellera.org:
Send new message
Reply to this message

Hi Amal,

 

I’m also using 2.2. So it looks like at least I’m not committing mistake in my code..

 

Regards,

Michael

 

From: amal banerjee [mailto:dakupoto@xxxxxxxxx]
Sent: Saturday, March 24, 2012 11:18 PM
To: systemc-forum@xxxxxxxxxxxxxxxxxxx; Michael
Subject: Re: [systemc-forum] Cannot set time resolution at end of elaboration

 

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

 


By Date: Previous | Next Current Thread By Thread: Previous | Next