Projektdaten für das ESY1B Praktikum im Sommersemester 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rgb_led_top.sv 876B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module led_top (
  2. input wire clk12M,
  3. input wire rst,
  4. input wire [7:0] data_input,
  5. input wire data_valid,
  6. output reg REDn,
  7. output reg GRNn,
  8. output reg RED,
  9. output reg GRN,
  10. output reg alarm
  11. );
  12. wire red_pwm;
  13. wire grn_pwm;
  14. defparam U1.on_hi = 2'b10;
  15. defparam U1.on_lo = 2'b01;
  16. defparam U1.off = 2'b00;
  17. defparam U1.Brightness = 4'b0111; // 50% Brightness
  18. defparam U2.RGB0_CURRENT = "0b111111";
  19. defparam U2.RGB1_CURRENT = "0b111111";
  20. defparam U2.RGB2_CURRENT = "0b111111";
  21. 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));
  22. RGB U2 (.CURREN('b1),.RGB0PWM(),.RGB1PWM(grn_pwm),.RGB2PWM(red_pwm),.RGBLEDEN('b1),.RGB0(),.RGB1(GRNn),.RGB2(REDn));
  23. assign RED = red_pwm;
  24. assign GRN = grn_pwm;
  25. endmodule