Jump to content
Sign in to follow this  
mariolopesferreira

sc_vector constrauctors (Error: Access violation - no RTTI data)

Recommended Posts

Hi,

I'm trying to work with arrays of ports and signal using sc_vector. The code comiles fine, but I'm having problems when I try to run it. The code is:

SC_MODULE(top0)

{

m_clkgen m_clkgen;

m_arbiter m_arbiter;

m_masters m_masters;

m_masters1 m_masters1;

sc_signal<sc_logic> m_clk;

sc_vector< sc_signal<sc_logic> > m_request;

sc_vector< sc_signal<sc_logic> > m_grant;

SC_CTOR(top0): m_request("m_request"), m_grant("m_grant"), m_clkgen("m_clkgen"), m_arbiter("m_arbiter"), m_masters("m_masters"), m_masters1("m_masters1")

{

m_request.init(2);

m_grant.init(2);

m_clkgen.Clk(m_clk);

m_arbiter.Clk(m_clk);

m_arbiter.Request(m_request);

m_arbiter.Grant(m_grant);

m_masters.Clk(m_clk);

m_masters.Grant(m_grant[0]);

m_masters.Request(m_request[0]);

m_masters1.Clk(m_clk);

m_masters1.Grant(m_grant[1]);

m_masters1.Request(m_request[1]);

}

};

If I run it, the following error occurs:

"Error: (E549) uncaught exception: Access violation - no RTTI data!"

Doing a step-by-step debugging, it seems that the problem arises from the SC_CTOR line (particularly with " m_request("m_request"), m_grant("m_grant")" ).

Does anyone have any idea about what am I doing wrong?

Thanks in advance!

Best regards,

Mário Lopes Ferreira

Share this post


Link to post
Share on other sites

Hello Sir,

Since there is a complicated data structure -

vector of signals of logic type, it would be

helpful to the compiler to resolve scope e.g.,

sc_dt::sc_logic, etc., Also what is the compiler

-- gcc or MS -- a lot of features have to be

manually set for MS, as another member

has noted.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×