프로젝트의 경우 sc_lv<8>
입력 포트에서 수신 한 값을 sc_uint<8>
유형 신호로 변환하려고합니다. 그건 그렇고, 입력 포트는 sc_signal_rv<8>
채널에 연결되어 있습니다.sc_lv를 sc_uint로 올바르게 변환하는 방법은 무엇입니까?
내가이 줄을 사용하여 입력 데이터를 캐스팅하려고 :
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);
을하지만 시뮬레이션 동안이 경고를 얻을 :
Warning: (W211) sc_logic value 'Z' cannot be converted to bool
I 영향을 미치는 사례 별 일을하지만, 그러나 나는 완전히 확신하지 않는다.
아이디어가 있으십니까?