aboutsummaryrefslogtreecommitdiff
path: root/src/top.v
diff options
context:
space:
mode:
authorFlavian Kaufmann <flavian@flaviankaufmann.ch>2024-05-13 07:46:45 +0200
committerFlavian Kaufmann <flavian@flaviankaufmann.ch>2024-05-13 07:46:45 +0200
commit48205bf3e8d421b6aa0474a4d120ae5faaaaa670 (patch)
treeb8831bc5ad48d3375a5b05d6d532e2b3e0f2e490 /src/top.v
parentdeb7d0a6fc76d5250c238d479cf97d4755abef01 (diff)
downloadriscv_cpu-48205bf3e8d421b6aa0474a4d120ae5faaaaa670.tar.gz
riscv_cpu-48205bf3e8d421b6aa0474a4d120ae5faaaaa670.zip
refactoring, runs now on fpga
Diffstat (limited to 'src/top.v')
-rw-r--r--src/top.v15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/top.v b/src/top.v
index e5a6381..36ce912 100644
--- a/src/top.v
+++ b/src/top.v
@@ -1,20 +1,27 @@
module top (
input clk,
- input key
+ input key,
+ output [5:0] led
);
wire rstn, clk_cpu;
assign rstn = key;
+wire [31:0] dbg_t6;
clock_divider #(.N(1024 * 1024)) clkdiv (
.clk(clk),
- .reset(!rstn),
- .clk_out(clk_cpu)
+ .rstn(rstn),
+ .clk_div(clk_cpu)
);
+assign led[0] = ~clk_cpu;
+assign led[5:1] = ~dbg_t6[4:0];
+
+
cpu cpu (
.clk(clk_cpu),
- .rstn(rstn)
+ .rstn(rstn),
+ .dbg_t6(dbg_t6)
);
endmodule