-
Notifications
You must be signed in to change notification settings - Fork 0
/
LC3.v
81 lines (72 loc) · 845 Bytes
/
LC3.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
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
module LC3 ();
//init
//Structural Verilog
//FSM
//Memory
Memory (
Clk,
Clk_View,
Reset,
Load_MDR,
Load_MAR,
Memory_WE,
Bus_In,
Memory_Out,
View_WE,
View_Address,
View_Data,
View_Out);
//MARMUX
MARMUX (
MARMUX_Adder,
IR,
MARMUX_Control,
MARMUX);
//PC
PC (
Clk,
Reset,
Load_PC,
PCMUX_Control,
PCMUX_Bus,
PCMUX_Adder,
PC);
//Register_Mod
Register_Mod (
Clk,
Reset,
Bus_In,
DR_Control,
Load_Reg,
SR2_Control,
SR1_Control,
Reg_View_Control,
SR2,
SR1,
Reg_View);
//NZP_Logic
NZP_Logic (
Clk,
Reset,
Bus_In,
Load_NZP_Logic,
N,
Z,
P);
//SignExt_Adder
SignExt_Adder (
IR,
PC,
SR1,
ADR2MUX_Control,
ADR1MUX_Control,
Adder);
//ALU
ALU (
IR,
SR2MUX_Control,
ALUMUX_Control,
SR1_In,
SR2_In,
ALU_Out);
endmodule