Changes between Initial Version and Version 1 of Component/Vci Chbuf Dma


Ignore:
Timestamp:
Jan 13, 2015, 10:36:24 AM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Component/Vci Chbuf Dma

    v1 v1  
     1[wiki:Component SocLib Components General Index]
     2
     3= !VciChbufDma =
     4
     5== 1) Functional Description ==
     6
     7As the !VciDma component, this component  moves data from
     8a source memory buffer to a destination memory buffer.
     9It is both a target and an initiator.
     10 * It is addressed as a target to be configured for a transfer.
     11 * It is acting as an initiator to do the transfer.
     12
     13The !VciMultiDma component supports up to 8 simultaneous DMA transfers,
     14corresponding to 8 independant DMA channels. As there is only one VCI initiator port, the general arbitration policy between the active channels is round-robin.
     15
     16The number of channels (CHANNELS) and the burst length (MAX_BURST_LENGTH) are constructor parameters. The burst length parameter must be multiple of 4 bytes.
     17
     18This component makes the assumption that the VCI RDATA & WDATA fiels have 32 bits.
     19The source buffer base address, the destination buffer base address and the buffer length
     20mus be multiple of 4 bytes. The buffer length is not constrained to be a multiple of
     21the burst length.
     22
     23Each channel has its own set of memory mapped registers, and for each
     24channel a specific IRQ can be optionally asserted when transfer is completed.
     25
     26Each channel k has 5 memory-mapped registers :
     27
     28 * '''DMA_SRC[k]''' (Read / Write)
     29It defines the physical address of the source buffer.
     30
     31 * '''DMA_DST[k]''' (Read / Write)
     32It defines the physical address of the destination buffer.
     33
     34 * '''DMA_LEN[k]''' (Read / Write)
     35A write access defines the length of the transfer (in bytes), and starts the transfer.
     36A read access returns the DMA channel status. The relevant values for the status are:
     37   || Cnannel Status || Value ||
     38   ||DMA_IDLE        ||  2    ||
     39   ||DMA_SUCCESS     ||  0    ||
     40   ||DMA_READ_ERROR  ||  1    ||
     41   ||DMA_WRITE_ERROR ||  3    ||
     42   ||DMA_BUSY        ||  >3   ||
     43
     44 * '''DMA_RESET[k]''' (Write-only)
     45Writing any value into this pseudo-register makes a clean re-initialisation of the DMA coprocessor:
     46The on-going VCI transaction is completed before the coprocessor returns the IDLE state.
     47This write access must be used by the software ISR to aknowledge the DMA IRQ.
     48
     49 * '''DMA_IRQ_DISABLED[k]''' (Read / Write)
     50A non zero value disables the IRQ line. The RESET value is zero.
     51
     52In order to support various protection mechanisms, each channel akes 4K bytes in the address space. The segment size is 32 K bytes, and the segment associated to this peripheral must be aligned on a 32K bytes boundary. Only 8 address bits are decoded :
     53 * The five bits ADDRESS[4:0] define the target register.
     54 * The three bits ADDRESS[14:12] define the channel index.
     55
     56For extensibility issues, you should access the DMA using globally-defined offsets, and
     57you should include file `soclib/dma.h` in your software, it
     58defines `DMA_SRC`, `DMA_DST`, `DMA_LEN`, `DMA_RESET`, `DMA_IRQ_DISABLED`.
     59
     60This hardware component checks for segmentation violation, and can be used
     61as a default target.
     62
     63== 2) Component definition & usage ==
     64
     65source:trunk/soclib/soclib/module/infrastructure_component/dma_infrastructure/vci_chbuf_dma/caba/metadata/vci_chbuf_dma.sd
     66
     67See [wiki:SoclibCc/VciParameters SoclibCc/VciParameters]
     68{{{
     69Uses( 'vci_chbuf_dma' )
     70}}}
     71
     72== 3) CABA  Implementation ==
     73
     74=== CABA sources ===
     75 
     76 * interface : source:trunk/soclib/soclib/module/infrastructure_component/dma_infrastructure/vci_chbuf_dma/caba/source/include/vci_chbuf_dma.h
     77 * implementation : source:trunk/soclib/soclib/module/infrastructure_component/dma_infrastructure/vci_chbuf_dma/caba/source/src/vci_chbuf_dma.cpp
     78
     79=== CABA Constructor parameters ===
     80{{{
     81VciChbufDma(
     82     sc_module_name name,   //  Component Name
     83     const soclib::common::MappingTable &mt,   // MappingTable
     84     const soclib::common::IntTab &srcid,  // Initiator index
     85     const soclib::common::IntTab &tgtid,  // Target index
     86     const size_t burst_max_length,   //  Max number of bytes transfered in a burst
     87     const size_t channels );  // Number of channels
     88}}}
     89
     90===  CABA Ports ===
     91
     92 * '''p_resetn''' : Global system reset
     93 * '''p_clk''' : Global system clock
     94 * '''p_vci_target''' : The VCI target port
     95 * '''p_vci_initiator''' : The VCI initiator port
     96 * '''p_irq[k]''' : As many output IRQ ports as the number of channels
     97
     98== 4) TLM-DT implementation ==
     99
     100The TLM-DT implementation is not available yet.