-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtestbench.v
42 lines (33 loc) · 973 Bytes
/
testbench.v
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
////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020 Akilesh Kannan <[email protected]>
//
// File: testbench.v
// Modified: 2020-07-15
// Description: Testbench Blueprint
// - Instantiate the modules to test
// - Provide Stimulus
// License: MIT
//
////////////////////////////////////////////////////////////////////////
`default_nettype None
`timescale 1ns/1ps
module testbench;
// parameters (if used)
localparam tickRate = 10; //half time-period of clock (in ns)
// all necessary variables
wire clk;
// generating file to see signals
initial begin
$dumpfile("test.vcd");
$dumpvars(0, testbench);
end
// clock-pulse
clock #(.tickRate(tickRate)) clockModule(clk);
// instantiating module and other parallel statements
//module name #() uut();
// stimuli
initial begin
#100 $finish;
end
endmodule