ULX3SでROMの作り方
LiteXが参考になる。
code:litex-boards/build/radiona_ulx3s/gateware/radiona_ulx3s.v
//------------------------------------------------------------------------------
// Memory rom: 6337-words x 32-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync | Write: ---- |
// Port 1 | Read: Sync | Write: Sync | Mode: Write-First | Write-Granularity: 32
initial begin
$readmemh("radiona_ulx3s_rom.init", rom);
end
always @(posedge sys_clk) begin
end
always @(posedge sys_clk) begin
if (builder_sram1_we)
rom_adr1 <= builder_sram1_adr;
end
assign main_basesoc_basesoc_dat_r = rom_dat0;
assign builder_sram1_dat_r = romrom_adr1;