-
Notifications
You must be signed in to change notification settings - Fork 1
/
toplevel.sv
49 lines (41 loc) · 1.4 KB
/
toplevel.sv
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
`include "config.sv"
`include "constants.sv"
module toplevel (
input clock,
input reset,
output [31:0] bus_read_data,
output [31:0] bus_address,
output [31:0] bus_write_data,
output [3:0] bus_byte_enable,
output bus_read_enable,
output bus_write_enable,
output [31:0] inst,
output [31:0] pc
);
riscv_core riscv_core (
.clock (clock),
.reset (reset),
.inst (inst),
.pc (pc),
.bus_address (bus_address),
.bus_read_data (bus_read_data),
.bus_write_data (bus_write_data),
.bus_read_enable (bus_read_enable),
.bus_write_enable (bus_write_enable),
.bus_byte_enable (bus_byte_enable)
);
example_text_memory_bus text_memory_bus (
.clock (clock),
.address (pc),
.read_data (inst)
);
example_data_memory_bus data_memory_bus (
.clock (clock),
.address (bus_address),
.read_data (bus_read_data),
.write_data (bus_write_data),
.read_enable (bus_read_enable),
.write_enable (bus_write_enable),
.byte_enable (bus_byte_enable)
);
endmodule