MITE RLPM rough draft v0.1 12/31/2020 © National Instruments
21
is accessible through BAR0 of the PCI board. However the rest of the board must be
enabled, before it can be accessed in the BAR1 address space.
1) Get the physical address of BAR1 on the PCI card.
physicalBar1 = get_physical_address_of_PCI_Board( BAR1 )
2) Write address and enable to IO Device Window Base Size Register
Bar0.write32(0xC0, (physicalBar1 & 0xffffff00L) | 0x80);
3) Accesses to BAR1 are now enabled
Interrupts
This example shows how to mask interrupts from the other chips on the PCI/PXI board.
Masking interrupts from other chips allows a developer to create an interrupt service
routine (ISR) that can work with a wide variety of National Instruments boards.
1) Initialize the IO Window. You will need to write to the other chips on the PCI
board to configure them to generate interrupts.
2) Register an ISR with the operating system.
a. The ISR can detect an interrupt from the PCI/PXI board by reading the
CPUINT bit in the Local CPU Interrupt Status 2 register
If (mite->localCpuIntStatus2.readCpuInt() == 1)
PCI board is generating an interrupt
Else
PCI board is not generating an interrupt
b. The ISR can stop the interrupt by writing to the Clr CPU Int IE bit in the
Local CPU Interrupt Mask 2 register. Once a board specific interrupt
handler has identified the cause of the interrupt and the rest of the board is
no longer asserting an interrupt to the MITE, the board specific interrupt
handler should re-enable MITE interrupts as described in step 3.
mite->localCpuIntMask2.writeClrCpuIntIe(1)
3) Enable Mite Interrupts by writing to the Local CPU Interrupt Mask 1 register.
mite->localCpuIntMask2.writeSetCpuIntIe(1)
Normal Mode DMA
//Normal mode transfer