I have recently started learning SystemC and I have got an error with sensitivity list in "SC_METHOD". I am trying to implement a fifo and the error corresponds to following part of the code:
SC_MODULE(fifo){
...
int rd_addr, wr_addr;
...
void buffer_full();
...
SC_CTOR(fifo){
SC_METHOD(buffer_full);
sensitive << rd_addr << wr_addr;
}
};
I get error when compiling the code and it complains about sensitivity list. The error is
fifo_simple.h:32:22: error: invalid user-defined conversion from 'int' to 'const sc_core::sc_event&' [-fpermissive]
I would appreciate if someone could let me know what is wrong with the sensitivity list. how should I make "buffer_full" process sensitive to the changes in rd_addr and wr_addr.
I also tried following syntax to see if it works with single bit sensitivity but still no success
sensitive << rd_addr[0]
Many thanks