Version 2 (modified by 10 years ago) (diff) | ,
---|
GIET_VM / PIC Driver
The pic_driver.c and pic_driver.h files define the PIC driver.
The vci_pic component is a multi-channels interrupt controller, available in the SoCLib components library. This component translate an hardware interrupt generated by an external peripheral (HWI) to a write-triggered interrupt (WTI) that will be sent to an internal vci_xcu in a given cluster. The PIC component is therefore an external, non replicated peripheral.
The virtual base address of the segment associated to the component is:
vbase = SEG_PIC_BASE + cluster_io << 32
The SEG_PIC_BASE value must be defined in the hard_config.h file.
The addressable registers map is defined here.
void _pic_set_register( unsigned int channel, unsigned int index, unsigned int value )
This low level function set a new value in register (channel / index).
unsigned int _pic_get_register( unsigned int channel, unsigned int index )
This low level function returns the value of register (channel / index).
void _pic_init( unsigned int channel, unsigned int vaddr, unsigned int extend )
This function initializes the XICU target physical address (vaddr + extend) corresponding to a given HWI channel.
- channel : source PIC HWI channel
- vaddr : virtual address of the destination XCU register
- extend : cluster_xy for the destination XCU
unsigned int _pic_get_status( unsigned int channel )
This function returns the status of a given HWI channel.