diff options
| author | JulianCamacho <jjulian.341@gmail.com> | 2022-11-17 08:16:14 -0600 |
|---|---|---|
| committer | JulianCamacho <jjulian.341@gmail.com> | 2022-11-17 08:16:14 -0600 |
| commit | 61bf2100fbd5e0a5f4bd1f013d70d8027604bbba (patch) | |
| tree | f8dda309768c57d3cbce052baf7b094ff996374a /rtl | |
| parent | 268512c3f2c67bb72f0dab45b8112313fd585e2c (diff) | |
Bug fixes
Diffstat (limited to 'rtl')
| -rw-r--r-- | rtl/top/conspiracion.sv | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rtl/top/conspiracion.sv b/rtl/top/conspiracion.sv index 62e71b3..c3ffb93 100644 --- a/rtl/top/conspiracion.sv +++ b/rtl/top/conspiracion.sv @@ -30,6 +30,8 @@ module conspiracion output wire vram_wire_ras_n, output wire vram_wire_we_n, output wire [7:0] pio_leds, + input wire pio_buttons, + input wire [5:0] pio_switches, output wire vga_dac_clk, output wire vga_dac_hsync, output wire vga_dac_vsync, @@ -40,6 +42,7 @@ module conspiracion output wire [7:0] vga_dac_b ); + logic button; logic[3:0] data_be; logic[29:0] addr; logic[31:0] data_rd, data_wr; @@ -49,6 +52,7 @@ module conspiracion `ifdef VERILATOR assign cpu_halt = halt; assign reset_reset_n = rst_n; + assign button = pio_buttons; `else debounce reset_debounce ( @@ -63,6 +67,13 @@ module conspiracion .dirty(halt), .clean(cpu_halt) ); + + debounce button_debounce + ( + .clk(clk_clk), + .dirty(pio_buttons), + .clean(button) + ); `endif arm810 core @@ -95,6 +106,9 @@ module conspiracion .master_0_core_irq(irq), .pll_0_reset_reset(0), //TODO: reset controller, algún día .pio_0_external_connection_export(pio_leds), + .switches_external_connection_export({2'b00, pio_switches}), + //TODO: glitch rst + .buttons_external_connection_export({7'b0000000, !button}), .sys_sdram_pll_0_sdram_clk_clk(vram_wire_clk), .vga_dac_CLK(vga_dac_clk), .vga_dac_HS(vga_dac_hsync), |
