mirror of
https://github.com/MPSU/APS.git
synced 2025-09-16 17:40:41 +00:00
Update tb_fulladder.sv
This commit is contained in:
committed by
GitHub
parent
98350fb0d1
commit
998b36e57a
@@ -20,14 +20,14 @@ parameter TEST_VALUES = 8;
|
|||||||
wire tb_sum_o;
|
wire tb_sum_o;
|
||||||
|
|
||||||
|
|
||||||
fulladder DUT (
|
/* fulladder DUT (
|
||||||
.a_i(tb_a_i),
|
.a_i(tb_a_i),
|
||||||
.b_i(tb_b_i),
|
.b_i(tb_b_i),
|
||||||
.sum_o(tb_sum_o),
|
.sum_o(tb_sum_o),
|
||||||
.carry_i(tb_carry_i),
|
.carry_i(tb_carry_i),
|
||||||
.carry_o(tb_carry_o)
|
.carry_o(tb_carry_o)
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
integer i, err_count = 0;
|
integer i, err_count = 0;
|
||||||
reg [4:0] running_line;
|
reg [4:0] running_line;
|
||||||
reg [5*8-1:0] line_dump;
|
reg [5*8-1:0] line_dump;
|
||||||
@@ -42,6 +42,7 @@ parameter TEST_VALUES = 8;
|
|||||||
|
|
||||||
initial begin
|
initial begin
|
||||||
$display( "Start test: ");
|
$display( "Start test: ");
|
||||||
|
`ifdef __debug__
|
||||||
for ( i = 0; i < TEST_VALUES; i = i + 1 )
|
for ( i = 0; i < TEST_VALUES; i = i + 1 )
|
||||||
begin
|
begin
|
||||||
running_line = line_dump[i*5+:5];
|
running_line = line_dump[i*5+:5];
|
||||||
@@ -53,6 +54,14 @@ parameter TEST_VALUES = 8;
|
|||||||
end
|
end
|
||||||
$display("Number of errors: %d", err_count);
|
$display("Number of errors: %d", err_count);
|
||||||
if( !err_count ) $display("\nfulladder SUCCESS!!!\n");
|
if( !err_count ) $display("\nfulladder SUCCESS!!!\n");
|
||||||
|
`else
|
||||||
|
for ( i = 0; i < TEST_VALUES; i = i + 1 )
|
||||||
|
begin
|
||||||
|
running_line = line_dump[i*5+:5];
|
||||||
|
#TIME_OPERATION;
|
||||||
|
end
|
||||||
|
$display("Test has been finished");
|
||||||
|
`endif
|
||||||
$finish();
|
$finish();
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user