Jump to content

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


Recommended Posts

Posted

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

Posted

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...