QMA
Member level 4
Dear all
I have calculated the value of out in verilog using xilinx vertex 6. it has to generate a message 'Data Validated' if out == 1 else 'Data Not Validated'. whenever i run the testbench, it gives me three times 'Data Not Validated' and one time 'Data Validated' provided out ==1. For out==0 it gives me 'Data Not Validated' four times. How can I control the output and get only one time 'Data Validated' for out ==1 else 'Data Not Validated'. i have designed following code
I have calculated the value of out in verilog using xilinx vertex 6. it has to generate a message 'Data Validated' if out == 1 else 'Data Not Validated'. whenever i run the testbench, it gives me three times 'Data Not Validated' and one time 'Data Validated' provided out ==1. For out==0 it gives me 'Data Not Validated' four times. How can I control the output and get only one time 'Data Validated' for out ==1 else 'Data Not Validated'. i have designed following code
Code:
if(out==1)
begin
$display("Data Validated");
if(R_addr==0)
table_index = pop_count - 1'b1;
else
table_index = count + pop_count;
if(R_addr==0)
table_index = pop_count - 1'b1;
else
table_index = count + pop_count;
end
else
if(out==0);
begin
$display("Data nnnot Validated");
end