-
Notifications
You must be signed in to change notification settings - Fork 0
/
soc.sv
72 lines (56 loc) · 1.41 KB
/
soc.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* Top module: soc */
`timescale 1ns / 1ps
`include "isa.vh"
module soc;
wire clk;
wire rst_n;
wire clear = `DISABLE;
wire [15:0] grant;
wire [15:0] request;
wire if_request;
wire ma_request;
tilelink master[16]();
tilelink slave[64]();
assign request[0] = if_request;
assign request[1] = ma_request;
clk_rst u_clk_rst (
.clk (clk ),
.rst_n (rst_n )
);
crossbar u_crossbar (
.clk (clk ),
.rst_n (rst_n ),
.request (request ),
.grant (grant ),
.master (master ),
.slave (slave )
);
wire [63:0] ma_pc;
cpu u_cpu (
.clk (clk ),
.rst_n (rst_n ),
.clear (clear ),
.ma_pc (ma_pc ),
.if_request (if_request ),
.if_phy_bus (master[0] ),
.ma_request (ma_request ),
.ma_phy_bus (master[1] )
);
zero_page zero_page(slave[0]);
rom rom(clk, rst_n, slave[1]);
uart uart(clk, rst_n, slave[2]);
mmio_blk mmio_blk(clk, rst_n, slave[3]);
ram ram(clk, rst_n, ma_pc, slave[4]);
generate
for (genvar i = 2; i < 16; i++) begin: cycle0
assign request[i] = `DISABLE;
end
endgenerate
//`define DUMP_VARS
`ifdef DUMP_VARS
initial begin
$fsdbDumpfile("soc.fsdb");
$fsdbDumpvars();
end
`endif
endmodule