module SspIntGen (
                  TXMIS, 
                  RXMIS, 
                  RORMIS,
                  DataStp,
                  RTIMSync,

                  RORIC,
                  RTIC,
                  RORINTR,
                  RTINTR,
                  INTR
                 );

// Inputs
input  TXMIS;    // Tx FIFO Service request
input  RXMIS;    // Rx FIFO Service request
input  RORMIS;   // Rx FIFO Overrun interrupt
input  DataStp;  // Rx TimeOut interrupt input
input  RTIMSync; // Rx TimeOut Interrupt Mask Sync
input  RORIC;    // Rx FIFO Overrun Clear input
input  RTIC;     // Rx TimeOut Clear input

// Outputs
output RORINTR;  // Rx FIFO Overrun interrupt output
output RTINTR;   // RX TimeOut Masked Interrupt output
output INTR;     // Combined interrupt

// -----------------------------------------------------------------------------
//
//                               SspIntGen
//                               =========
//
// -----------------------------------------------------------------------------
//
// Overview
// ========
//
// The combined interrupt INTR is generated as an OR of the individual 
// interrupt sources RXMIS, TXMIS and RORINTR and RTINTR.
// 
// -----------------------------------------------------------------------------

// -----------------------------------------------------------------------------
// Wire declarations
// -----------------------------------------------------------------------------

// -----------------------------------------------------------------------------
// Register  declarations
// -----------------------------------------------------------------------------

// -----------------------------------------------------------------------------
//
// Main body of code
// =================
//
// -----------------------------------------------------------------------------

// ---------------------------------------------------------------------
// -- When the relevant interrupt clear signal is asserted, the
// -- asynchronous interrupt is cleared.  
// ---------------------------------------------------------------------

assign RTINTR  = DataStp & RTIMSync & ~RTIC;
assign RORINTR = RORMIS  & ~RORIC;

// -----------------------------------------------------------------------------
// OR the individual interrupts to generate INTR
// -----------------------------------------------------------------------------
assign INTR = RXMIS | TXMIS | RORINTR | RTINTR;

endmodule