@@ -62,6 +62,7 @@ def __init__(self, mem_name=("mem",), cfg_name=("cfg",), *, flash):
6262 size_words = (self .size * 8 ) // 32
6363
6464 super ().__init__ ({
65+ "qspi" : Out (QSPIPins .Signature ()),
6566 "ctrl_bus" : In (csr .Signature (addr_width = exact_log2 (4 ), data_width = 8 )),
6667 "data_bus" : In (wishbone .Signature (addr_width = exact_log2 (size_words ), data_width = 32 ,
6768 granularity = 8 )),
@@ -91,17 +92,17 @@ def elaborate(self, platform):
9192 "o_ready" : spi_ready ,
9293 "i_addr" : Cat (Const (0 , 2 ), self .data_bus .adr ), # Hack to force a 1MB offset
9394 "o_rdata" : self .data_bus .dat_r ,
94- "o_flash_csb" : self .flash .csn .o ,
95- "o_flash_clk" : self .flash .clk .o ,
95+ "o_flash_csb" : self .qspi .csn .o ,
96+ "o_flash_clk" : self .qspi .clk .o ,
9697 "i_cfgreg_we" : ctrl_bridge .cfgreg_we ,
9798 "i_cfgreg_di" : ctrl_bridge .cfgreg_di ,
9899 "o_cfgreg_do" : ctrl_bridge .cfgreg_do ,
99100 } | {
100- f"o_flash_io{ n } _oe" : getattr (self .flash , f"d{ n } " ).oe for n in range (4 )
101+ f"o_flash_io{ n } _oe" : getattr (self .qspi , f"d{ n } " ).oe for n in range (4 )
101102 } | {
102- f"o_flash_io{ n } _o" : getattr (self .flash , f"d{ n } " ).o for n in range (4 )
103+ f"o_flash_io{ n } _o" : getattr (self .qspi , f"d{ n } " ).o for n in range (4 )
103104 } | {
104- f"o_flash_io{ n } _i" : getattr (self .flash , f"d{ n } " ).i for n in range (4 )
105+ f"o_flash_io{ n } _i" : getattr (self .qspi , f"d{ n } " ).i for n in range (4 )
105106 }
106107
107108 m .submodules .spimemio = Instance ("spimemio" , ** verilog_map )
0 commit comments