[flash_ctrl] Minor refactoring to get ready for upcoming changes - Move most parameters out of top_pkg to get ready for flash_ctrl templating - Separate bus width from flash data width to get ready for wider flash Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/hw/top_earlgrey/data/top_earlgrey.sv.tpl b/hw/top_earlgrey/data/top_earlgrey.sv.tpl index 4bd94e8..ea823a2 100644 --- a/hw/top_earlgrey/data/top_earlgrey.sv.tpl +++ b/hw/top_earlgrey/data/top_earlgrey.sv.tpl
@@ -458,12 +458,12 @@ logic flash_host_req; logic flash_host_req_rdy; logic flash_host_req_done; - logic [FLASH_DW-1:0] flash_host_rdata; - logic [FLASH_AW-1:0] flash_host_addr; + logic [flash_ctrl_pkg::BusWidth-1:0] flash_host_rdata; + logic [flash_ctrl_pkg::AddrW-1:0] flash_host_addr; tlul_adapter_sram #( - .SramAw(FLASH_AW), - .SramDw(FLASH_DW), + .SramAw(flash_ctrl_pkg::AddrW), + .SramDw(flash_ctrl_pkg::BusWidth), .Outstanding(2), .ByteAccess(0), .ErrOnWrite(1) @@ -489,12 +489,7 @@ .rerror_i (2'b00) ); - flash_phy #( - .NumBanks(FLASH_BANKS), - .PagesPerBank(FLASH_PAGES_PER_BANK), - .WordsPerPage(FLASH_WORDS_PER_PAGE), - .DataWidth(${data_width}) - ) u_flash_${m["name"]} ( + flash_phy u_flash_${m["name"]} ( % for key in clocks: .${key} (${clocks[key]}_clk), % endfor