Jump to content

Search the Community

Showing results for tags 'std::vector as template argument'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Accellera Systems Initiative
    • Information
    • Announcements
    • In the News
  • SystemC
    • SystemC Language
    • SystemC AMS (Analog/Mixed-Signal)
    • SystemC TLM (Transaction-level Modeling)
    • SystemC Verification (UVM-SystemC, SCV)
    • SystemC CCI (Configuration, Control & Inspection)
    • SystemC Datatypes
  • UVM (Universal Verification Methodology)
    • UVM 2017 - Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • UVM Simulator Specific Issues
    • UVM Commercial Announcements
    • UVM (Pre-IEEE) Methodology and BCL Forum
    • UVM 1.2 Public Review
  • Portable Stimulus
    • Portable Stimulus Pre-Release Discussion
    • Portable Stimulus 1.0
  • IP-XACT
    • IP-XACT Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • OCP (Open Core Protocol)
  • UCIS (Unified Coverage Interoperability Standard)
  • Commercial Announcements
    • Announcements

Categories

  • SystemC
  • UVM
  • UCIS
  • IEEE 1735/IP Encryption

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Biography


Location


Interests


Occupation


Company

Found 1 result

  1. i wrote very simple template module (select_unit.h) with vector as one of its 3rd argument. i encounter difficulty instantiating it in the upper "floor" (up_mod.h). the marked red code should be the definition of std::vector of unsigned integers (template's 3rd parameter in select_unit module). the compiler complains for const 3rd argument..., how should i define the vector? any help would be appreciated. V. select_unit.h template <unsigned w_bus,unsigned w_sel, std::vector<unsigned> &sel_bits> SC_MODULE(select_unit) { /* -----------Input Ports--------------------------------------------------------- */ sc_in <sc_uint<w_bus>> in ; /* -----------Output Ports-------------------------------------------------------- */ sc_out <sc_uint<w_sel>> out ; /* -----------Input/Output Ports-------------------------------------------------- */ /* -----------Local Signal Declarations------------------------------------------- */ /* -----------Internal modules / variables---------------------------------------- */ /* -----------Methods------------------------------------------------------------- */ void thread0(void) ; /* -----------Constructor--------------------------------------------------------- */ SC_CTOR(select_unit) : in("in"), out("out") { ... } } ; template <unsigned w_bus,unsigned w_sel,std::vector<unsigned> &sel_bits> void select_unit<w_bus, w_sel, sel_bits>::thread0(void) { ... } up_mod.h SC_MODULE(up_mod) { /* -----------Input Ports--------------------------------------------------------- */ /* -----------Output Ports-------------------------------------------------------- */ /* -----------Input/Output Ports-------------------------------------------------- */ /* -----------Local Signal Declarations------------------------------------------- */ /* -----------Internal modules/variables------------------------------------------ */ ... std::vector<unsigned> bits2mnt; select_unit<U0_WIDTH, 18, bits2mnt> *select0 ; /* -----------Constructor----------------------------------------------- ---------- */ SC_CTOR(up_mod) { ... /* -----------Initialize Sub Modules------------------------------------------ */ select0 = new select_unit<U0_WIDTH, 18, bits2mnt> ; } }
×