diff options
Diffstat (limited to 'abc80.v')
-rw-r--r-- | abc80.v | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -141,6 +141,7 @@ module abc80 ( reg [6:0] std_s7_1; reg [6:0] std_s7_0; + reg [9:0] prog_ledr; reg [7:0] prog_led; reg [7:0] prog_s7_1; reg [7:0] prog_s7_0; @@ -148,7 +149,8 @@ module abc80 ( wire [7:0] sd_errled; - assign ledr = sw; // Show the switch status + // Show the switch status + assign ledr = prog_led_ctl[1] ? prog_ledr : sw; assign ledg = prog_led_ctl[0] ? prog_led : std_led; assign s7_3 = ~prog_s7_1[6:0]; @@ -917,6 +919,7 @@ module abc80 ( prog_led_ctl <= 0; prog_led <= 0; + prog_ledr <= 0; prog_s7_0 <= 0; prog_s7_1 <= 0; @@ -951,6 +954,10 @@ module abc80 ( prog_s7_0 <= cpu_do[7:0]; 5'b10111: prog_s7_1 <= cpu_do[7:0]; + 5'b11000: + prog_ledr[7:0] <= cpu_do[7:0]; + 5'b11001: + prog_ledr[9:8] <= cpu_do[1:0]; 5'b11110: fgctl <= cpu_do[7:0]; 5'b11111: @@ -986,6 +993,10 @@ module abc80 ( intio_do <= prog_s7_0; 5'b10111: intio_do <= prog_s7_1; + 5'b11000: + intio_do <= prog_ledr[7:0]; + 5'b11001: + intio_do <= prog_ledr[9:8]; 5'b11110: intio_do <= fgctl; 5'b11111: |