Changes between Version 6 and Version 7 of pic_driver
- Timestamp:
- Dec 10, 2016, 12:23:29 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pic_driver
v6 v7 8 8 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. 9 9 10 The virtual base address of the segment associated to the component is:11 vbase = SEG_PIC_BASE + cluster_io << 3212 13 10 The SEG_PIC_BASE value must be defined in the hard_config.h file. 14 11 … … 17 14 == __Low level access functions__ == 18 15 19 === void '''_pic_set_register'''( unsigned int channel, unsigned int index, unsigned int value ) === 20 This function set a new value in register identified by (channel / index). 16 === void '''_pic_set_register'''( unsigned int irq_id, unsigned int index, unsigned int value ) === 17 This function set a new value in register identified by (irq_id / index). 18 * '''irq_id''' : input IRQ index. 19 * '''index''' : register offset. 20 * '''value''' : value to be written. 21 21 22 === unsigned int '''_pic_get_register'''( unsigned int channel, unsigned int index ) ===22 === unsigned int '''_pic_get_register'''( unsigned int irq_id, unsigned int index ) === 23 23 This function returns the value of register identified by (channel / index). 24 * '''irq_id''' : input IRQ index. 25 * '''index''' : register offset. 24 26 25 27 == __access functions__ == 26 28 27 === void '''_pic_init'''( unsigned int channel, unsigned int vaddr, unsigned int extend ) ===28 This function initializes and activates a given channel (i.e. a given external IRQ)in the PIC component. It writes an XCU mailbox physical address in the IOPIC_ADDRESS and IOPIC_EXTEND registers, and enables the channel.29 * channel : source PIC HWI channel30 * vaddr: address of the destination XCU register31 * extend: cluster_xy for the destination XCU29 === void '''_pic_init'''( unsigned int irq_id, unsigned int vaddr, unsigned int extend ) === 30 This function initializes and activates a given external IRQ in the PIC component. It writes an XCU mailbox physical address in the IOPIC_ADDRESS and IOPIC_EXTEND registers, and enables the channel. 31 * '''irq_id''' : input IRQ index. 32 * '''vaddr''' : address of the destination XCU register 33 * '''extend''' : cluster_xy for the destination XCU 32 34 33 === void '''_pic_enable'''( unsigned int channel) ===34 This function enables a given channel (i.e a given external IRQ). The associated WTI maibox address is not modified.35 * channel: source PIC HWI channel35 === void '''_pic_enable'''( unsigned int irq_id ) === 36 This function enables a given external IRQ. The associated WTI maibox address is not modified. 37 * '''irq_id''' : source PIC HWI channel 36 38 37 === void '''_pic_disable'''( unsigned int channel) ===38 This function disables a given channel (i.e a given external IRQ). The associated WTI maibox address is not modified.39 * channel: source PIC HWI channel39 === void '''_pic_disable'''( unsigned int irq_id) === 40 This function disables a given given external IRQ. The associated WTI maibox address is not modified. 41 * '''irq_id''' : source PIC HWI channel 40 42 41 === unsigned int '''_pic_get_status'''( unsigned int channel ) === 42 This function returns the status of a given HWI channel. 43 === unsigned int '''_pic_get_status'''( unsigned int irq_id ) === 44 This function returns the status of a given HWI. 45 * '''irq_id''' : source PIC HWI channel