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 - Single step assignment of .range() width > 64 bits to sc_biguint<W> ? Message Thread: Previous | Next
  • To: "systemc-forum@xxxxxxxxxxxxxxxxxxx" <systemc-forum@xxxxxxxxxxxxxxxxxxx>
  • From: Bernard Deadman <bdeadman@xxxxxxxxxx>
  • Date: Mon, 20 Feb 2012 08:42:34 -0600
Send Email to systemc-forum@lists.accellera.org:
Send new message
Reply to this message

Does anyone have any ideas how to make this assignment in a single line?


sc_signal<256> my_signal;

sc_biguint<128> my_variable;

my_variable = my_signal.read().range(191,64):


If I try to compile that using Visual Studio (I have SystemC 2.2) I get:

1>.........cpp(57) : error C2593: 'operator =' is ambiguous
1> c:\working\systemc\systemc-2.2.0\src\sysc\datatypes\int\sc_biguint.h(238): could be 'sc_dt::sc_biguint<W> &sc_dt::sc_biguint<W>::operator =(const sc_dt::sc_lv_base &)'
1>        with
1>        [
1>            W=128
1>        ]
1> c:\working\systemc\systemc-2.2.0\src\sysc\datatypes\int\sc_biguint.h(235): or 'sc_dt::sc_biguint<W> &sc_dt::sc_biguint<W>::operator =(const sc_dt::sc_bv_base &)'
1>        with
1>        [
1>            W=128
1>        ]
1> while trying to match the argument list '(sc_dt::sc_biguint<W>, sc_dt::sc_subref_r<X>)'
1>        with
1>        [
1>            W=128
1>        ]
1>        and
1>        [
1>            X=sc_dt::sc_bv_base
1>        ]


I also looked at the .to_xyz() conversion methods but there's nothing that supports values > 64 bits. I guess I could make several slices however that will be awkward if the range values are variables.

Has anyone any ideas for simple ways to do this?

Thanks,

Bernard


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