I have a hardware core that needs to be able to generate interrupts for all processors in the system (maximum of two PPC's and two MB's). In the core I have a port defined as:
Preemption_Interrupt : out std_logic_vector(0 to C_NUM_CPUS - 1);
The idea is that the number of interrupt lines in dependent on a user generic (C_NUM_CPUS) which can range from 1-4.
Now the opb_intc in the mhs file:
# ######################################################################################### # ## Interrupt Controller for PPC_0 # ######################################################################################### BEGIN opb_intc PARAMETER INSTANCE = opb_intc_0 PARAMETER HW_VER = 1.00.c PARAMETER C_BASEADDR = 0x41200000 PARAMETER C_HIGHADDR = 0x4120ffff PARAMETER C_NUM_INTR_INPUTS = 4 BUS_INTERFACE SOPB = opb PORT Irq = EICC405EXTINPUTIRQ_0 PORT Intr = RS232_Uart_1_Interrupt & opb_central_dma_0_DMA_Interrupt & access_intr & premt_intr END
BEGIN custom_core PORT Preemption_Interrupt = premt_intr END
The problem is that the PORT Intr sees premt_intr (Preemption_Interrupt from above) as a vector and I need to break out only the first index of this vector. Then, for the second PPC I would have a separate opb_intc that needs only the second index of premt_intr and so on.
Is there a way to do this? I would like to keep it very general as it is now. Can I do something like: PORT Preemption_Interrupt(0) = premt_intr_0 PORT Preemption_Interrupt(1) = premt_intr_1 ....