-------------------------------------------------------
- process (PCI_CLOCK)
- begin
- if (PCI_CLOCK'event and PCI_CLOCK ='1') then
-
- -- THIS IS BROKEN (it cycles the interrupt)
- SIG_TAST_Q <= not (TAST_SETn and SIG_TAST_Qn);
- SIG_TAST_Qn <= not (TAST_RESn and SIG_TAST_Q);
-
- end if;
- end process;
-
-------------------------------------------------------
-
- process (PCI_CLOCK)
- begin
- if (PCI_RSTn = '0') then
- SET <= "00000000";
- FF_A <= "00000000";
- FF_B <= "00000000";
-
- elsif(PCI_CLOCK'event and PCI_CLOCK = '1') then
- if(RESET = '1') then
- SET <= "00000000";
- FF_A <= "00000000";
- FF_B <= "00000000";
- else
-
- FF_A(0) <= INT_IN_0 ; -- Receive FIFO Empty Flag
-
- FF_A(1) <= INT_IN_1 ; -- Send FIFO Half Full
- FF_A(2) <= INT_IN_2 ;
- FF_A(3) <= INT_IN_3 ;
-
- FF_A(4) <= INT_IN_4 ;
-
- FF_A(5) <= INT_IN_5 ;
- FF_A(6) <= INT_IN_6 ;
- FF_A(7) <= INT_IN_7 ;
-
- FF_B <= FF_A ;
-
- SET <= FF_A AND not FF_B;
- end if;
- end if;
- end process;
-
- process (PCI_CLOCK,PCI_RSTn)
- begin
- if (PCI_RSTn = '0') then
- REG <= "00000000";
-
- elsif(PCI_CLOCK'event and PCI_CLOCK = '1') then
- if(RESET = '1') then
- REG <= "00000000";
-
- -- elsif(SIG_TAST_Q = '1') then
- -- REG <= "00000000" or SET;
-
-
- elsif (TRDYn = '0' AND READ_XX5_4 = '1') then
- REG <= (REG AND NOT INT_RES) OR SET;
- else
- REG <= REG OR SET;
- end if;
- end if;
- end process;
-
- SIG_PROPAGATE_INT <=
- (REG(0) AND INT_MASKE(0))
- OR (REG(1) AND INT_MASKE(1))
- OR (REG(2) AND INT_MASKE(2))
- OR (REG(3) AND INT_MASKE(3))
- OR (REG(4) AND INT_MASKE(4))
- OR (REG(5) AND INT_MASKE(5))
- OR (REG(6) AND INT_MASKE(6))
- OR (REG(7) AND INT_MASKE(7));
-
- process (PCI_CLOCK)
- begin
- if(PCI_CLOCK'event and PCI_CLOCK = '1') then
- SIG_PROPAGATE_INT_SECOND <= not SIG_PROPAGATE_INT;
- end if;
- end process;
-
-
- INTAn <= not SIG_PROPAGATE_INT_SECOND;
- PCI_INTAn <= '0' when SIG_PROPAGATE_INT_SECOND = '0' else 'Z';
-
- INT_REG <= REG;
+ ------------------------------------------------------
+ process (PCI_CLOCK)
+ begin
+ if (PCI_CLOCK'event and PCI_CLOCK ='1') then
+
+ -- THIS IS BROKEN (it cycles the interrupt)
+ SIG_TAST_Q <= not (TAST_SETn and SIG_TAST_Qn);
+ SIG_TAST_Qn <= not (TAST_RESn and SIG_TAST_Q);
+
+ end if;
+ end process;
+
+ ------------------------------------------------------
+
+ process (PCI_CLOCK)
+ begin
+ if (PCI_RSTn = '0') then
+ SET <= "00000000";
+ FF_A <= "00000000";
+ FF_B <= "00000000";
+
+ elsif (PCI_CLOCK'event and PCI_CLOCK = '1') then
+ if (RESET = '1') then
+ SET <= "00000000";
+ FF_A <= "00000000";
+ FF_B <= "00000000";
+ else
+ FF_A(0) <= INT_IN_0; -- Receive FIFO Empty Flag
+
+ FF_A(1) <= INT_IN_1; -- Send FIFO Half Full
+ FF_A(2) <= INT_IN_2;
+ FF_A(3) <= INT_IN_3;
+
+ FF_A(4) <= INT_IN_4;
+
+ FF_A(5) <= INT_IN_5;
+ FF_A(6) <= INT_IN_6;
+ FF_A(7) <= INT_IN_7;
+
+ FF_B <= FF_A;
+
+ SET <= FF_A AND not FF_B;
+ end if;
+ end if;
+ end process;
+
+ process (PCI_CLOCK,PCI_RSTn)
+ begin
+ if (PCI_RSTn = '0') then
+ REG <= "00000000";
+
+ elsif(PCI_CLOCK'event and PCI_CLOCK = '1') then
+ if(RESET = '1') then
+ REG <= "00000000";
+
+ -- elsif(SIG_TAST_Q = '1') then
+ -- REG <= "00000000" or SET;
+
+ elsif (TRDYn = '0' AND READ_XX5_4 = '1') then
+ REG <= (REG AND NOT INT_RES) OR SET;
+ else
+ REG <= REG OR SET;
+ end if;
+ end if;
+ end process;
+
+ SIG_PROPAGATE_INT <=
+ (REG(0) AND INT_MASKE(0))
+ OR (REG(1) AND INT_MASKE(1))
+ OR (REG(2) AND INT_MASKE(2))
+ OR (REG(3) AND INT_MASKE(3))
+ OR (REG(4) AND INT_MASKE(4))
+ OR (REG(5) AND INT_MASKE(5))
+ OR (REG(6) AND INT_MASKE(6))
+ OR (REG(7) AND INT_MASKE(7));
+
+ process (PCI_CLOCK)
+ begin
+ if(PCI_CLOCK'event and PCI_CLOCK = '1') then
+ SIG_PROPAGATE_INT_SECOND <= not SIG_PROPAGATE_INT;
+ end if;
+ end process;
+
+ INTAn <= not SIG_PROPAGATE_INT_SECOND;
+ PCI_INTAn <= '0' when SIG_PROPAGATE_INT_SECOND = '0' else 'Z';
+ INT_REG <= REG;