This commit is contained in:
Peter McGoron 2023-02-25 21:17:18 +00:00
commit 3a4224ff5b
1 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,78 @@
//testbench for intsat module
//Timothy Burman, 2022
module intsat_testbench
#(
parameter IN_LEN = 64,
parameter LTRUNC = 32
)
(
//Outputs
output signed [IN_LEN-LTRUNC-1:0] outp
);
reg signed [IN_LEN-1:0] inp;
intsat testbench (inp, outp);
initial
begin
//intial values
inp = 64'd410000000;
#10;
inp = inp + 1;
#10;
inp = inp + 1;
#10;
inp = inp + 1;
#10;
inp = inp + 1;
#10;
inp = inp + 1;
#10;
inp = inp + 1;
#10;
inp = inp + 10000000;
#10;
inp = inp + 10000000;
#10;
inp = inp - 1000000;
#10;
inp = -64'd1000000000;
#10;
inp = inp - 400095;
#10;
$finish;
end
endmodule