Fix incorrect oen pin in HW PWM controller

This commit is contained in:
Madeline Busig 2025-12-02 21:44:53 -08:00
parent 941cbdf2dc
commit 067e4c1f6a

View File

@ -3,7 +3,7 @@
module top (
input clk,
input [0:0] btn,
input [7:0] sw,
input [11:0] sw,
output [2:0] RGB_led_A,
output [7:0] led
);
@ -19,6 +19,9 @@ conf_div clock_div (
wire clk_cur = btn[0] ? clk2 : clk;
wire oen = sw[11];
assign led[0] = oen;
pwm_core #(
.WINDOW_REG_SIZE(8)
) pwm_core_r (
@ -26,7 +29,7 @@ pwm_core #(
.rst(0),
.duty(sw[7:0]),
.window_width(255),
.oen(sw[11]),
.oen(oen),
.pulse(RGB_led_A[0])
);