blob: 02ab48c2e68cd4f895ad55f19c2459f7203c4f3e (
plain)
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
|
// top:
// Top module, maps signals to fpga.
module top (
input clk,
input s1, s2,
output [5:0] led
);
wire rstn, rstn_async, clk_cpu;
assign rstn_async = s1;
wire [31:0] io_in;
wire [31:0] io_out;
reset_synchronizer reset_synchronizer (
.clk(clk),
.rstn_async(rstn_async),
.rstn(rstn)
);
clock_divider #(.N(1)) clkdiv (
.clk(clk),
.rstn(rstn),
.clk_div(clk_cpu)
);
assign led[0] = ~clk_cpu;
assign led[5:1] = ~io_out[4:0];
assign io_in[0] = ~s2;
cpu cpu (
.clk(clk_cpu),
.rstn(rstn),
.io_in(io_in),
.io_out(io_out)
);
endmodule
|