|
@@ -28,12 +28,18 @@ module top (
|
|
|
input wire uart_rx,
|
|
|
output wire uart_tx,
|
|
|
|
|
|
- // Button
|
|
|
- input wire btn,
|
|
|
+ // Buttons
|
|
|
+ input wire btn_1,
|
|
|
+ input wire btn_2,
|
|
|
+ input wire btn_3,
|
|
|
+ input wire btn_n,
|
|
|
|
|
|
// LED
|
|
|
output wire [2:0] rgb,
|
|
|
|
|
|
+ // PMOD LEDs
|
|
|
+ output wire[4:0] led,
|
|
|
+
|
|
|
// Clock
|
|
|
input wire clk_in
|
|
|
);
|
|
@@ -141,6 +147,10 @@ module top (
|
|
|
wire sync_4x;
|
|
|
wire rst;
|
|
|
|
|
|
+ // PMOD LEDs
|
|
|
+ reg [4:0] desired_led;
|
|
|
+
|
|
|
+ assign led = desired_led;
|
|
|
|
|
|
// SoC
|
|
|
// ---
|
|
@@ -430,6 +440,14 @@ module top (
|
|
|
.rst (rst)
|
|
|
);
|
|
|
|
|
|
+ // PMOD LEDs
|
|
|
+ always @(posedge clk_1x) begin
|
|
|
+ desired_led[0] = btn_1 & btn_2 & btn_3;
|
|
|
+ desired_led[1] = btn_1;
|
|
|
+ desired_led[2] = btn_2;
|
|
|
+ desired_led[3] = btn_3;
|
|
|
+ desired_led[4] = !btn_n;
|
|
|
+ end
|
|
|
|
|
|
// Clock / Reset
|
|
|
// -------------
|