Skip to content

Commit

Permalink
Fix only PWM 0 being enabled via Pinmux
Browse files Browse the repository at this point in the history
Currently, all the PWMs (minus the LCD backlight) are being routed
through pinmux, but the value being passed for the PWM output
enable is the constant `'{'b1}'`. Because the inner value is `'b1`,
this is extended to fill the 7 bit PWM output range as `000001`,
instead of using `'1` which would extend to `111111`.

This commit makes the casting/extension of these constant enable
values more explicitly match the PWM output size and module count, to
ensure that all outputs of all PWM devices are being enabled through
pinmux.
  • Loading branch information
AlexJones0 committed Dec 19, 2024
1 parent e0eb5dc commit 12436b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtl/system/sonata_system.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1208,8 +1208,8 @@ module sonata_system
.clk_i(clk_sys_i),
.rst_ni(rst_sys_ni),

.pwm_out_i('{pwm_modulated}),
.pwm_out_en_i('{'b1}),
.pwm_out_i('{PWM_NUM{pwm_modulated}}),
.pwm_out_en_i('{PWM_NUM{{PWM_OUT_WIDTH{1'b1}}}}),

.uart_rx_o(uart_rx),
.uart_tx_i(uart_tx),
Expand Down

0 comments on commit 12436b7

Please sign in to comment.