while running my following code i m getting the error
error: 'struct SPPS48' has no member named 'M1'
Code:
#include "systemc.h"
SC_MODULE(SPPS48)
{
sc_in<sc_bv<48> > Pin;
sc_in<sc_uint<1> > Sin;
sc_in<bool > Enable;
sc_in<bool> Reset;
sc_in<bool> clk;
sc_out<sc_bv<48> > Pout;
sc_out<sc_uint<1> > Sout;
sc_signal<sc_uint<1> > w1;
sc_signal<sc_uint<1> > w2;
sc_core::sc_signal< sc_dt::sc_bv<16> > D1;
sc_core::sc_signal< sc_dt::sc_bv<16> > D2;
sc_core::sc_signal< sc_dt::sc_bv<16> > D3;
sc_core::sc_signal< sc_dt::sc_bv<16> > P1;
sc_core::sc_signal< sc_dt::sc_bv<16> > P2;
sc_core::sc_signal< sc_dt::sc_bv<16> > P3;
sc_uint<48> Preg;
SPPS *M1;
SPPS *M2;
SPPS *M3;
void assign_data()
{
D1=Pin.read().range(15,0);
D2=Pin.read().range(31,16);
D3=Pin.read().range(47,32);
Preg=(P3,P2,P1);
Pout.write(Preg);
cout<<"Data_out1"<<D1<<endl;
cout<<"Data_out2"<<D2<<endl;
cout<<"Data_out3"<<D3<<endl;
}
SC_CTOR(SPPS48)
{
this-> M1=new SPPS("conv1");
M1->D(D1);
M1->Enable(Enable);
M1->Reset(Reset);
M1->clk(clk);
M1->Lout(w1);
M1->Min(Sin);
M1->P(P1);
M2=new SPPS ("conv2");
M2->D(D2);
M2->Enable(Enable);
M2->Reset(Reset);
M2->clk(clk);
M2->Lout(w2);
M2->Min(w1);
M2->P(P2);
M3=new SPPS ("conv3");
M3->D(D3);
M3->Enable(Enable);
M3->Reset(Reset);
M3->clk(clk);
M3->Lout(Sout);
M3->Min(w2);
M3->P(P3);
SC_METHOD(assign_data);
sensitive<<Pin<<Sin;
}
};
I will be obliged for advice