Add board-io, replace sevenseg in sw

This commit is contained in:
Byron Lathi
2022-03-18 01:27:55 +00:00
parent 63b942e29a
commit 5c32fe808e
10 changed files with 89 additions and 8 deletions

27
hw/fpga/board_io.sv Normal file
View File

@@ -0,0 +1,27 @@
module board_io(
input clk,
input rst,
input rw,
input [7:0] data_in,
input cs,
input [1:0] addr,
output logic [7:0] data_out,
output logic [7:0] led,
input [7:0] sw
);
assign data_out = sw;
always_ff @(posedge clk) begin
if (rst)
led = '0;
if (~rw & cs)
led <= data_in;
end
endmodule