Connect lower 8 bits of x31 to the LEDs for debugging

This commit is contained in:
Graham Edgecombe 2017-12-02 15:31:54 +00:00
parent 86f6e0eec1
commit 9de9955ad0
2 changed files with 9 additions and 2 deletions

View file

@ -8,8 +8,14 @@
`include "rv32_writeback.sv"
module rv32 (
input clk
input clk,
output [7:0] leds
);
always_ff @(posedge clk) begin
if (writeback_rd_writeback && writeback_rd == 31)
leds <= writeback_rd_value[7:0];
end
rv32_fetch fetch (
.clk(clk),

3
top.sv
View file

@ -34,6 +34,7 @@ module top (
);
rv32 rv32 (
.clk(clk)
.clk(clk),
.leds(leds)
);
endmodule