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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Intel</strong> ® GW80314 I/O <strong>Processor</strong> <strong>DMA</strong> <strong>and</strong> <strong>XOR</strong> <strong>Library</strong><strong>Library</strong>6.1.1 Flow Sequence Description: <strong>XOR</strong> <strong>and</strong> <strong>DMA</strong> <strong>Library</strong>6.1.1.1 Initializationlib_mem_map_malloc()lib_set_xcb_mem_range()lib_new_mgr()lib_init()callintH<strong>and</strong>lerAttach()mpic_setup()Allocates separate memory regions for <strong>XOR</strong> descriptors, <strong>DMA</strong>descriptors <strong>and</strong> Data. Records memory map to data structureMemmap_Typemem_map;Sets xcb bits for address range. This is used in conjunction with globalvariable mem_map to set descriptor <strong>and</strong> data address ranges.Allocates memory for XorDma_80314_Type data structure.Initialize XorDma_80314_Type data structure. The Free Stacks<strong>and</strong> Post Queues are initialized.Chains interrupt h<strong>and</strong>lers lib_irq_h<strong>and</strong>ler() <strong>and</strong> lib_fiq_h<strong>and</strong>ler() intointerrupt vectors.Called to unmask/mask <strong>and</strong> route interrupts for <strong>DMA</strong> <strong>and</strong> <strong>XOR</strong>.6.1.1.2 Requestlib_stack_pop() is called to get a aligned buffer from the Free Stack. The alignment allows thesame buffer to be used as a <strong>DMA</strong> or <strong>XOR</strong> descriptor.In the case of an append, the descriptor values are written. Then, when the cache policy for thememory region used by the descriptors is either 010, 011 or 111 (caches on), the descriptor needsto be flushed to RAM using a macro. Function lib_postq_append_resume_sram() orlib_postq_append_resume_sdram() are called to append the descriptor to the channel descriptord chain, place in post queue, records to global variable chainTail<strong>XOR</strong><strong>DMA</strong>[], then sets resume tostart the transaction.6.1.1.3 Post Transaction CleanupAt some point descriptors for completed transactions must be reclaimed from the Post Queues <strong>and</strong>returned to the Free Stack (when append is used). This is accomplished by calling lib_reclaim().<strong>APIs</strong> <strong>and</strong> Testbench White Paper 23

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

Saved successfully!

Ooh no, something went wrong!