Quantcast
Channel: SystemC Language Forum RSS Feed
Viewing all articles
Browse latest Browse all 595

How to output float from sc_fixed type class, using sc_trace?

$
0
0

How to output "float (double)" from sc_fixed type class using sc_trace?

 

I have an existing model (all in floating point design, using "sc_signal<double>"), and am trying to convert it to its fixed point one (i.e. using sc_signal<sc_fixed< ,,,, > >").

 

sc_signal<double> ch_a;

sc_signal<sc_fixed<16,8, SC_RND, SC_SAT> > ch_a_fix;

 

sc_trace(tf,  ch_a, "ch_a" );  // floating point channel tracing, it traces signal in "double".

sc_trace(tf,  ch_a_fix, "ch_a_fix );  // fixed point channel tracing: it traces signal in "integer numbers".

 

The question is, how can I trace the sc_fixed type class (sc_signal<sc_fixed<...:> >) in floating point numbers?

For waveform viewer-wise, I'm using gtkwave for now.

 

I have found one posting that has the same question that I have now. But it doesn't have any replies there.

 

 

http://www.accellera.org/Discussion_Forums/helpforum/archive/msg/msg?list_name=help_forum&monthdir=200802&msg=msg00035.html

 

 

Many thanks in advance.


Viewing all articles
Browse latest Browse all 595

Trending Articles