-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestBench_VPAC.v
More file actions
executable file
·72 lines (62 loc) · 2.08 KB
/
Copy pathTestBench_VPAC.v
File metadata and controls
executable file
·72 lines (62 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 09:36:53 03/29/2017
// Design Name: VariablePrecisionMultiplier
// Module Name: /media/akilarif/Akil/Studies/Semester 4/EC-252 Xilinx Projects/VariablePrecisionMultiplier/TestBench_VPAC.v
// Project Name: VariablePrecisionMultiplier
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: VariablePrecisionMultiplier
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module TestBench_VPAC;
// Inputs
reg [31:0] A;
reg [31:0] B;
reg SA;
reg SB;
reg prec1;
reg prec0;
// Outputs
wire [63:0] OUT;
// Instantiate the Unit Under Test (UUT)
VariablePrecisionMultiplier uut (
.A(A),
.B(B),
.SA(SA),
.SB(SB),
.prec1(prec1),
.prec0(prec0),
.OUT(OUT)
);
initial begin
// Initialize Inputs
A = 0;
B = 0;
SA = 0;
SB = 0;
prec1 = 0;
prec0 = 0;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
A = 32'b00000000000000000000000000000011; B = 32'b00000000000000000000000000000010; SA = 0; SB = 0; prec1 = 0; prec0 = 0;
#500 A = 32'b10000000000000000000000000000011; B = 32'b00000000000000000000000000000010; SA = 0; SB = 0; prec1 = 0; prec0 = 0;
#500 A = 32'b10000000000000000000000000000011; B = 32'b00000000000000000000000000000010; SA = 1; SB = 0; prec1 = 0; prec0 = 0;
#500 A = 32'b00000000000000000000000000000011; B = 32'b10000000000000000000000000000010; SA = 0; SB = 1; prec1 = 0; prec0 = 0;
#500 A = 32'b00001100000000000000000000000011; B = 32'b00000000000000000000000000000010; SA = 0; SB = 0; prec1 = 0; prec0 = 1;
#500 A = 32'b00000000011000000000000110000011; B = 32'b00000000010000000000000000000010; SA = 0; SB = 0; prec1 = 1; prec0 = 0;
#500 A = 32'b00000100000001000000001000000011; B = 32'b00010000000010000000010000000010; SA = 0; SB = 0; prec1 = 1; prec0 = 1;
end
endmodule