R
Robert Willy
Guest
Hi,
I have the following test bench lines from Matlab hdl coder generated.
Although it works, I feel a little uneasy for the lengthy (5000 lines for
each input and expected test vectors when I read it. I would like to
know whether verilog experts use a different style in their coding.
Do you put the data in a separate file and read it from there?
Do you have a short example show me that?
Thanks,
// **************************************
initial //Input & Output data
begin
// Input data for alpha_Quantizer_out1
alpha_out1_0_force[ 0] <= 3'h7;
alpha_out1_0_force[ 1] <= 3'h7;
....
alpha_out1_0_force[5000] <= 3'h1;
// Output data for Out
Out_expected[ 0] <= 1'h0;
Out_expected[ 1] <= 1'h0;
....
Out_expected[5000] <= 1'h0;
I have the following test bench lines from Matlab hdl coder generated.
Although it works, I feel a little uneasy for the lengthy (5000 lines for
each input and expected test vectors when I read it. I would like to
know whether verilog experts use a different style in their coding.
Do you put the data in a separate file and read it from there?
Do you have a short example show me that?
Thanks,
// **************************************
initial //Input & Output data
begin
// Input data for alpha_Quantizer_out1
alpha_out1_0_force[ 0] <= 3'h7;
alpha_out1_0_force[ 1] <= 3'h7;
....
alpha_out1_0_force[5000] <= 3'h1;
// Output data for Out
Out_expected[ 0] <= 1'h0;
Out_expected[ 1] <= 1'h0;
....
Out_expected[5000] <= 1'h0;