For a project, I am trying to convert a value that I receive from an sc_lv<8>
type input port to an sc_uint<8>
type signal. By the way, the input port is connected to an sc_signal_rv<8>
channel.
I tried casting the input data using this line :
sc_in< sc_lv<8> > data_in;
// Other declarations
sc_signal< sc_uint<8> > tx_data;
// Other declarations
// Assume that all else is properly declared
sc_uint<8> temp;
temp = (sc_uint<8>)data_in->read(); // Casting
tx_data.write(temp);
But I get this warning during simulation :
Warning: (W211) sc_logic value 'Z' cannot be converted to bool
I though of doing a case-by-case affect, but I'm not entirely sure.
Any ideas?