Jump to content

Search the Community

Showing results for tags 'array of pointers'.



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. Hi there, I have created a SC_MODULE that has a member consisting on an array of pointers to another SC_MODULE: SC_MODULE(CLAYER_MEM) { FRAME *pframe[10]; SC_CTOR(CLAYER_MEM); } }; In the SC_CTOR declaration I have tried two different syntax for dynamic allocation, both compiling successfully: 1) Allocation with loop for(uint i=0;i++;i<9) { pframe = new FRAME("frame_"); } (Note: I do not care too much at this point about the name assigned to each instance, as long as it is predictable) 2) Allocation without loop pframe[0] = new FRAME("frame_0"); pframe[1] = new FRAME("frame_1"); pframe[2] = new FRAME("frame_2"); pframe[3] = new FRAME("frame_3"); pframe[4] = new FRAME("frame_4"); pframe[5] = new FRAME("frame_5"); pframe[6] = new FRAME("frame_6"); pframe[7] = new FRAME("frame_7"); pframe[8] = new FRAME("frame_8"); pframe[9] = new FRAME("frame_9"); Obviously I prefer the first one because it is more compact, but I have notice that in RUTIME: 1) with loop, I do not see on screen the result of FRAME constructor calls 2) without loop, I clearly see on screen that FRAME constructor is called for every instance Therefore I assume that the loop construction is wrong, but could you please explain to me why? Thankyou in advance.
×