forked from amrtaweel12/Basic-Computer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataRegSim.v
More file actions
63 lines (57 loc) · 950 Bytes
/
Copy pathDataRegSim.v
File metadata and controls
63 lines (57 loc) · 950 Bytes
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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 28.03.2025 17:55:49
// Design Name:
// Module Name: DataRegSim
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module DataRegSim;
reg [7:0] I;
reg E;
reg [1:0] FunSel;
reg Clock;
wire [31:0] DROut;
DataRegister DR1(
.I(I),
.E(E),
.FunSel(FunSel),
.Clock(Clock),
.DROut(DROut)
);
initial begin
Clock = 1'b0;
forever #5
Clock = ~Clock;
end
initial begin
E = 1'b1;
I = 8'h55;
FunSel = 2'b00;
#10;
FunSel = 2'b01;
I = 8'hAA;
#10;
FunSel = 2'b10;
I = 8'hFF;
#10;
E = 1'b0;
FunSel = 2'b11;
#10;
E = 1'b1;
#10;
$finish;
end
endmodule