aboutsummaryrefslogtreecommitdiff
path: root/basys3/basys3.srcs/ppu_addr_dec.vhdl
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-02-24 13:20:02 +0100
committerlonkaars <loek@pipeframe.xyz>2023-02-24 13:20:02 +0100
commitf3a47bde9bfaaa716de835c0c1499a685b4ac4f7 (patch)
tree90abe28726ea7484184179129256022472eb2e24 /basys3/basys3.srcs/ppu_addr_dec.vhdl
parent7da7908989686daa2ac9fd2f3f79cad2f03c0828 (diff)
parent14a1c464c27206bff847fd46d3d5594b30f53af9 (diff)
Merge branch 'dev' into ppu-interface
Diffstat (limited to 'basys3/basys3.srcs/ppu_addr_dec.vhdl')
-rw-r--r--basys3/basys3.srcs/ppu_addr_dec.vhdl51
1 files changed, 0 insertions, 51 deletions
diff --git a/basys3/basys3.srcs/ppu_addr_dec.vhdl b/basys3/basys3.srcs/ppu_addr_dec.vhdl
deleted file mode 100644
index 28c22fc..0000000
--- a/basys3/basys3.srcs/ppu_addr_dec.vhdl
+++ /dev/null
@@ -1,51 +0,0 @@
-library ieee;
-library work;
-use ieee.std_logic_1164.all;
---use ieee.numeric_std.all;
-use work.ppu_consts.all;
-
-entity ppu_addr_dec is port(
- EN: in std_logic; -- EXT *ADDR enable (switch *AO to ADDR instead of *AI)
- WEN: in std_logic; -- EXT write enable
- TMM_WEN,
- BAM_WEN,
- FAM_WEN,
- PAL_WEN,
- AUX_WEN: out std_logic; -- write enable MUX
- ADDR: in std_logic_vector(PPU_RAM_BUS_ADDR_WIDTH-1 downto 0); -- address in
- TMM_AI: in std_logic_vector(PPU_TMM_ADDR_WIDTH-1 downto 0);
- BAM_AI: in std_logic_vector(PPU_BAM_ADDR_WIDTH-1 downto 0);
- FAM_AI: in std_logic_vector(PPU_FAM_ADDR_WIDTH-1 downto 0);
- PAL_AI: in std_logic_vector(PPU_PAL_ADDR_WIDTH-1 downto 0);
- AUX_AI: in std_logic_vector(PPU_AUX_ADDR_WIDTH-1 downto 0);
- TMM_AO: out std_logic_vector(PPU_TMM_ADDR_WIDTH-1 downto 0);
- BAM_AO: out std_logic_vector(PPU_BAM_ADDR_WIDTH-1 downto 0);
- FAM_AO: out std_logic_vector(PPU_FAM_ADDR_WIDTH-1 downto 0);
- PAL_AO: out std_logic_vector(PPU_PAL_ADDR_WIDTH-1 downto 0);
- AUX_AO: out std_logic_vector(PPU_AUX_ADDR_WIDTH-1 downto 0));
-end ppu_addr_dec;
-
-architecture Behavioral of ppu_addr_dec is
- signal TMM_RANGE, BAM_RANGE, FAM_RANGE, PAL_RANGE, AUX_RANGE: std_logic := '0'; -- ADDR in range of memory area
-begin
- -- address MUX
- TMM_AO <= ADDR(PPU_TMM_ADDR_WIDTH-1 downto 0) when EN = '1' else TMM_AI;
- BAM_AO <= ADDR(PPU_BAM_ADDR_WIDTH-1 downto 0) when EN = '1' else BAM_AI;
- FAM_AO <= ADDR(PPU_FAM_ADDR_WIDTH-1 downto 0) when EN = '1' else FAM_AI;
- PAL_AO <= ADDR(PPU_PAL_ADDR_WIDTH-1 downto 0) when EN = '1' else PAL_AI;
- AUX_AO <= ADDR(PPU_AUX_ADDR_WIDTH-1 downto 0) when EN = '1' else AUX_AI;
-
- -- WEN MUX
- TMM_WEN <= TMM_RANGE and WEN;
- BAM_WEN <= BAM_RANGE and WEN;
- FAM_WEN <= FAM_RANGE and WEN;
- PAL_WEN <= PAL_RANGE and WEN;
- AUX_WEN <= AUX_RANGE and WEN;
-
- -- address ranges
- TMM_RANGE <= '1' when not (ADDR(15) = '1' and ADDR(14) = '1') else '0';
- BAM_RANGE <= '1' when (ADDR(15) = '1' and ADDR(14) = '1') and (ADDR(11) = '0') else '0';
- FAM_RANGE <= '1' when (ADDR(15) = '1' and ADDR(14) = '1') and (ADDR(11) = '1' and ADDR(10) = '0') else '0';
- PAL_RANGE <= '1' when (ADDR(15) = '1' and ADDR(14) = '1') and (ADDR(11) = '1' and ADDR(10) = '1' and ADDR(9) = '0') else '0';
- AUX_RANGE <= '1' when (ADDR(15) = '1' and ADDR(14) = '1') and (ADDR(11) = '1' and ADDR(10) = '1' and ADDR(9) = '1') else '0';
-end Behavioral;