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] tracing arrays Message Thread: Previous | Next
  • To: <vincekoskesh@xxxxxxxxxxx>, <systemc-forum@xxxxxxxxxxxxxxxxx>
  • From: Robert Brewer <robert_brewer@xxxxxxxxxxx>
  • Date: Fri, 15 Jan 2010 17:40:41 +0000
Send Email to systemc-forum@lists.systemc.org:
Send new message
Reply to this message

Well doesn't sizeof(unsigned char) = 1 anyway? I tried
sc_trace(my_file, my_array, "my_array", 8*8[bits]);
but that doesn't work either.

Rob



From: vincekoskesh@xxxxxxxxxxx
To: robert_brewer@xxxxxxxxxxx; systemc-forum@xxxxxxxxxxxxxxxxx
Subject: RE: [systemc-forum] tracing arrays
Date: Fri, 15 Jan 2010 12:25:29 -0500








I looked at the LRM.

Try: 
sc_trace(my_file, my_array, "my_array", value*sizeof(unsigned char));
ie.
sc_trace(my_file, my_array, "my_array", 8*sizeof(unsigned char));

All the best,
Vince

From: robert_brewer@xxxxxxxxxxx
To: vincekoskesh@xxxxxxxxxxx; systemc-forum@xxxxxxxxxxxxxxxxx
Date: Fri, 15 Jan 2010 17:17:39 +0000
Subject: RE: [systemc-forum] tracing arrays








There is already a function defined that the Golden Reference Guide describes 
as "trace array arrayType of width width"

definition:
void sc_trace(sc_trace_file*, const arrayType, const string&, int width)

It is not obvious to me what this function is supposed to do, but I would guess 
that if arrayType is unsigned char* and width is 8 then it should trace 8 
bytes...?

Rob

From: vincekoskesh@xxxxxxxxxxx
To: robert_brewer@xxxxxxxxxxx; systemc-forum@xxxxxxxxxxxxxxxxx
Subject: RE: [systemc-forum] tracing arrays
Date: Fri, 15 Jan 2010 12:00:58 -0500








Robert,

I haven't traced an array type. You may need to define sc_trace for an array. 
Or try something like the following:
for (int i= 0; i< vlaue; i++){
        sc_trace(my_file, my_array[i], "my_array" << i);
}

Gluck,
Vince

From: robert_brewer@xxxxxxxxxxx
To: systemc-forum@xxxxxxxxxxxxxxxxx
Date: Fri, 15 Jan 2010 16:52:12 +0000
Subject: [systemc-forum] tracing arrays








Hi all,

if I write

unsigned char my_array[8];
...
sc_trace(my_file, my_array, "my_array", 8);

I was expecting to get a trace of 8 bytes. However what I actually get is the 
trace of a single byte (i.e. 8 boolean values). Is this what is expected? Is 
there any way to trace an array of bytes and have each byte grouped together as 
an array of 8 bits?

I'm converting the vcd to a wlf file using Modelsim's vcd2wlf utility and then 
viewing in the Modelsim wave window.

Rob
                                          
Got a cool Hotmail story? Tell us now                                     
Tell the whole story with photos, right from your Messenger window. Learn how!  
                                  
Do you want a Hotmail account? Sign-up now - Free                               
          
Say Happy New Year with Messenger for Mobile. See more.                         
                  
_________________________________________________________________
Got a cool Hotmail story? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/

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