12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- module led_top (
- input wire clk12M,
- input wire rst,
- input wire [7:0] data_input,
- input wire data_valid,
- output reg REDn,
- output reg GRNn,
- output reg RED,
- output reg GRN,
- output reg alarm
- );
-
- wire red_pwm;
- wire grn_pwm;
-
- defparam U1.on_hi = 2'b10;
- defparam U1.on_lo = 2'b01;
- defparam U1.off = 2'b00;
- defparam U1.Brightness = 4'b0111; // 50% Brightness
- defparam U2.RGB0_CURRENT = "0b111111";
- defparam U2.RGB1_CURRENT = "0b111111";
- defparam U2.RGB2_CURRENT = "0b111111";
-
- LED_control1 U1 (.clk12M(clk12M),.enable(rst),.data_input(data_input),.data_valid(data_valid),.red_pwm(red_pwm),.grn_pwm(grn_pwm),.alarm(alarm));
-
-
- RGB U2 (.CURREN('b1),.RGB0PWM(),.RGB1PWM(grn_pwm),.RGB2PWM(red_pwm),.RGBLEDEN('b1),.RGB0(),.RGB1(GRNn),.RGB2(REDn));
-
- assign RED = red_pwm;
- assign GRN = grn_pwm;
-
- endmodule
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|