generated from maddiebusig/vivado-template-hog
Fix incorrect oen pin in HW PWM controller
This commit is contained in:
parent
941cbdf2dc
commit
067e4c1f6a
@ -3,7 +3,7 @@
|
|||||||
module top (
|
module top (
|
||||||
input clk,
|
input clk,
|
||||||
input [0:0] btn,
|
input [0:0] btn,
|
||||||
input [7:0] sw,
|
input [11:0] sw,
|
||||||
output [2:0] RGB_led_A,
|
output [2:0] RGB_led_A,
|
||||||
output [7:0] led
|
output [7:0] led
|
||||||
);
|
);
|
||||||
@ -19,6 +19,9 @@ conf_div clock_div (
|
|||||||
|
|
||||||
wire clk_cur = btn[0] ? clk2 : clk;
|
wire clk_cur = btn[0] ? clk2 : clk;
|
||||||
|
|
||||||
|
wire oen = sw[11];
|
||||||
|
assign led[0] = oen;
|
||||||
|
|
||||||
pwm_core #(
|
pwm_core #(
|
||||||
.WINDOW_REG_SIZE(8)
|
.WINDOW_REG_SIZE(8)
|
||||||
) pwm_core_r (
|
) pwm_core_r (
|
||||||
@ -26,7 +29,7 @@ pwm_core #(
|
|||||||
.rst(0),
|
.rst(0),
|
||||||
.duty(sw[7:0]),
|
.duty(sw[7:0]),
|
||||||
.window_width(255),
|
.window_width(255),
|
||||||
.oen(sw[11]),
|
.oen(oen),
|
||||||
.pulse(RGB_led_A[0])
|
.pulse(RGB_led_A[0])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user