@@ -69,66 +69,66 @@ def elaborate(self, platform):
6969 # SPI flash
7070
7171 spiflash_provider = platform .providers .QSPIFlashProvider ()
72- spiflash = SPIMemIO (name = "spiflash" , flash = spiflash_provider .pins )
73- wb_decoder .add (spiflash .data_bus , addr = self .mem_spiflash_base )
74- csr_decoder .add (spiflash .ctrl_bus , addr = self .csr_spiflash_base - self .csr_base )
72+ spiflash = SPIMemIO (flash = spiflash_provider .pins )
73+ wb_decoder .add (spiflash .data_bus , name = "spiflash" , addr = self .mem_spiflash_base )
74+ csr_decoder .add (spiflash .ctrl_bus , name = "spiflash" , addr = self .csr_spiflash_base - self .csr_base )
7575
7676 m .submodules .spiflash_provider = spiflash_provider
7777 m .submodules .spiflash = spiflash
7878
7979 # SRAM
8080
81- sram = SRAMPeripheral (name = "sram" , size = self .sram_size )
82- wb_decoder .add (sram .bus , addr = self .mem_sram_base )
81+ sram = SRAMPeripheral (size = self .sram_size )
82+ wb_decoder .add (sram .bus , name = "sram" , addr = self .mem_sram_base )
8383
8484 m .submodules .sram = sram
8585
8686 # LED GPIOs
8787
8888 led_gpio_provider = platform .providers .LEDGPIOProvider ()
89- led_gpio = GPIOPeripheral (name = "led_gpio" , pins = led_gpio_provider .pins )
90- csr_decoder .add (led_gpio .bus , addr = self .csr_led_gpio_base - self .csr_base )
89+ led_gpio = GPIOPeripheral (pins = led_gpio_provider .pins )
90+ csr_decoder .add (led_gpio .bus , name = "led_gpio" , addr = self .csr_led_gpio_base - self .csr_base )
9191
9292 m .submodules .led_gpio_provider = led_gpio_provider
9393 m .submodules .led_gpio = led_gpio
9494
9595 # UART
9696
9797 uart_provider = platform .providers .UARTProvider ()
98- uart = UARTPeripheral (name = "uart" , init_divisor = int (25e6 // 115200 ), pins = uart_provider .pins )
99- csr_decoder .add (uart .bus , addr = self .csr_uart_base - self .csr_base )
98+ uart = UARTPeripheral (init_divisor = int (25e6 // 115200 ), pins = uart_provider .pins )
99+ csr_decoder .add (uart .bus , name = "uart" , addr = self .csr_uart_base - self .csr_base )
100100
101101 m .submodules .uart_provider = uart_provider
102102 m .submodules .uart = uart
103103
104104 # Timer
105105
106- timer = PlatformTimer (name = "timer" )
107- csr_decoder .add (timer .bus , addr = self .csr_timer_base - self .csr_base )
106+ timer = PlatformTimer ()
107+ csr_decoder .add (timer .bus , name = "timer" , addr = self .csr_timer_base - self .csr_base )
108108
109109 m .submodules .timer = timer
110110 m .d .comb += cpu .timer_irq .eq (timer .irq )
111111
112112 # SoC ID
113113
114- soc_id = SoCID (name = "soc_id" , type_id = 0xCA7F100F )
115- csr_decoder .add (soc_id .bus , addr = self .csr_soc_id_base - self .csr_base )
114+ soc_id = SoCID (type_id = 0xCA7F100F )
115+ csr_decoder .add (soc_id .bus , name = "soc_id" , addr = self .csr_soc_id_base - self .csr_base )
116116
117117 m .submodules .soc_id = soc_id
118118
119119 # Button GPIOs
120120
121121 #btn_gpio_provider = platform.providers.ButtonGPIOProvider()
122- #btn_gpio = GPIOPeripheral(name="btn_gpio", pins=btn_gpio_provider.pins)
123- #csr_decoder.add(btn_gpio.bus, addr=self.csr_btn_gpio_base - self.csr_base)
122+ #btn_gpio = GPIOPeripheral(pins=btn_gpio_provider.pins)
123+ #csr_decoder.add(btn_gpio.bus, name="btn_gpio", addr=self.csr_btn_gpio_base - self.csr_base)
124124
125125 #m.submodules.btn_gpio_provider = btn_gpio_provider
126126 #m.submodules.btn_gpio = btn_gpio
127127
128128 # Wishbone-CSR bridge
129129
130- wb_to_csr = WishboneCSRBridge (csr_decoder .bus , data_width = 32 , name = "csr" )
131- wb_decoder .add (wb_to_csr .wb_bus , addr = self .csr_base , sparse = False )
130+ wb_to_csr = WishboneCSRBridge (csr_decoder .bus , data_width = 32 )
131+ wb_decoder .add (wb_to_csr .wb_bus , name = "csr" , addr = self .csr_base , sparse = False )
132132
133133 m .submodules .wb_to_csr = wb_to_csr
134134
0 commit comments