Skip to content

Commit 2bf7b8c

Browse files
Verilator now has pinmux stub
1 parent 8157842 commit 2bf7b8c

3 files changed

Lines changed: 104 additions & 3 deletions

File tree

dv/verilator/top_verilator.sv

Lines changed: 100 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,108 @@ module top_verilator (input logic clk_i, rst_ni);
159159
assign appspi_clk = spi_sck[0];
160160
assign lcd_clk = spi_sck[1];
161161

162+
// Stub of pinmux to make sure it keeps compiling.
163+
pinmux u_pinmux (
164+
.clk_i,
165+
.rst_ni,
166+
167+
.uart_tx_i('{default: '0}),
168+
.uart_rx_o(),
169+
.i2c_scl_i('{default: '0}),
170+
.i2c_scl_en_i('{default: '0}),
171+
.i2c_scl_o(),
172+
.i2c_sda_i('{default: '0}),
173+
.i2c_sda_en_i('{default: '0}),
174+
.i2c_sda_o(),
175+
.spi_sck_i('{default: '0}),
176+
.spi_tx_i('{default: '0}),
177+
.spi_rx_o(),
178+
.gpio_ios_i('{default: '0}),
179+
.gpio_ios_en_i('{default: '0}),
180+
.gpio_ios_o(),
181+
182+
.ser0_tx(),
183+
.ser0_rx(),
184+
.ser1_tx(),
185+
.ser1_rx(),
186+
.rs232_tx(),
187+
.rs232_rx(),
188+
.scl0(),
189+
.sda0(),
190+
.scl1(),
191+
.sda1(),
192+
.appspi_d0(),
193+
.appspi_d1(),
194+
.appspi_clk(),
195+
.lcd_copi(),
196+
.lcd_clk(),
197+
.ethmac_copi(),
198+
.ethmac_cipo(),
199+
.ethmac_sclk(),
200+
.rph_g0(),
201+
.rph_g1(),
202+
.rph_g2_sda(),
203+
.rph_g3_scl(),
204+
.rph_g4(),
205+
.rph_g5(),
206+
.rph_g6(),
207+
.rph_g7_ce1(),
208+
.rph_g8_ce0(),
209+
.rph_g9_cipo(),
210+
.rph_g10_copi(),
211+
.rph_g11_sclk(),
212+
.rph_g12(),
213+
.rph_g13(),
214+
.rph_txd0(),
215+
.rph_rxd0(),
216+
.rph_g16_ce2(),
217+
.rph_g17(),
218+
.rph_g18(),
219+
.rph_g19_cipo(),
220+
.rph_g20_copi(),
221+
.rph_g21_sclk(),
222+
.rph_g22(),
223+
.rph_g23(),
224+
.rph_g24(),
225+
.rph_g25(),
226+
.rph_g26(),
227+
.rph_g27(),
228+
.ah_tmpio0(),
229+
.ah_tmpio1(),
230+
.ah_tmpio2(),
231+
.ah_tmpio3(),
232+
.ah_tmpio4(),
233+
.ah_tmpio5(),
234+
.ah_tmpio6(),
235+
.ah_tmpio7(),
236+
.ah_tmpio8(),
237+
.ah_tmpio9(),
238+
.ah_tmpio10(),
239+
.ah_tmpio11(),
240+
.ah_tmpio12(),
241+
.ah_tmpio13(),
242+
.ah_tmpio14(),
243+
.ah_tmpio15(),
244+
.ah_tmpio16(),
245+
.ah_tmpio17(),
246+
.mb2(),
247+
.mb3(),
248+
.mb4(),
249+
.mb5(),
250+
.mb6(),
251+
.mb7(),
252+
.mb8(),
253+
.pmod0(),
254+
.pmod1(),
255+
256+
.tl_i(tlul_pkg::TL_H2D_DEFAULT),
257+
.tl_o()
258+
);
259+
162260
// Instantiating the Sonata System.
163261
// TODO instantiate this with only two UARTs and no SPI when bus is
164262
// parameterized.
165263
sonata_system #(
166-
.GpiWidth ( 14 ),
167-
.GpoWidth ( 23 ),
168264
.PwmWidth ( 1 ),
169265
.CheriErrWidth ( CheriErrWidth ),
170266
.SysClkFreq ( SysClkFreq ),
@@ -186,6 +282,7 @@ module top_verilator (input logic clk_i, rst_ni);
186282

187283
.gp_i (0),
188284
.gp_o ({
285+
9'b0,
189286
mb0, // mikroBUS Click reset
190287
mb1, // mikroBUS Click chip select
191288
ah_tmpio10, // Arduino shield chip select
@@ -196,7 +293,7 @@ module top_verilator (input logic clk_i, rst_ni);
196293
usrLed, // User LEDs (8 bits)
197294
lcd_backlight, lcd_dc, lcd_rst, lcd_cs // LCD screen
198295
}),
199-
.gp_o_en ( ),
296+
.gp_o_en ( ),
200297
.pwm_o ( ),
201298
.gp_headers_i ('{default: '0}),
202299
.gp_headers_o ( ),

rtl/system/pinmux.sv

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rtl/templates/pinmux.sv.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ module pinmux (
3131
// Register control signals.
3232
logic reg_we;
3333
logic [RegAddrWidth-1:0] reg_addr;
34+
/* verilator lint_off UNUSEDSIGNAL */
3435
logic [BusDataWidth-1:0] reg_wdata;
36+
/* verilator lint_on UNUSEDSIGNAL */
3537
logic [(BusDataWidth/8)-1:0] reg_be;
3638
logic [BusDataWidth-1:0] reg_rdata;
3739

0 commit comments

Comments
 (0)