12.07.2015 Views

Intel(R) IQ80315 I/O Processor DMA and XOR Library APIs and ...

Intel(R) IQ80315 I/O Processor DMA and XOR Library APIs and ...

Intel(R) IQ80315 I/O Processor DMA and XOR Library APIs and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Intel</strong> ® GW80314 I/O <strong>Processor</strong> <strong>DMA</strong> <strong>and</strong> <strong>XOR</strong> <strong>Library</strong><strong>Library</strong> Function PrototypesE.2.3void lib_init(XorDma_80314_Type * mgrt,void * desc_baseaddr)ItemDescriptionPrototype void lib_init(XorDma_80314_Type * mgrt, void * desc_baseaddr);InputOutputPurposeOperationmgrt - pointer to XorDma_80314_Type allocated by lib_new_mgr().desc_baseaddr - Base address of memory region to be used by <strong>DMA</strong>/<strong>XOR</strong> descriptorsNoneTo take memory address allocated for <strong>DMA</strong>/<strong>XOR</strong> buffers <strong>and</strong> initialize stack <strong>and</strong> queues.After this function call <strong>DMA</strong>/<strong>XOR</strong> stacks <strong>and</strong> queues are initialized <strong>and</strong> <strong>DMA</strong>/<strong>XOR</strong> Section ofthe <strong>Library</strong> is read for use.• Initialize <strong>DMA</strong>/<strong>XOR</strong> free stacks• Initialize channel 0, 1, 3 <strong>and</strong> 4 post queues• Execute dummy descriptors for four channels to enable appends. The initializechainHead<strong>DMA</strong><strong>XOR</strong>[channel] <strong>and</strong> chainTail<strong>DMA</strong><strong>XOR</strong>[channel] to allow append/resume.E.2.4void lib_free_mgr(XorDma_80314_Type * mgr)ItemDescriptionPrototype void lib_free_mgr(XorDma_80314_Type * mgr);InputOutputPurposeOperationPointer to XorDma_80314_Type data structure to freeNoneFrees all memory associated with XorDma_80314_Type <strong>and</strong> sets to NULL.Frees all memory associated with XorDma_80314_Type <strong>and</strong> sets to NULL.E.2.5void * lib_stack_pop(XorDma_80314_Type * mgr,enum CHANNEL channel)ItemDescriptionPrototype void * lib_stack_pop(XorDma_80314_Type * mgr, enum CHANNEL channel)InputOutputPurposeOperationXorDma_80314_Type being used)Engine: either Channel 0, 1, 2 or 3Pointer to Frame when successful or NULL when stack emptyTo provide a <strong>DMA</strong> or <strong>XOR</strong> frame from a free stack. When a cacheable memory regions isused for descriptors, using stack increases the likelihood that stack is still in cache.Gets <strong>DMA</strong>/<strong>XOR</strong> frame from the top of the channel specific Free stack <strong>and</strong> changes stackstate to reflect removal.72 <strong>APIs</strong> <strong>and</strong> Testbench White Paper

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!