From 12436b712672ecdacc7c1a65214f276845456f3c Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Thu, 19 Dec 2024 12:39:52 +0000 Subject: [PATCH] Fix only PWM 0 being enabled via Pinmux 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. --- rtl/system/sonata_system.sv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtl/system/sonata_system.sv b/rtl/system/sonata_system.sv index b4beff9e..6cd9f44b 100644 --- a/rtl/system/sonata_system.sv +++ b/rtl/system/sonata_system.sv @@ -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),