-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExternal.v
More file actions
61 lines (48 loc) · 1.11 KB
/
External.v
File metadata and controls
61 lines (48 loc) · 1.11 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
module External(
input CLOCK_50,
output [7:0] LED,
input [1:0] KEY,
input [3:0] SW,
output wire Tx,
input wire Rx
);
wire Txclk_en, Rxclk_en, Tx_busy, Ready_Byte;
wire [7:0] RegFiletToTx, Instruction_8;
wire ready;
InstMemWrapper InstMemWrapper_u(
.clk(CLOCK_50),
.rst(KEY[1]),
.data_in(Instruction_8),
.en(ready),
.LED(LED)
);
RegFileWrapper RegFileWrapper_u(
.clk(CLOCK_50),
.rst(KEY[1]),
.en(KEY[0]),
.Tx_busy(Tx_busy),
.dout(RegFiletToTx),
.Ready_Byte(Ready_Byte),
// .LED(LED)
);
transmitter uart_Tx(
.data_in(RegFiletToTx),
.wr_en(Ready_Byte),
.clk_50m(CLOCK_50),
.clken(Txclk_en),
.Tx(Tx),
.Tx_busy(Tx_busy)
);
baudrate uart_baud(
.clk_50m(CLOCK_50),
.Rxclk_en(Rxclk_en),
.Txclk_en(Txclk_en)
);
receiver uart_Rx(
.Rx(Rx),
.ready(ready),
.clk_50m(CLOCK_50),
.clken(Rxclk_en),
.data_out(Instruction_8)
);
endmodule