Thread: error: 'struct SPPS48' has no member named 'M1'

  1. #1
    Registered User
    Join Date
    Dec 2017
    Posts
    10

    error: 'struct SPPS48' has no member named 'M1'

    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

  2. #2
    Guest
    Guest
    I think you'd have a better chance getting answers in a forum specific to the software/hardware you're using there. This seems like some macro system, not vanilla C++.

    I assume lines 38-40 define member pointers of the SPPS48 struct?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 'struct class’ has no member named ‘teach’
    By justine in forum C Programming
    Replies: 5
    Last Post: 12-07-2012, 08:51 AM
  2. Error: no member named 'whatever'
    By vileoxidation in forum C++ Programming
    Replies: 31
    Last Post: 10-09-2009, 08:12 PM
  3. Replies: 2
    Last Post: 04-22-2008, 12:07 PM
  4. Replies: 2
    Last Post: 04-19-2008, 12:06 AM
  5. Replies: 1
    Last Post: 04-17-2008, 07:45 PM

Tags for this Thread