cleanup interrupt handler chip selects

This commit is contained in:
Markus Fröschle
2016-07-28 15:41:03 +00:00
parent d2e11f660a
commit 80880574d8

View File

@@ -5030,30 +5030,33 @@ begin
-- HWORD -- HWORD
-- HHBYT -- HHBYT
-- LONG UND LINE -- LONG UND LINE
FB_B(0) <= (FB_SIZE1 and (not FB_SIZE0) and (not FB_ADR(1))) or ((not FB_B(0) <= (FB_SIZE1 and (not FB_SIZE0) and (not FB_ADR(1))) or
FB_SIZE1) and FB_SIZE0 and (not FB_ADR(1)) and (not FB_ADR(0))) or ((not FB_SIZE1) and FB_SIZE0 and (not FB_ADR(1)) and (not FB_ADR(0))) or
((not FB_SIZE1) and (not FB_SIZE0)) or (FB_SIZE1 and FB_SIZE0); ((not FB_SIZE1) and (not FB_SIZE0)) or
(FB_SIZE1 and FB_SIZE0);
-- HWORD -- HWORD
-- HLBYT -- HLBYT
-- LONG UND LINE -- LONG UND LINE
FB_B(1) <= (FB_SIZE1 and (not FB_SIZE0) and (not FB_ADR(1))) or ((not FB_B(1) <= (FB_SIZE1 and (not FB_SIZE0) and (not FB_ADR(1))) or
FB_SIZE1) and FB_SIZE0 and (not FB_ADR(1)) and FB_ADR(0)) or ((not ((not FB_SIZE1) and FB_SIZE0 and (not FB_ADR(1)) and FB_ADR(0)) or
FB_SIZE1) and (not FB_SIZE0)) or (FB_SIZE1 and FB_SIZE0); ((not FB_SIZE1) and (not FB_SIZE0)) or
(FB_SIZE1 and FB_SIZE0);
-- LWORD -- LWORD
-- LHBYT -- LHBYT
-- LONG UND LINE -- LONG UND LINE
FB_B(2) <= (FB_SIZE1 and (not FB_SIZE0) and FB_ADR(1)) or ((not FB_SIZE1) FB_B(2) <= (FB_SIZE1 and (not FB_SIZE0) and FB_ADR(1)) or
and FB_SIZE0 and FB_ADR(1) and (not FB_ADR(0))) or ((not FB_SIZE1) and ((not FB_SIZE1) and FB_SIZE0 and FB_ADR(1) and (not FB_ADR(0))) or
(not FB_SIZE0)) or (FB_SIZE1 and FB_SIZE0); ((not FB_SIZE1) and (not FB_SIZE0)) or (FB_SIZE1 and FB_SIZE0);
-- LWORD -- LWORD
-- LLBYT -- LLBYT
-- LONG UND LINE -- LONG UND LINE
FB_B(3) <= (FB_SIZE1 and (not FB_SIZE0) and FB_ADR(1)) or ((not FB_SIZE1) FB_B(3) <= (FB_SIZE1 and (not FB_SIZE0) and FB_ADR(1)) or
and FB_SIZE0 and FB_ADR(1) and FB_ADR(0)) or ((not FB_SIZE1) and (not ((not FB_SIZE1) and FB_SIZE0 and FB_ADR(1) and FB_ADR(0)) or
FB_SIZE0)) or (FB_SIZE1 and FB_SIZE0); ((not FB_SIZE1) and (not FB_SIZE0)) or
(FB_SIZE1 and FB_SIZE0);
-- INTERRUPT CONTROL REGISTER: BIT0=INT5 AUSLÖSEN, 1=INT7 AUSLÖSEN -- INTERRUPT CONTROL REGISTER: BIT0=INT5 AUSLÖSEN, 1=INT7 AUSLÖSEN
INT_CTR0_clk_ctrl <= MAIN_CLK; INT_CTR0_clk_ctrl <= MAIN_CLK;
@@ -5087,28 +5090,29 @@ begin
-- $10008/4 -- $10008/4
int_clear_cs <= '1' when nFB_CS2 = '0' and FB_ADR(27 downto 2) = 26x"4002" else '0'; int_clear_cs <= '1' when nFB_CS2 = '0' and FB_ADR(27 downto 2) = 26x"4002" else '0';
-- INT_CLEAR_CS <= to_std_logic(((not nFB_CS2)='1') and FB_ADR(27 downto 2) = "00000000000100000000000010"); -- INT_CLEAR_CS <= to_std_logic(((not nFB_CS2)='1') and FB_ADR(27 downto 2) = "00000000000100000000000010");
INT_CLEAR_d(31 downto 24) <= fb_ad_in(31 downto 24) and sizeIt(INT_CLEAR_CS,8)
and sizeIt(FB_B(0),8) and sizeIt(not nFB_WR,8); int_clear_d(31 downto 24) <= fb_ad_in(31 downto 24) when int_clear_cs and fb_b(0) and not nfb_wr;
INT_CLEAR_d(23 downto 16) <= fb_ad_in(23 downto 16) and sizeIt(INT_CLEAR_CS,8) int_clear_d(23 downto 16) <= fb_ad_in(23 downto 16) when int_clear_cs and fb_b(1) and not nfb_wr;
and sizeIt(FB_B(1),8) and sizeIt(not nFB_WR,8); int_clear_d(15 downto 8) <= fb_ad_in(15 downto 8) when int_clear_cs and fb_b(2) and not nfb_wr;
INT_CLEAR_d(15 downto 8) <= fb_ad_in(15 downto 8) and sizeIt(INT_CLEAR_CS,8) int_clear_d(7 downto 0) <= fb_ad_in(7 downto 0) when int_clear_cs and fb_b(3) and not nfb_wr;
and sizeIt(FB_B(2),8) and sizeIt(not nFB_WR,8);
INT_CLEAR_d(7 downto 0) <= fb_ad_in(7 downto 0) and sizeIt(INT_CLEAR_CS,8) and
sizeIt(FB_B(3),8) and sizeIt(not nFB_WR,8); -- INT_CLEAR_d(31 downto 24) <= fb_ad_in(31 downto 24) and sizeIt(INT_CLEAR_CS,8) and sizeIt(FB_B(0),8) and sizeIt(not nFB_WR,8);
-- INT_CLEAR_d(23 downto 16) <= fb_ad_in(23 downto 16) and sizeIt(INT_CLEAR_CS,8) and sizeIt(FB_B(1),8) and sizeIt(not nFB_WR,8);
-- INT_CLEAR_d(15 downto 8) <= fb_ad_in(15 downto 8) and sizeIt(INT_CLEAR_CS,8) and sizeIt(FB_B(2),8) and sizeIt(not nFB_WR,8);
-- INT_CLEAR_d(7 downto 0) <= fb_ad_in(7 downto 0) and sizeIt(INT_CLEAR_CS,8) and sizeIt(FB_B(3),8) and sizeIt(not nFB_WR,8);
-- INTERRUPT LATCH REGISTER READ ONLY -- INTERRUPT LATCH REGISTER READ ONLY
-- $1000C/4 -- $1000C/4
int_latch_cs <= '1' when nFB_CS2 = '0' and FB_ADR(27 downto 2) = 26x"4003" else '0'; int_latch_cs <= '1' when nFB_CS2 = '0' and FB_ADR(27 downto 2) = 26x"4003" else '0';
-- INT_LATCH_CS <= to_std_logic(((not nFB_CS2)='1') and FB_ADR(27 downto 2) = -- INT_LATCH_CS <= to_std_logic(((not nFB_CS2)='1') and FB_ADR(27 downto 2) = "00000000000100000000000011");
-- "00000000000100000000000011");
-- INTERRUPT -- INTERRUPT
nIRQ(2) <= not (HSYNC and INT_ENA_q(26)); nIRQ(2) <= not (HSYNC and INT_ENA_q(26));
nIRQ(3) <= not (INT_CTR_q(0) and INT_ENA_q(27)); nIRQ(3) <= not (INT_CTR_q(0) and INT_ENA_q(27));
nIRQ(4) <= not (VSYNC and INT_ENA_q(28)); nIRQ(4) <= not (VSYNC and INT_ENA_q(28));
nIRQ(5) <= not (to_std_logic(INT_LATCH_q /= nIRQ(5) <= not (to_std_logic(INT_LATCH_q /= "00000000000000000000000000000000") and INT_ENA_q(29));
"00000000000000000000000000000000") and INT_ENA_q(29));
nIRQ(6) <= not ((not nMFP_INT) and INT_ENA_q(30)); nIRQ(6) <= not ((not nMFP_INT) and INT_ENA_q(30));
nIRQ(7) <= not (PSEUDO_BUS_ERROR and INT_ENA_q(31)); nIRQ(7) <= not (PSEUDO_BUS_ERROR and INT_ENA_q(31));
@@ -5127,18 +5131,19 @@ begin
-- # FB_ADR[19..4]==H"F890" -- DMA SOUND -- # FB_ADR[19..4]==H"F890" -- DMA SOUND
-- # FB_ADR[19..4]==H"F891" -- DMA SOUND -- # FB_ADR[19..4]==H"F891" -- DMA SOUND
-- # FB_ADR[19..4]==H"F892" -- DMA SOUND -- # FB_ADR[19..4]==H"F892" -- DMA SOUND
PSEUDO_BUS_ERROR <= (not nFB_CS1) and (to_std_logic(FB_ADR(19 downto 4) = PSEUDO_BUS_ERROR <= (not nFB_CS1) and (to_std_logic(FB_ADR(19 downto 4) = "1111100011001000" or
"1111100011001000" or FB_ADR(19 downto 4) = "1111100011100000" or FB_ADR(19 downto 4) = "1111100011100000" or
FB_ADR(19 downto 4) = "1111111110101000" or FB_ADR(19 downto 4) = FB_ADR(19 downto 4) = "1111111110101000" or
"1111111110101001" or FB_ADR(19 downto 4) = "1111111110101010" or FB_ADR(19 downto 4) = "1111111110101001" or
FB_ADR(19 downto 4) = "1111111110101000" or FB_ADR(19 downto 8) = FB_ADR(19 downto 4) = "1111111110101010" or
"111110000111" or FB_ADR(19 downto 4) = "1111111111000010" or FB_ADR(19 downto 4) = "1111111110101000" or
FB_ADR(19 downto 8) = "111110000111" or
FB_ADR(19 downto 4) = "1111111111000010" or
FB_ADR(19 downto 4) = "1111111111000011")); FB_ADR(19 downto 4) = "1111111111000011"));
-- if VIDEO ADR CHANGE -- if VIDEO ADR CHANGE
-- WRITE VIDEO BASE ADR HIGH 0xFFFF8201/2 -- WRITE VIDEO BASE ADR HIGH 0xFFFF8201/2
TIN0 <= to_std_logic(((not nFB_CS1)='1') and FB_ADR(19 downto 1) = TIN0 <= to_std_logic(((not nFB_CS1)='1') and FB_ADR(19 downto 1) = "1111100000100000000") and (not nFB_WR);
"1111100000100000000") and (not nFB_WR);
-- INTERRUPT LATCH -- INTERRUPT LATCH
INT_L0_clk_ctrl <= MAIN_CLK; INT_L0_clk_ctrl <= MAIN_CLK;
@@ -5166,15 +5171,11 @@ begin
INT_LATCH_d <= "11111111111111111111111111111111"; INT_LATCH_d <= "11111111111111111111111111111111";
INT_LATCH_clrn <= (not INT_CLEAR_q) and sizeIt(nRSTO,32); INT_LATCH_clrn <= (not INT_CLEAR_q) and sizeIt(nRSTO,32);
INT_LA0_0_clrn_ctrl <= INT_ENA_q(0) and nRSTO; INT_LA0_0_clrn_ctrl <= INT_ENA_q(0) and nRSTO;
INT_LA0_d <= ((std_logic_vector'(unsigned(INT_LA0_q) + unsigned'("0001"))) INT_LA0_d <= ((std_logic_vector'(unsigned(INT_LA0_q) + unsigned'("0001"))) and sizeIt(INT_L_q(0),4) and sizeIt(to_std_logic((unsigned(INT_LA0_q)
and sizeIt(INT_L_q(0),4) and sizeIt(to_std_logic((unsigned(INT_LA0_q) < unsigned'("0111"))),4)) or ((std_logic_vector'(unsigned(INT_LA0_q) - unsigned'("0001"))) and sizeIt(not INT_L_q(0),4) and
< unsigned'("0111"))),4)) or ((std_logic_vector'(unsigned(INT_LA0_q) -
unsigned'("0001"))) and sizeIt(not INT_L_q(0),4) and
sizeIt(to_std_logic((unsigned(INT_LA0_q) > unsigned'("1000"))),4)) or sizeIt(to_std_logic((unsigned(INT_LA0_q) > unsigned'("1000"))),4)) or
("1111" and sizeIt(INT_L_q(0),4) and ("1111" and sizeIt(INT_L_q(0),4) and sizeIt(to_std_logic((unsigned(INT_LA0_q) > unsigned'("0110"))),4)) or
sizeIt(to_std_logic((unsigned(INT_LA0_q) > unsigned'("0110"))),4)) or ("0000" and sizeIt(not INT_L_q(0),4) and sizeIt(to_std_logic((unsigned(INT_LA0_q) < unsigned'("1001"))),4));
("0000" and sizeIt(not INT_L_q(0),4) and
sizeIt(to_std_logic((unsigned(INT_LA0_q) < unsigned'("1001"))),4));
INT_LATCH0_clk_1 <= INT_LA0_q(3); INT_LATCH0_clk_1 <= INT_LA0_q(3);
INT_LA1_0_clrn_ctrl <= INT_ENA_q(1) and nRSTO; INT_LA1_0_clrn_ctrl <= INT_ENA_q(1) and nRSTO;
INT_LA1_d <= ((std_logic_vector'(unsigned(INT_LA1_q) + unsigned'("0001"))) INT_LA1_d <= ((std_logic_vector'(unsigned(INT_LA1_q) + unsigned'("0001")))
@@ -5187,6 +5188,7 @@ begin
("0000" and sizeIt(not INT_L_q(1),4) and ("0000" and sizeIt(not INT_L_q(1),4) and
sizeIt(to_std_logic((unsigned(INT_LA1_q) < unsigned'("1001"))),4)); sizeIt(to_std_logic((unsigned(INT_LA1_q) < unsigned'("1001"))),4));
INT_LATCH1_clk_1 <= INT_LA1_q(3); INT_LATCH1_clk_1 <= INT_LA1_q(3);
INT_LA2_0_clrn_ctrl <= INT_ENA_q(2) and nRSTO; INT_LA2_0_clrn_ctrl <= INT_ENA_q(2) and nRSTO;
INT_LA2_d <= ((std_logic_vector'(unsigned(INT_LA2_q) + unsigned'("0001"))) INT_LA2_d <= ((std_logic_vector'(unsigned(INT_LA2_q) + unsigned'("0001")))
and sizeIt(INT_L_q(2),4) and sizeIt(to_std_logic((unsigned(INT_LA2_q) and sizeIt(INT_L_q(2),4) and sizeIt(to_std_logic((unsigned(INT_LA2_q)
@@ -5197,6 +5199,7 @@ begin
sizeIt(to_std_logic((unsigned(INT_LA2_q) > unsigned'("0110"))),4)) or sizeIt(to_std_logic((unsigned(INT_LA2_q) > unsigned'("0110"))),4)) or
("0000" and sizeIt(not INT_L_q(2),4) and ("0000" and sizeIt(not INT_L_q(2),4) and
sizeIt(to_std_logic((unsigned(INT_LA2_q) < unsigned'("1001"))),4)); sizeIt(to_std_logic((unsigned(INT_LA2_q) < unsigned'("1001"))),4));
INT_LATCH2_clk_1 <= INT_LA2_q(3); INT_LATCH2_clk_1 <= INT_LA2_q(3);
INT_LA3_0_clrn_ctrl <= INT_ENA_q(3) and nRSTO; INT_LA3_0_clrn_ctrl <= INT_ENA_q(3) and nRSTO;
INT_LA3_d <= ((std_logic_vector'(unsigned(INT_LA3_q) + unsigned'("0001"))) INT_LA3_d <= ((std_logic_vector'(unsigned(INT_LA3_q) + unsigned'("0001")))