English 中文(简体)
Specifying signal delays in SystemC as clause AFTER in VHDL
原标题:
  • 时间:2011-04-06 13:02:33
  •  标签:
  • vhdl
  • systemc

I have a problem in SystemC trying to write a signal after some time passes...

Consider the following:

process (clk)
   begin
      -- Updating my signal, out signal, in order to get result, but after a certain delay.
      signal1 <=  0  after 2 ns;

OK! I can do the same in SystemC:

SC_CTOR(MyModule) {
   SC_METHOD(mymethod);
   sensitive << ....
}
void mymethod() {
   mysig =  0 ; // HOW TO SAY AFTER 2 NS?????????
}

How can I specify a delay for signal assignment in SystemC????

问题回答

I think you can wait(2, SC_NS); in SC_THREADs, but not in a SC_METHODs. (AFAIK, you re not allowed to wait in SC_METHODs.)

I m forgetting SC syntax already, but it should be similar to GBL, the write function should take an optional delay parameter, like mysig.write(0, 2*SC_NS); In GBL it s either mysig.Write(0, 2*ns); or alternative syntax: mysig(2*ns) = 0;





相关问题
Understanding types in SystemC

I am a beginner in SystemC programming and there is one thing I noticed (looking in the SystemC official documentation): all types that I used to deal with in VHDL simulations have not been "ported" ...

selective access to bits on datatypes with C++

I m using C++ for hardware-based model design with SystemC. SystemC as a C++ extension introduces specific datatypes useful for signal and byte descriptions. How can I access the first bits of a ...

SystemC Seg Fault on sc_core::sc_in<bool>::read()

I am having a repeating seg fault while using SystemC. During initialization I set a value to 0. During operation of a testbench I am setting this value to 1 in a module (proc). This is a sc_signal ...

Does system C support tri-state logic?

Does System C support tri-state logic? That is, bits that can get 0, 1 or X, where X means "unknown"? If it does, does it also support vectors that can contain Xes, including logic and arithmetic ...

Installing systemc SCV library on x86-64 machine

When I tried to install the SCV library, I came accross with the following problem: "checking build system type... Invalid configuration x86_64-unknown-linux-gnu : machine x86_64-unknown not ...

VHDL/Verilog related programming forums? [closed]

Hardware design with VHDL or Verilog is more like programming nowadays. However, I see SO members are not so actively talking about VHDL/Verilog programming. Is there any forum dealing with hardware ...

热门标签