diff options
author | Nao Pross <naopross@thearcway.org> | 2017-06-16 13:57:39 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2017-06-16 13:57:39 +0200 |
commit | 08fc6f3fd4461bfc78cd279809e1bf173e9f646e (patch) | |
tree | 3194ab2330128c74e2a9ced876b526931358dd6a /sw/cpld/address_decoder.vhd | |
parent | merge branch 'hardware' (diff) | |
parent | fixed typo in usart.h and in doc (diff) | |
download | z80uPC-08fc6f3fd4461bfc78cd279809e1bf173e9f646e.tar.gz z80uPC-08fc6f3fd4461bfc78cd279809e1bf173e9f646e.zip |
merge branch 'naopross'
merge to get the new doc on master
Diffstat (limited to 'sw/cpld/address_decoder.vhd')
-rw-r--r-- | sw/cpld/address_decoder.vhd | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sw/cpld/address_decoder.vhd b/sw/cpld/address_decoder.vhd new file mode 100644 index 0000000..2c80f86 --- /dev/null +++ b/sw/cpld/address_decoder.vhd @@ -0,0 +1,37 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.std_logic_arith.all; +use ieee.std_logic_unsigned.all; + +entity ADDRESS_DECODER is + +port( + -- address input + PA: in unsigned(15 downto 0); + + -- chip selects output + -- memory + CSROMH: out std_logic; + CSROML: out std_logic; + CSRAM : out std_logic; + -- io chips + CSUART: out std_logic; + CSCTC : out std_logic; + CSPIO : out std_logic +); + +end; + +architecture Behavioral of ADDRESS_DECODER is +begin + -- memory + CSROMH <= 0 when ((PA >= x"0000") and (PA < x"2000")); + CSROML <= 0 when ((PA >= x"4000") and (PA < x"4000")); + CSRAM <= 0 when (PA >= x"D000"); + -- io chips + CSUART <= 0 when ((PA >= x"4000") and (PA < x"4008")); + -- CSCTC + -- CSPIO + +end Behavioral; + |