Jump to content

mariolopesferreira

Members
  • Content Count

    1
  • Joined

  • Last visited

Posts posted by mariolopesferreira


  1. 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

×