From bda744dc3ed0490bcbb22b22147b25e68a789f16 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 4 Apr 2023 18:04:41 +0200 Subject: remove pull down resistor for SPI SR and test new SPI transmit --- basys3/basys3.srcs/ppu_dispctl.vhd | 13 +- basys3/basys3.xpr | 22 ++-- basys3/ppu_tb_behav.wcfg | 16 ++- docs/hardware/hardware.kicad_pcb | 72 ----------- docs/hardware/hardware.kicad_prl | 1 - docs/hardware/hardware.kicad_sch | 246 ++++++++++++++----------------------- src/demo.c | 6 +- src/ppu/stm.c | 10 +- 8 files changed, 122 insertions(+), 264 deletions(-) diff --git a/basys3/basys3.srcs/ppu_dispctl.vhd b/basys3/basys3.srcs/ppu_dispctl.vhd index 1465a58..ce53557 100644 --- a/basys3/basys3.srcs/ppu_dispctl.vhd +++ b/basys3/basys3.srcs/ppu_dispctl.vhd @@ -15,7 +15,7 @@ entity ppu_dispctl is port( RO,GO,BO : out std_logic_vector(PPU_COLOR_OUTPUT_DEPTH-1 downto 0); -- VGA color out NVSYNC, NHSYNC : out std_logic; -- VGA sync out - THBLANK, TVBLANK : out std_logic; -- tiny sync signals + THBLANK, TVBLANK : out std_logic := '0'; -- tiny sync signals ACTIVE : out std_logic); -- screen currently active (currently same for tiny/native, TODO: offset tiny for first scanline) end ppu_dispctl; @@ -73,7 +73,6 @@ begin -- tiny VCOUNT and HCOUNT process(TPIXCLK, NPIXCLK, RESET) variable TMP_T_POS_X : unsigned(PPU_SCREEN_T_POS_X_WIDTH-1 downto 0) := (others => '0'); - variable TMP_THBLANK, TMP_TVBLANK : std_logic := '0'; variable TMP_NHCOUNT, TMP_NVCOUNT : unsigned(PPU_VGA_SIGNAL_PIXEL_WIDTH-1 downto 0) := (others => '0'); variable TMP_NHACTIVE, TMP_NVACTIVE : std_logic := '0'; variable TMP_NHSYNC, TMP_NVSYNC : std_logic := '0'; @@ -84,8 +83,6 @@ begin TMP_NVCOUNT := (others => '0'); TMP_NHACTIVE := '0'; TMP_NVACTIVE := '0'; - TMP_THBLANK := '0'; -- TODO - TMP_TVBLANK := '0'; -- TODO TMP_NVSYNC := '0'; TMP_NHSYNC := '0'; end if; @@ -135,9 +132,6 @@ begin if falling_edge(TPIXCLK) then -- NOTE: falling edge used because of clock offset of 90 (should be 270) T_POS_X <= TMP_T_POS_X; - THBLANK <= TMP_THBLANK; - TVBLANK <= TMP_TVBLANK; - if TMP_NACTIVE = '1' then TMP_T_POS_X := TMP_T_POS_X + 1; if TMP_T_POS_X >= PPU_SCREEN_WIDTH then @@ -165,4 +159,9 @@ begin reset => RESET, npxclk => NPIXCLK, tpxclk => TPIXCLK); + + THBLANK <= (not NHACTIVE) and NVACTIVE and nor(T_POS_X); + TVBLANK <= not NVACTIVE; + --THBLANK <= '0'; + --TVBLANK <= '0'; end Behavioral; diff --git a/basys3/basys3.xpr b/basys3/basys3.xpr index 852d6c3..6f6275c 100644 --- a/basys3/basys3.xpr +++ b/basys3/basys3.xpr @@ -60,7 +60,7 @@