diff options
Diffstat (limited to 'basys3/basys3.srcs/ppu_pceg.vhd')
-rw-r--r-- | basys3/basys3.srcs/ppu_pceg.vhd | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/basys3/basys3.srcs/ppu_pceg.vhd b/basys3/basys3.srcs/ppu_pceg.vhd index 3de3d23..67b7e1c 100644 --- a/basys3/basys3.srcs/ppu_pceg.vhd +++ b/basys3/basys3.srcs/ppu_pceg.vhd @@ -13,6 +13,7 @@ entity ppu_pceg is port( end ppu_pceg; architecture Behavioral of ppu_pceg is + signal CLK_IDX_T : natural range 0 to PPU_PCEG_TOTAL_STAGES+1 := 0; begin process(CLK, RESET) variable CLK_IDX : natural range 0 to PPU_PCEG_TOTAL_STAGES+1 := 0; @@ -24,7 +25,7 @@ begin SPRITE_FG <= PL_FG_IDLE; DONE <= '0'; READY <= '0'; - elsif rising_edge(CLK) then + elsif falling_edge(CLK) then case CLK_IDX is when 0 => DONE <= '0'; @@ -60,6 +61,8 @@ begin if CLK_IDX = PPU_PCEG_TOTAL_STAGES then CLK_IDX := 0; end if; + + CLK_IDX_T <= CLK_IDX; end if; end process; end Behavioral; |