Rashmi11 Posted April 3, 2015 Report Share Posted April 3, 2015 Hi All ,I am new to SytemC and I am designing a FIFO . When I run the make file I am getting an error " no match for ‘operator=’ in ‘((sync_fifo*)this)->sync_fifo::wptr = 0’ " . I guess this has do with the sensitivity list of wptr and rptr but I am not sure how to fix it.I have highlighted the lines where I am getting error . It will be really helpful if someone could explain this . Thank you #include <systemc.h> SC_MODULE (sync_fifo){ sc_in_clk clk; sc_in<bool> rst; sc_in<bool> rd_wr; sc_out<bool> full; sc_out<bool> empty; sc_in < sc_uint<8> > data_in; sc_in < sc_uint<4> > wptr; sc_in < sc_uint <4> > rptr; sc_out < sc_uint<8> > data_out; sc_uint<8> ram_data[256]; void read_write() { if(rst == 1) { wptr=0;rptr=0;data_out=0; } else if(rd_wr == 1 && !full) { ram_data[wptr.read()]=data_in; wptr=wptr+1; } else if(rd_wr == 0 && !full) { data_out=ram_data[rptr.read()]; rptr=rptr+1; } } void emp_ful(){ if(rst == 1) { full=0; empty=0; } else { if(wptr == rptr ) { empty=1; } else if((wptr - rptr) == 15) { full=1; } else { full=empty=0; } } } SC_CTOR(sync_fifo) { SC_METHOD(read_write); sensitive << clk.pos() << rst ; sensitive << wptr ; sensitive << rptr; SC_METHOD(emp_ful); sensitive << clk.pos() << rst ; sensitive << wptr ; sensitive << rptr ; } }; Quote Link to comment Share on other sites More sharing options...
kartikkg Posted April 3, 2015 Report Share Posted April 3, 2015 Hi Rashmi11, sc_in < sc_uint<4> > wptr; This is a declaration for an sc_in port. sc_in port =operator is private hence not accessible. Since its an in port you can only read values from it and not write to it. Regards Kartik Quote Link to comment Share on other sites More sharing options...
Rashmi11 Posted April 4, 2015 Author Report Share Posted April 4, 2015 Thank you Kartik. 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.