A
Andy Botterill
Guest
I'm in the final stages of my current design block. I thought lets just
check that the RTL coverage is good. Using the public domain tool
covered I got a 100% line coverage but only 97% combinational coverage.
I agree that some of this reduced coverage is due to my testbench not
checking some combinations. This has now been improved.
With the re-written testbench my combinational coverage is now 99%.
To fix some of the poor coverage I had to change the design. This
reduced the lines that had issues from 12 to 6.
was
if( Rm_contents[31]==1'b0)
begin
shifter_operand=0;
shifter_carry_out=Rm_contents[31];
end
else
begin
shifter_operand=32'hffffffff;
shifter_carry_out=Rm_contents[31];
end
is now
shifter_carry_out=Rm_contents[31];
if( Rm_contents[31]==1'b0)
shifter_operand=0;
else
shifter_operand=32'hffffffff;
This is just combinational logic.
My questions are:-
Is it normal practice to see if *every* statement is actually necessary?
Would a paid for RTL coverage tool be smart enough to detect the
coverage in my "was" code?
My reason for these questions is to figure out what is actually best (or
standard) practice. Reducing the number of if statements will help to
make the design operate faster. Thanks for your comments. Andy
check that the RTL coverage is good. Using the public domain tool
covered I got a 100% line coverage but only 97% combinational coverage.
I agree that some of this reduced coverage is due to my testbench not
checking some combinations. This has now been improved.
With the re-written testbench my combinational coverage is now 99%.
To fix some of the poor coverage I had to change the design. This
reduced the lines that had issues from 12 to 6.
was
if( Rm_contents[31]==1'b0)
begin
shifter_operand=0;
shifter_carry_out=Rm_contents[31];
end
else
begin
shifter_operand=32'hffffffff;
shifter_carry_out=Rm_contents[31];
end
is now
shifter_carry_out=Rm_contents[31];
if( Rm_contents[31]==1'b0)
shifter_operand=0;
else
shifter_operand=32'hffffffff;
This is just combinational logic.
My questions are:-
Is it normal practice to see if *every* statement is actually necessary?
Would a paid for RTL coverage tool be smart enough to detect the
coverage in my "was" code?
My reason for these questions is to figure out what is actually best (or
standard) practice. Reducing the number of if statements will help to
make the design operate faster. Thanks for your comments. Andy