49 | | On the coprocessor side, it provides TO_COPROC or FROM_COPROC ports, that implement FIFO interfaces. Coprocessor can request to transfer one or several bursts of 32 bits words on a TO_COPROC or FROM_COPROC port, without address. The burst size (generally a cache line), the number of TO_COPROC and FROM_COPROC ports, and the number of bursts for a given port are hardware parameters, depending on the coprocessor type. Each port define a private communication channel between the coprocessor and a user memory buffer. The total number of channels cannot be larger than 16. A channel is identified by an index, and the TO_COPROC channels have the smallest indexes. |
50 | | |
51 | | The '''vci_mwmr_dma''' component implements two transfer modes that can be configured by the user application through dedicate system calls. |
52 | | The user application must use the ''giet_coproc_alloc()'' system call to get a private hardware coprocessor. Then it must use the ''giet_coproc_channel_init()'' system call to configure the TO_COPROC/FROM_COPROC channels. |
53 | | The coprocessor and the communication channels are activated by the ''giet_coproc_run()'' system call. |
| 49 | The '''vci_mwmr_dma''' component provide to coprocessor a variable number of TO_COPROC or FROM_COPROC ports, that implement FIFO interfaces. Coprocessor can request to transfer one or several bursts of 32 bits words, without address. The burst size (generally a cache line), the number of TO_COPROC and FROM_COPROC ports, and the number of bursts for a given port are hardware parameters, depending on the coprocessor type. Each port define a private communication channel between the coprocessor and a user memory buffer. The total number of channels cannot be larger than 16. A channel is identified by an index, and the TO_COPROC channels have the smallest indexes. |
| 50 | |
| 51 | The '''vci_mwmr_dma''' component implements two transfer modes that can be defined by the user application through dedicate system calls. |
| 52 | The user application must use the ''giet_coproc_alloc()'' system call to get a private hardware coprocessor. Then it must use the ''giet_coproc_channel_init()'' system call to configure the TO_COPROC/FROM_COPROC channels. Finally, the coprocessor and the communication channels are activated by the ''giet_coproc_run()'' system call. |
55 | | * In '''MODE_DMA_IRQ''' or '''MODE_DMA_NO_IRQ''', each channel FSM transfers a single buffer between one coprocessor port and the memory, and keep blocked when the transfer is completed. In both DMA modes, the user application must use the ''giet_coproc_completed()'' system call to detect global completion and report the possible addressing errors. |
56 | | - In '''MODE_DMA_IRQ''', the calling task is descheduled, after coprocessor activation, in the ''giet_coproc_run()'' system call. It is rescheduled by the MWR IRQ signaling the global completion. |
57 | | - In '''MODE_DMA_NO_IRQ''', the ''giet_coproc_run()'' system call returns after coprocessor activation, and the ''giet_coproc_completed()'' system call uses a polling to detect completion and report errors. |
| 54 | * In '''MODE_DMA_IRQ''' or '''MODE_DMA_NO_IRQ''', each channel FSM transfers a single buffer between one coprocessor port and the memory, and keep blocked when the transfer is completed. |
| 55 | - In '''MODE_DMA_IRQ''', the calling task is descheduled, after coprocessor activation, in the ''giet_coproc_run()'' system call. It is rescheduled by the MWR IRQ signaling the global completion. The _mwr_isr() scan all channels status registers to report possible addressing errors, and reset the communication channels. |
| 56 | - In '''MODE_DMA_NO_IRQ''', the ''giet_coproc_run()'' system call returns after coprocessor activation, and the user application must use the blocking ''giet_coproc_completed()'' system call that directly scan the channels registers to detect completion, report errors, and reset the channels. |