Skip Nav
Home » Forums » SystemC Forum

Icon - KMLM List KMLM List

View email archives for the history of this mailing list.

List Home All Archives Dates Threads Authors Subjects
systemc-forum - Re: [systemc-forum] Question Message Thread: Previous | Next
  • To: Michael <michael6866@xxxxxxxxx>
  • From: Bernard Deadman <bdeadman@xxxxxxxxxx>
  • Date: Sat, 03 Mar 2012 13:29:12 -0600
  • Cc: yehuda.singer@xxxxxxxxx, systemc-forum@xxxxxxxxxxxxxxxxxxx
Send Email to
Send new message
Reply to this message

I tend to create an array of pointers then construct each unit individually because that allows me to initialize the name of the module which makes diagnostics esier:

my_module *array;
char temp_name[100];

array = new my_module *[N];

for(unsigned i=0;i<N;i++) {
    sprintf(temp_name, "base_name_%d", i);
    array[i] = new my_module(temp_name);



On 3/3/2012 11:29 AM, Michael wrote:


Could you provide more details? Otherwise I can only assume you want to do something like:

U = new unit[N];



*From:*systemc-forum@xxxxxxxxxxxxxxxxxxx [mailto:systemc-forum@xxxxxxxxxxxxxxxxxxx] *On Behalf Of *Dr. Yehuda Singer
*Sent:* Saturday, March 03, 2012 12:22 PM
*To:* systemc-forum@xxxxxxxxxxxxxxxxxxx
*Subject:* [systemc-forum] Question

Dear all,

Suppose that we have a system with a functional unit U that may be instantiated several times(a parameter).

How to do it?



By Date: Previous | Next Current Thread By Thread: Previous | Next