F
fl
Hi,
I have the testbench generated by Matlab HDL coder below the dot line.
Signal "filter_out_rdenb" is connected to a filter CE_OUT component pin (This filter is the DUT of this testbench).
I am curious about line ld. It has the condition line la:
filter_out_rdenb='1';
then line lb through le will has condition: "filter_out_rdenb='0'". Is this right?
But it again check
lc: ELSIF filter_out_rdenb = '1'
at line lc.
I think ld will never be run. Does Matlab HDL Coder wrong?
Or this is intentional to test an abnormal filter CE_OUT condition? I cannot imagine it now. Could you tell me that if that is right?
Thanks
...............
checker_1: PROCESS(clk, reset)
BEGIN
IF reset = '1' THEN
filter_out_timeout <= 0;
filter_out_errCnt <= 0;
filter_out_testFailure <= '0';
ELSIF clk'event and clk ='1' THEN
la: IF filter_out_rdenb = '1' THEN
filter_out_timeout <= 0;
IF filter_out /= filter_out_expected THEN
filter_out_errCnt <= filter_out_errCnt + 1;
filter_out_testFailure <= '1';
ASSERT FALSE
REPORT "Error in filter_out: Expected "
& to_hex(filter_out_expected)
& " Actual "
& to_hex(filter_out)
SEVERITY ERROR;
IF filter_out_errCnt >= MAX_ERROR_COUNT THEN
ASSERT FALSE
REPORT "Number of errors have exceeded the maximum error"
SEVERITY Warning;
END IF;
END IF;
lb: ELSIF filter_out_timeout > MAX_TIMEOUT AND filter_out_rdenb = '1' THEN
filter_out_errCnt <= filter_out_errCnt + 1;
filter_out_testFailure <= '1';
ASSERT FALSE
REPORT "Timeout: Data was not received after timeout."
SEVERITY FAILURE ;
lc: ELSIF filter_out_rdenb = '1' THEN
ld: filter_out_timeout <= filter_out_timeout + 1 ;
le: END IF;
END IF;
END PROCESS checker_1;
I have the testbench generated by Matlab HDL coder below the dot line.
Signal "filter_out_rdenb" is connected to a filter CE_OUT component pin (This filter is the DUT of this testbench).
I am curious about line ld. It has the condition line la:
filter_out_rdenb='1';
then line lb through le will has condition: "filter_out_rdenb='0'". Is this right?
But it again check
lc: ELSIF filter_out_rdenb = '1'
at line lc.
I think ld will never be run. Does Matlab HDL Coder wrong?
Or this is intentional to test an abnormal filter CE_OUT condition? I cannot imagine it now. Could you tell me that if that is right?
Thanks
...............
checker_1: PROCESS(clk, reset)
BEGIN
IF reset = '1' THEN
filter_out_timeout <= 0;
filter_out_errCnt <= 0;
filter_out_testFailure <= '0';
ELSIF clk'event and clk ='1' THEN
la: IF filter_out_rdenb = '1' THEN
filter_out_timeout <= 0;
IF filter_out /= filter_out_expected THEN
filter_out_errCnt <= filter_out_errCnt + 1;
filter_out_testFailure <= '1';
ASSERT FALSE
REPORT "Error in filter_out: Expected "
& to_hex(filter_out_expected)
& " Actual "
& to_hex(filter_out)
SEVERITY ERROR;
IF filter_out_errCnt >= MAX_ERROR_COUNT THEN
ASSERT FALSE
REPORT "Number of errors have exceeded the maximum error"
SEVERITY Warning;
END IF;
END IF;
lb: ELSIF filter_out_timeout > MAX_TIMEOUT AND filter_out_rdenb = '1' THEN
filter_out_errCnt <= filter_out_errCnt + 1;
filter_out_testFailure <= '1';
ASSERT FALSE
REPORT "Timeout: Data was not received after timeout."
SEVERITY FAILURE ;
lc: ELSIF filter_out_rdenb = '1' THEN
ld: filter_out_timeout <= filter_out_timeout + 1 ;
le: END IF;
END IF;
END PROCESS checker_1;