Search the Community
Showing results for tags 'sc_bitref'.
Hi all, I've a problem pretty stupid I guess. I have this piece of code that doesn't compile at all. I guess the documentation I'm reading is old and something has changed in the SystemC library because this code comes from the documentation: sc_logic mybit; sc_uint<8> myint; mybit = myint; This is what I get: fde.cpp: In member function ‘void fde::cir_elab()’: fde.cpp:42:11: error: ambiguous overload for ‘operator=’ (operand types are ‘sc_dt::sc_logic’ and ‘sc_dt::sc_uint_bitref’) mybit = myint; ^ I guess I have to do some typecasting but I'm still not really skilled with C++. I've seen I need to use the sc_bitref class, not clear how. Does someone know how to fix this ? Cheers, Stefano.