-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasys3_Mini_CPU.v
More file actions
92 lines (78 loc) · 1.84 KB
/
Copy pathBasys3_Mini_CPU.v
File metadata and controls
92 lines (78 loc) · 1.84 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 23:24:10 02/17/2012
// Design Name: PIC16F54
// Module Name: PIC16F54_tb01.v
// Project Name: PIC18F97J60
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: PIC16F54
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module PIC16F54_tb01_v;
// Inputs
reg rst;
reg clk;
reg [3:0] porta_in;
reg [7:0] portb_in;
// reg [15:0] test_in;
reg wdtmr;
reg tmr0_inc;
// Outputs
wire [3:0] porta_out;
wire [7:0] portb_out;
wire [4:0] porta_tris;
wire [7:0] portb_tris;
wire [7:0] option_out;
// Instantiate the Unit Under Test (UUT)
PIC16F54 uut (
.rst(rst),
.clk(clk),
.porta_in(porta_in),
.portb_in(portb_in),
.porta_out(porta_out),
.portb_out(portb_out),
.porta_tris(porta_tris),
.portb_tris(portb_tris),
// .test_in(test_in),
.wdtmr(wdtmr),
.tmr0_inc(tmr0_inc),
.option_out(option_out)
);
parameter tp = 10; // clk cycle for 100 MHz
parameter dlt = 0.01*tp;
initial begin
// Initialize Inputs
rst = 1;
// rst = 0;
clk = 0;
porta_in = 0;
portb_in = 0;
// test_in = 0;
wdtmr = 0;
tmr0_inc = 0;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
#dlt;
rst = 0;
#(0.5*tp);
end
////////
always
#(tp/2) clk = ~clk; // generating clk
///
///
initial #(10000*tp) $stop;
endmodule