M
Mr. Peterfolk
Guest
Hi,
I have the following problem:
I want to verify my RTL code (written in VHDL) with the golden
reference (written in C). The connection between the two model is the
SystemC (Wrapper), the simulator is the Modelsim.
I want to observe a HDL signal, the type is an enumerated one.
VHDL code fragment:
type rxaagc_states is (INIT, WAITFORINITSD, WAITFORSD_ACT, AAGC_SP,
AAGC_COARSE, AAGC_EXTENDED, AAGC_FINE,
HBW_COUNTDOWN, RECEPTION, TRANSMIT, DUMMY1,
DUMMY2, DUMMY3, DUMMY4, DUMMY5, DUMMY6);
....
signal d_state, q_state : rxaagc_states;
....
First I tried
SystemC code fragment:
....
sc_signal< sc_lv<4> > observed_state; //16 states -> 4 bits ?!?
....
observed_state.observe_foreign_signal(path...)
Modelsim said: width mismatch between HDL SystemC signals
OK, the error message said that the bitwitdh of the HDL signal is 1(?).
Correction in the code...
Error!
I have defined an enum for the states in the SystemC wrapper with the
same states...
Error!
Please help!
Have a nice day, Peter!
I have the following problem:
I want to verify my RTL code (written in VHDL) with the golden
reference (written in C). The connection between the two model is the
SystemC (Wrapper), the simulator is the Modelsim.
I want to observe a HDL signal, the type is an enumerated one.
VHDL code fragment:
type rxaagc_states is (INIT, WAITFORINITSD, WAITFORSD_ACT, AAGC_SP,
AAGC_COARSE, AAGC_EXTENDED, AAGC_FINE,
HBW_COUNTDOWN, RECEPTION, TRANSMIT, DUMMY1,
DUMMY2, DUMMY3, DUMMY4, DUMMY5, DUMMY6);
....
signal d_state, q_state : rxaagc_states;
....
First I tried
SystemC code fragment:
....
sc_signal< sc_lv<4> > observed_state; //16 states -> 4 bits ?!?
....
observed_state.observe_foreign_signal(path...)
Modelsim said: width mismatch between HDL SystemC signals
OK, the error message said that the bitwitdh of the HDL signal is 1(?).
Correction in the code...
Error!
I have defined an enum for the states in the SystemC wrapper with the
same states...
Error!
Please help!
Have a nice day, Peter!