SummerCart64/fw/cpu/bootloader/cpu_bootloader_template.sv

24 lines
470 B
Systemverilog
Raw Normal View History

2021-08-15 21:49:02 +02:00
bus.rdata
2021-08-20 19:51:55 +02:00
module cpu_bootloader (
if_system.sys sys,
if_cpu_bus bus
);
2021-08-12 21:07:47 +02:00
2021-08-20 19:51:55 +02:00
always_ff @(posedge sys.clk) begin
2021-08-15 21:49:02 +02:00
bus.ack <= 1'b0;
if (bus.request) begin
bus.ack <= 1'b1;
end
end
2021-08-12 21:07:47 +02:00
always_comb begin
2021-08-15 21:49:02 +02:00
bus.rdata = 32'd0;
if (bus.ack) begin
case (bus.address[6:2]){rom_formatted}
default: bus.rdata = 32'd0;
endcase
end
2021-08-12 21:07:47 +02:00
end
endmodule