diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-02-24 12:15:32 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-02-24 12:15:32 +0100 |
commit | fd4732181317907d51be645f75d138c2176a8e3b (patch) | |
tree | 925fc3a51912d946bec843fe5342e8cac9535e6e /basys3/basys3.srcs/ppu_comp_tb.vhd | |
parent | e7fbeb1a6071db070c4c2b21c4c5ed70d53e269b (diff) | |
parent | b2190241fccdfbf28d6068c9f0d2179aec285528 (diff) |
merge #16
Diffstat (limited to 'basys3/basys3.srcs/ppu_comp_tb.vhd')
-rw-r--r-- | basys3/basys3.srcs/ppu_comp_tb.vhd | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/basys3/basys3.srcs/ppu_comp_tb.vhd b/basys3/basys3.srcs/ppu_comp_tb.vhd new file mode 100644 index 0000000..e8f6893 --- /dev/null +++ b/basys3/basys3.srcs/ppu_comp_tb.vhd @@ -0,0 +1,44 @@ +library ieee; +library unisim; +use ieee.std_logic_1164.all; +use work.ppu_consts.all; +use unisim.vcomponents.all; + +entity ppu_comp_tb is +end ppu_comp_tb; + +architecture behavioral of ppu_comp_tb is +COMPONENT ppu_comp + port ( + FG_HIT: in std_logic_vector(PPU_FG_SPRITE_COUNT-1 downto 0); + BG_EN: out std_logic; + FG_EN: out std_logic_vector(PPU_FG_SPRITE_COUNT-1 downto 0)); +end component; + +signal FG_HIT: std_logic_vector(PPU_FG_SPRITE_COUNT-1 downto 0) := (others => '0'); +signal BG_EN: std_logic := '0'; +signal FG_EN: std_logic_vector(PPU_FG_SPRITE_COUNT-1 downto 0) := (others => '0'); +begin +UUT : ppu_comp port map ( +FG_HIT => FG_HIT, +BG_EN => BG_EN, +FG_EN => FG_EN +); + TB : PROCESS + BEGIN + FG_HIT <= (OTHERS => '0'); + wait for 1 ps; + FG_HIT(6) <= '1'; + FG_HIT(5) <= '1'; + FG_HIT(100) <= '1'; + wait for 1 ps; + + FG_HIT(0) <= '1'; + wait for 1 ps; + FG_HIT <= (OTHERS => '0'); + wait for 1 ps; + + + wait; + END PROCESS; +end Behavioral; |