Home
PCIe DMA (ConfigFPGA design) User Manual
Contents
1. re read time in milliseconds 10 DMA enable 11 DMA clear 12 DMA Demand Mode enable 0 Poll Immediate 31 0 Current Read Address 31 0 Current Execute Address 9 0 Descriptor FIFO empty count 16 Test Bit DMAO only Upper 32 bits of Base Address 63 0 to form a 64 bit address Set to 0 if using 32 bit addressing Address mask to indicate size of Descriptor list Set some number of consecutive lower bits to 1 Set to the size of the list in bytes minus 1 For example for an 8KB descriptor list set this to 8K 1 0x01FFF Re read time is the time between checks for a valid bit in the next descriptor in the list This value cannot be set to 0 If software tries to set this to zero it will be set to one Default value is 1 DMA enable enables the DMA engine DMA clear clears the DMA engine resetting the address counters to the base address and clearing any running transactions Software must set this back to zero to bring the DMA engine out of reset DMA Demand Mode enables the User FPGA to initiate to host and from host DMA transfers Writing a to this register causes the DMA engine to fetch the next descriptor from the host immediately and not wait for the re read timer to expire DEBUG INFO ONLY The lower 32 bits of the current address being read or the next address that will be read DEBUG INFO ONLY The lower 32 bits of the address of the descriptor currently being worked on
2. bus NMB is a high speed LVDS SERDES point to point bus for communication between the config FPGA and the user FPGAs NMB is not shared with configuration signals NMB uses 10 signals 8 bit data 1 bit control 1 source synchronous clock in each direction with a maximum speed of 1 Gbps per signal for a total data throughput of 8Gbps in each direction full duplex Each user FPGA has its own independent NMB bus Figure 3 NMB Bus NMBO configFPGA User FPGA A NMB1 User FPGA B NMBx User FPGA X 1 2 2 2 DDR PCle Interface The PCIe DDR bus is a 64 bit data 13 bit control source synchronous clock DDR bus Because of the high pin count there is usually only one of these busses attached to the configFPGA and it is commonly combined with SFB interfaces on Dinigroup boards The PCIe DDR bus will run 100Mhz for a total data throughput of 6 4 Gbps in each direction full duplex Figure 4 PCIe DDR Bus configF PGA PCle DDR User FPGA 1 2 2 3 SFB Interface The SFB bus is a 8 bit data 4 bit control global clock bus that shares its signals with the SelectMAP configuration bus Because of its low pin count it is ideal to combine with the PCIe DDR bus on Dinigroup boards Multiple FPGAs can be connected to a single SFB bus but communication is half duplex and so only one FPGA may communicate on the bus at a time The SFB bus will run 60MHz for a total data thro
3. in target_read_be 7 0 may be ignored 12 3 Reads have side effects at byte boundaries If your design requires that you access certain bytes within a dword without accessing other bytes in the same dword then you may use the byte enables in target_read_be 7 0 to mask the read The byte enables are always quadword aligned so the 64 bit backend can ignore address bit 2 and return the bytes indicated by target_read_be 7 0 The 32 bit backend must still operate as specified in case 2 above but in addition should use the appropriate bits from target_read_be 7 0 to retrieve only the requested bytes If the address ends in O then target_read_be 3 0 should be used If the address ends in 4 then target_read_be 7 4 should be used and requested data should be returned in the upper half of target_read_data 63 0 If the address ends in O and target_read_ctrl 0 is set then both dwords must be accessed and the bytes specified in target_read_be 7 0 should be returned Target_read_ctrl 0 will never be set if the address ends in 4 3 2 An Overview of DMA DMA engines move data DMA is a method of moving data without using a CPU to do the reads and writes It also allows for bursting of data which is usually not possible with CPU reads and writes A DMA engines uses descriptors to tell it what to do A descriptor contains a length source address and destination address It generally also contains flags status to do different variants of data transfe
4. runs on the host PC to communicate with the Marvell via PCIe USB or Ethernet For more information please see the EMU and DiniCMOS documentation Figure 1 Marvell based Board Configuration figFPGA Marvell PCle x4 commoner USB PCle x4 Ethernet PCle Fingers On non Marvell boards and additionally on Marvell based boards with alternate configuration options the configFPGA is connected directly to the PCIe fingers and its BAR space and DMA engines are directly accessible from the host PC For more information please see the AETest documentation Figure 2 Non Marvell based Board Configuration configFPGA PCle x4 PCle Fingers The protocol for interfacing to the configFPGA is identical in theory and very similar in implementation between the two configurations Please see the Quickstart PCIe Guide for more details about the host interface to the configFPGA 1 2 2 ConfigFPGA FPGA Interface The manner in which the configFPGA connects to the field user FPGAs varies depending on the specific Dinigroup board A summary of interfaces on each board is found below Table 2 List of Interfaces by Board Board NMB Interfaces DDR PCle Interfaces SFB Interfaces DNBFC_S12_PCIE DNDUALV6_PCIE4 DNV6_F2PCIE 1 2 A A NAME ANA DNV F6PCIE A PO E O f Rk DN2076K10 po a l 1 2 2 1 NMB Interface The most common bus architecture for the Marvell based boards uses the NMB
5. 2 bits of the address 0x01000000 3 Write to BARO host_memory_address 0x104 BAR4 LOADDR register the value of the lower 32 bits of the address that fall outside the maximum size of the BAR In this case BAR4 size is 16MB and so 0x02XXXXXX needs to be written By default BAR4 s LOADDR_MASK is set to OxFFO00000 4 The BAR4 window is now set up and is pointing to 0x01000000_02000000 Map host memory address for BAR4 in host software 5 Write to BAR4 host_memory_address 0x5678 the desired value for board address 0x01000000_02005678 Figure 6 Address Translation from Host Memory to Board Address Host Memory configF PGA User FPGA BARO 0xd1c00000 Host_memory_addr offset BARO BAR1 BAR1_HIADDR BAR1_LOADDR 8 BAR1_LOADDR_MASK 0xd1800000 Host_memory_addr offset offset BAR2 BAR2_HIADDR BAR2_LOADDR 8 BAR2_LOADDR_MASK A nl E 0xd1000000 Host_memory_addr offset oiai BAR4 0xd0000000 Host_memory_addr offset BAR4_HIADDR BAR4_LOADDR 8 BAR4_LOADDR_MASK offset 10 2 2 Board Address Map Each Dinigroup board will have a unique address map depending on the type and number of interfaces attached to the configFPGA The top 8 bits of the 64 bit address are used to decode the interfaces For the NMB and PCIe DDR interfaces there is one FPGA per interface and that FPGA has full access to the next 56 bits of address On the SFB interface the second 8 bits are used for an FPGA decode as ther
6. 31 0 Timeout Timeout Counter 0x154 R Interface 5 31 0 Timeout Timeout Counter 0x158 R Interface 6 31 0 Timeout Timeout Counter Ox15CR Interface 7 31 0 Timeout Timeout Counter 0x100 Block RAM 31 0 Block RAM Read Write scratch pad space 0x7FC R W data 19 3 6 DMA Descriptor Format Table 4 Descriptor Format Dword Bit Number Number NET Description Bit indicating if the descriptor is valid Software sets this to 1 when the descriptor is ready to be processed Other dwords of the descriptor written memory pointed to by PCI Address available Hardware clears this to O when the descriptor has been processed completely Software may not modify ANYTHING in the descriptor once the valid bit has been set to Valid 1 0 From_Host Move data from PCI Address to Board Address 1 To_Host Move data from Board Address to PCI B Direction Address If 1 hardware will interrupt software once this descriptor has been processed completely Bit is MSN Interrupt ignored when Set Registers Type is 1 To_host and From_host can have different high bits Set Registers Type of the board address Reserved unused undefined Set to O for future 27 zs RSVD backward compatibility When set User returned more data than expected Status bit set by Hardware To Host direction only indicates user FPGA OS this is end of the data MA Complete for this transfer Valid values are 4 bytes value of 1 to 64M
7. 4 bytes This length must indicate a contiguous block of memory in PCI address space and user address 23 0 Byte Length 25 2 space Byte Address to read or write from on the board user side address space When bit 28 is asserted this is 31 0 Board Address 31 0 the upper 32 bits of a 64 bit board byte address Physical address to read or write data in host memory Note that the data must be address 31 0 PCI Address 31 2 00 contiguous for this entire transfer A E Upper 32 bits of PCI physical Address If software is 31 0 PCI Address 63 32 using 32 bit addressing this must be set to 0 Set to 1 to set High Bits of Board Address Does not transfer any data Used to access more than 16 GB of memory space on the user side This sets distinct registers depending on the value of the Direction Bit 20 4 User Interface This section describes the pcie_interface v module and related logic 4 1 Pin Details The user should use the reference design supplied by Dinigroup to handle pin assignments clocks resets and other required functions The user should never have to look at the FPGA to FPGA signals IO modules are provided that attach to the user interface module The following data is informational only and subject to change 4 1 1 NMB Physical Signals On Marvell based boards each NMB bus is guaranteed to have clock capable pins on pairs 18 and 19 Pair 18 is used as a source synchronous clock for data sent from
8. 7_0718 Design Type Possible values are Full 0x4675_6C6C or Type DMEG 0x444D_4547 Ox00C RW Reset Control 0 BARO Reset BARO Reset is a user controllable active reset that will cause User Reset to be asserted User 1 User Reset f Reset is a read only signal that is asserted either 2 TRN Reset by BARO Reset or when internal clocks are not ready User Reset will reset all user interface modules TRN Reset is a read only signal that is asserted by the Xilinx PCIe core while the PCIe core is not ready for transactions 0x018RW LED Control 7 0 LED out 7 0 Bits 15 0 and 25 24 are R W Bits 23 16 15 8 LED en 7 0 and 26 are read only 23 16 LED in 7 0 24 LED out 8 LEP order pcie_debug_led 3 0 yellow_activity red_los PALEED en green_link8 green_link4 green_link1 26 LED in 8 0x020 R W DMAO Base 31 12 Base Lower 32 bit byte address of physical address in AddressO Address host memory where the DMAO descriptor chain 11 01 0x000 starts This address must have the lower bytes ps cleared to match the DMAO Address Mask register 15 0x024 RW 0x028 RW 0x02C RW 0x030 W 0x034 R 0x038 R 0x03C R 0x040 Repeat for 0x05C DMA1 DMAO Base Address DMAO Address Mask DMAO Control DMAO Poll Immediate DMAO Read Address DMAO Execute Address DMAO Descriptor FIFO Info 31 0 Base Address 19 12 Address Mask 11 0 OxFFF 9 0
9. Because of multiple reads pending we could have subsequent descriptors also being worked on at the same time DEBUG INFO ONLY Number of elements qwords in the descriptor FIFO Note there could be more descriptors still pending in the system that have already been read out of this FIFO Test Bit should be 1 in normal operation 16 0x060 Repeat for 0x07C DMA2 0x080 R TRN Clock Counter 0x084 R Internal Clock Counter 0x088 R User Clock Counter 31 0 Clock Counter 31 0 Clock Counter 31 0 Clock Counter Counter for clock from Xilinx Block Plus Core on TRN interface Counter for clock to internal DMA engines TLP state machine etc Counter for clocks to the user interfaces OxCO TRN Debug Subject to Change DEBUG INFO ONLY Contact Dinigroup for Status access to debug information OxC4 DMA Debug Status OxC8 User BAR Debug Status Subject to Change Subject to Change DEBUG INFO ONLY Contact Dinigroup for access to debug information DEBUG INFO ONLY Contact Dinigroup for access to debug information OxCC User DMA Subject to Change DEBUG INFO ONLY Contact Dinigroup for Debug Status access to debug information l 0 DMAO To Host Interrupt 1 DMAO From Host Interrupt 2 DMA1 To Host Interrupt 3 DMA1 From Host Interrupt 4 DMAO Going Idle 5 DMA1 Going Idle 6 DMA2 Going Idle 7 DMA2 To Host Interrupt 8 DMA2 From Host Interrupt In Legacy Interru
10. LP packets with the length field set to gt 2 are not supported Dword reads may be unaligned only if the resulting transfer does not cross a quadword boundary This means that a dword read may start at address 2 but not at address 6 If a dword read is not aligned i e it crosses a dword boundary or if an aligned quadword was requested then the signal target_read_ctrl 0 is set In this case the user must return both dwords and target_read_data_ctrl 0 must be set when target_read_data_valid is enabled with the return data Return data returned in target_read_data 63 0 is expected to ALWAYS be quadword aligned regardless of what address is presented on target_address 63 0 This means that if you get a dword read i e target_read_data_ctrl 0 is zero and the address is 4 then you should return the dword from address 4 in the UPPER 32 BITS of the return data and the lower 32 bits is don t care This is a little clumsy for a 32 bit backend but makes sense if your backend is actually 64 bit in which case you should ignore address bit 2 3 1 2 Target Read Byte Enables If your backend is not prefetchable reads have side effects then you can use target_read_be 7 0 in order to access only the requested bytes in a transfer The byte enables presented are always quadword aligned so if the address is 4 and the byte enables are 0x30 this means that two bytes from address 4 should be returned in target_read_data 47 32 and the rest of target_
11. PCIe DMA ConfigFPGA Design User Interface Manual 5 12 2011 Rev 1 7 Table of Contents A A AAA A PI ears laos ee eal hs aia ae aie cael 5 1 1 PUI POSE ennnen n specu N GE E A E KAE A ETATE EAE EEEE 5 1 25 Board Architecture OVervieW er aa 5 121 Eon gh PG Ac PEIS Tr e e T EE satucaea ne 5 1 2 2 CONGREGA FPGA hter aCe ee A E E Ta A a as eames 6 X Board Address adi 9 2 1 Accessing BAR R gistefShssinssene ensinar sepsis a e rna R EA E a Eiis 9 22 B ard Address A E 11 3 DMA Desis Detall Sisner ii 12 3 1 Target Reads ara 12 3 1 1 General Descriptio ida be 12 212 Tarset Read Byte Enable A A AS 12 3 1 3 Summa Of Typical Us Cases 12 32 A i A E E E ide E A Ei 13 3 3 Specifics of Dinigroup DMA Engines cooooccconocononocononcnonnnnncnnnnnonnnoncnnnnncnnnnnronnnncnnnnncnnncnnoncnnnnnss 13 E IOMA A one eta cca eds a a daa 13 3 5 BARR e E EE 15 3 6 DMA Descriptor Formatet esnias ia A E N E E a 20 O A n int Rede tink a Sot A ea aca a ied aa a aS 21 4 1 PN Details aan NO 21 411 NMB Physical SiiS A O NE 21 41 2 DDR PCIe Physical Signals inge hee nens eer e E s a a 22 4 1 3 SPB Physical Sinaloa E a A A eia a 22 42 NS 23 S Demand Mode User FPGA Side Details icenen ad 27 5 1 POALUTES ic RRE COAORO 0 i I psa a e rnana ES beea ASE Mite OL Ta SSES SEKTE 27 6 WUser Gevel merula dt 29 T it ds AAA A ta ee 29 Table of Tables Fable LENA e ta at bal 4 Table 2 Listof Interfaces by Board unica areis ida eras calida
12. d For further details please reference the driver code There are four physical signals present that convey user interrupt information and will be viewable in the BARO register However if more than four interrupts are needed in a user s design interrupt signals can be combined this will require that to properly identify the interrupt a BAR read to user space will be necessary 7 Other Features If you have a new feature request or feel that an essential function is missing please contact support dinigroup com 29
13. e are multiple FPGAs attached to each SFB interface The next 48 bits are then available to the FPGA The address range Ox FF000000_00000000 OxFFFFFFFF_FFFFFFFC is reserved for configuration registers Each board has a document describing its configuration registers which include registers for setting up clocks configuring FPGAs and other board specific interfaces Figure 7 User FPGA Address Space Decoding SFB Interface f User FPGA OXFFFFFFFF_FFFFFFFC Configuration Registers 0OxFFO00000_00000000 f 0x0202FFFF_FFFFFFFC FPGA 2 0x02020000_00000000 0x0201FFFF_FFFFFFFC FPGA 1 0x02010000_00000000 Ox02FFFFFF_FFFFFFFC Interface 2 0x02000000_00000000 0x0200 FFFF_FFFFFFFC FPGA 0 0x02000000_00000000 0x01FFFFFF_FFFFFFFC Interface 1 0x01000000_00000000 OxOOFFFFFF_FFFFFFFC Interface O 0x00000000_00000000 PCle DDR Interface Ox01FFFFFF_FFFFFFFC FPGA 0 0x01000000_00000000 NMB Interface OxOOFFFFFF_FFFFFFFC FPGA 0 0x00000000_00000000 11 3 DMA Design Details The DMA design has a consistent interface to host software independent of the board s physical bus architecture the following description is accurate for all boards 3 1 Target Reads 3 1 1 General Description This target interface supports only dword reads and aligned quadword reads which is all that is ever generated by 99 of host machine chipsets Target read T
14. epending on the state of dma0_from_host_ctrl 5 0 dma0_from_host_ctrl 7 0 Output Bit meanings 5 0 indicates type of data 3 2 are dword enables when bit 3 is 1 63 32 is valid when bit 2 is 1 31 0 is valid 4 indicates read request when 1 write request when 0 Signal valid during length phase of transfer 5 0 b10 1 6 7 reserved Decode of 5 0 01 64 bit board byte address 10 24 bits of dword length 23 0 Upper 40 bits are reserved For reads user must return this many dwords of data properly aligned based on bit 0 of the dword board address For writes this information is provided but informational only Read write request bit is valid here 00 Data 11 Reserved Undefined Never Occurs 24 Output Indicates valid data on data and ctrl signals Input This signal high and dma0_from_host_valid high indicates data transfer Input Data to return to PCI E FPGA dma0_to_host_ctrl 7 0 Input Bit meanings 1 0 are dword enables when bit 1 is 1 63 32 is valid data when bit 0 is 1 31 0 is valid data 3 Indicates last data for this read request dma0_from_host_valid dma0 from_host_advance dma0_to_host_data 63 0 Bits 2 4 7 are reserved Input When 1 data ctrl is transferred into the module Output When high user should stop writing data to the module soon Same Same as DMAO but 1 in the name instead of 0 Separate interfaces for each DMA engine dma0_to_
15. es Indicates which bar is being accessed bar number 1 2 or 4 Onehot so 3 b001 means BARI 3 b010 means BAR2 and 3 b100 means BAR4 To treat target_address as a unified 64 bit address space this signals should be used for debug informational purposes only target_read_enable High on a target read request 23 target_request_tag 3 0 Tag associated with this read request target_read_accept Input Acceptance of read request Allows interface to move on before the read data is returned by the user Target_read_enable and target_read_accept being high signals transfer of request If connecting to blockram this signal can be tied high target_read_data 63 0 Read Data to return to configFPGA target_read_be 7 0 Byte enables bit 0 means data 7 0 is requested etc target_read_data_tag 3 0 Input Tag that accompanies this data This value must match the value provided on target_request_tag when target_read_enable was high target_read_data_valid Clock cycle pulse indicating read data is valid target_read_ctrl 7 0 Output Tag associated with a target read Bit 0 indicates both dwords are requested non dword aligned or quadword transfer target_read_data_ctrl 7 0 Input Tag associated with a target read User must save target_read_ctrl 7 0 when target_read_enable is asserted and return it on target_read_data_ctrl 7 0 DMAO Interface AAA dma0_from_host_data 63 0 Output Address length or data d
16. es transaction Bit 26 is set bits 23 20 are the byte enables for the first or only dword bits 19 16 are byte enables for the last dword they must not be 0 The number of dwords to transfer is in bits 15 0 If this is not a byte enables transaction Bit 26 is not 23 0 Dword size byte enables set 23 0 is the number of dwords to transfer PCI address for the transfer If software is using 32 1 63 0 PCI Address 63 0 bit addressing bits 63 32 must be 0 27 Table 8 Demand Mode dma_to_host_ctrl Bits Signal Name Location Name Description dma_to_host_data 31 0 is valid if the transfer dma_to_host_ctrl Lower dword valid ends with a odd dword this should be high dma_to_host_data 63 32 is valid if the transfer Upper dword valid ends with a odd dword this should be low Set with the last data on a to host transfer set on the 2 qword for the descriptor on a from host transfer Set during writing of the 2 qword descriptor for both to host and from host transfers Set to 0 4 Descriptor Enable when transferring write to host data After a to host or from host transfer a 2 qword descriptor would be returned on dma_from_host when dma_from_host_valid is asserted for from host transfers read data would follow Table 9 Demand Mode dma_from_host_data Qword Bits Number Location Name Description The tag associated with this transfer the same tag on the 2 qword descriptor when the User FPGA
17. host_valid dma0_to_host_almost full DMAI Interface Same as DMAO DMA2 Interface Same as DMAO Same Same as DMAO but 2 in the name instead of 0 Separate interfaces for each DMA engine User Interrupts user_interrupts 0 A parameterizable number of user level interrupts which will be combined into a single interrupt and sent to the PCIe core Interrupts can either be pulses or levels 23 Figure 11 Example User Transactions clk_out user_clk reset_out reset target_address 63 0 target_address_valid target_write_accept target_write_enable target_write_data 63 0 target_write_be 7 0 target_read_accept target_read_enable target_read_data 63 0 target_read_data_valid target_request_tag 3 0 target_read_data_tag 3 0 dma0_from_host_data 63 0 dma0_from_host_ctri 7 0 dma0_from_host_valid dma0_from_host_advance dma0_to_host_data 63 0 dma0_to_host_ctrl 7 0 dma0_to_host_valid dma0_to_host_almost_full BAR Read 00000004 BAR Write 00000000 00000004 DMA 0 To Host Transaction 26 5 Demand Mode User FPGA Side Details 5 1 Features All three DMA engines support Demand Mode Posted transfers initiated by user FPGA In this mode descriptors come from user FPGA and are not stored in host memory as in the normal mode The DMA engine can only support one of the 2 m
18. initiated 31 0 Tag the transfer Table 10 Demand Mode dma_from_host_ctrl Bits Signal Name Location Name Description SA A ORI CA dma_from_host_ctrl Start of descriptor descriptor dma_from_host_data 63 32 is valid can be low only in the first qword or last qword of the read 2 Upper dword valid from host returned data dma_from_host_data 31 0 is valid can be low only in the first qword or last qword of the read 3 Lower dword valid from host returned data Set if this is a to host complete descriptor otherwise it s a from host complete descriptor read data would follow a from host complete 4 Is Write Complete descriptor Set when this is the second qword of the 2 5 End of descriptor qword descriptor 28 6 User Level Interrupts The user_interrupts port should be used to signal that an even has happened in user space and trigger the interrupt handler in the driver The number of inputs to the interface is defined as a parameter in user interface module Interrupt inputs can either be pulses at least one clock cycle in length or can be held in an active state The port is active high One interrupt will be issued to the PCle core for every set of interrupts that is received from the user in the time between interrupt handler calls For this reason all active interrupts must be handled on each interrupt handler call a new interrupt will not be issued for any interrupt that was previously not handle
19. is where hardware clears the descriptor when the transfer is complete Top is the base address of the queue Bottom is the last valid address in the queue where software must loop so Bottom 1 Top 3 4 DMA Addressing All data will be aligned to a 64 bit data path DMA transfers that begin on a non 64 bit aligned address will be pre padded to be 64 bit aligned address compatible but the non aligned address will be passed to the user design the user is then free to use or ignore the non aligned part of the address 13 Example 1 64 bit aligned access Address 0x0 Length 32 bit dwords 5 Data 63 0 data 0x4 data 0x0 data Oxc data 0x8 XXXXXXXX data 0x10 Example 2 non 64 bit aligned access Address 0x4 Length 32 bit dwords 5 Data 63 0 data Ox4 XXXXXXXXX data Oxc data Ox8 data 0x14 data 0x10 DMA from_host data will be aligned by the PCIe core DMA to_host data should be similarly aligned by the user 14 3 5 BARO Registers BAR Address map BARO 32 bit BAR PCI E FPGA registers blockRAM 1MB BARI 32 bit BAR User FPGA 4 MB BAR2 64 bit BAR User FPGA 8MB BAR4 64 bit BAR User FPGA 16MB Table 3 BAR Address Map Byte Addr Name Bit Definitions Detailed Description Version 31 16 Major Rev Version Number of PCI E FPGA design Number 15 0 Minor Rev currently loaded Current value is 0x0001_0043 Date Date that this design was created built Example value is 0x200
20. odes the user sets the mode by writing to a BARO register that defaults to normal mode It is assumed that once demand mode is turned on it will stay on until user reset To host transactions support byte enables for the first and last dword User FPGA starts a demand mode to host transfer by writing a 2 qword descriptor with PCI address size to the dma_to_host interface followed by data when the write is complete on the PCle side a 2 qword write complete descriptor would return on the dma_from_host interface For a demand mode from host transfer User FPGA writes a 2 qword descriptor to the dma_to_host interface then dma_from_host would return a 2 qword descriptor followed by read data Table 7 Demand Mode 2 Qword Descriptor Format Qword Bits Number Location Name Description A tag to be associated with this transfer the same tag would be returned with the write complete or read 63 32 Tag complete descriptor for this transaction p A NA Mutel A 0 From_Host Move data from PCI Address to User FPGA 30 Direction 1 To_Host Move data from FPGA to PCI Address O88 served i Mustbe S O oT Be mee ETE EAN Set to make this transaction a to host transfer with AA Dword Byte enables byte enables the enables are in bits 23 16 25 24 Mustbe0 o Number of dwords to transfer This ao TT must indicate a contiguous block of memory in PCI address space and user address space If this is a byte enabl
21. pt mode a value of 1 means that this interrupt event occurred Software needs to write a 1 to the corresponding bit to clear the interrupt In MSI interrupt mode these bits are self clearing once the MSI interrupt message is sent The vector number send per interrupt depends on the number of vectors allocated to the card and will be defined in a future version of the design 17 0xD4 RW Interrupt Mask 5 0 Mask Control A value of 1 in the mask means that the for Interrupt Bits corresponding interrupt source generates an interrupt over the PCI E bus A value of 0 means the corresponding interrupt bit doesn t create an interrupt event OxE8 RW User Interrupt 3 0 User Interrupts In Legacy Interrupt mode a value of 1 means that this interrupt event occurred Software needs to write a 1 to the corresponding bit to clear the interrupt In MSI interrupt mode these bits are self clearing once the MSI interrupt message is sent The vector number send per interrupt depends on the number of vectors allocated to the card and 0 will be defined in a future version of the design xECRW User Interrupt 3 0 Mask Control A value of 1 in the mask means that the for User Interrupt corresponding interrupt source generates an Bits interrupt over the PCI E bus A value of 0 means the corresponding interrupt bit doesn t create an interrupt event OxFO RW BARI Upper 31 0 Address Upper 32 bits of 64 bit target address fo
22. r and to report back success or failure The DMA engine uses this information to execute read or write requests to move data from one place to another The DMA engine also needs to know how to get descriptors and how to tell if they contain valid data or not 3 3 Specifics of Dinigroup DMA Engines There are three 3 independent DMA engines in the Dinigroup DMA design Each is controlled using BARO registers the physical address of host memory will be written into the DMA control registers and the DMA engines will then fetch descriptors from those addresses A valid bit is used in the descriptor to tell if the descriptor is valid or not Software sets the valid bit to 1 when the 4 dword descriptor contains valid data Hardware sets the valid bit to 0 when hardware is done moving the data The descriptors in host memory are stored in a contiguous circular queue Software simply tells the DMA engine the base address and size mask of the circular queue and then hardware has enough information to fetch descriptors and process them It is the responsibility of software to make sure that the tail of the queue is never overwritten Note that all addresses given to the DMA engine both the descriptor queue base address and the PCIe addresses in the descriptors must be physical addresses The DMA engine has no means to translate logical addresses to physical addresses Queue terminology Head is where the software writes the next valid descriptor Tail
23. r BARI Address OxF4 RW BAR1 Lower 31 0 Address Lower 32 bits of 64 bit target address for BARI Address Use mask register to control how many bits this register actually controls OxF8 RW BAR2 Upper 31 0 Address Upper 32 bits of 64 bit target address for BAR2 Address OxFC RW BAR2 Lower 31 0 Address Lower 32 bits of 64 bit target address for BAR2 Address Use mask register to control how many bits this register actually controls 0x100RW BAR4 Upper 31 0 Address Upper 32 bits of 64 bit target address for BAR4 Address 0x104RW BAR4 Lower 31 0 Address Lower 32 bits of 64 bit target address for BAR4 Address Use mask register to control how many bits this register actually controls 0x108RW BARI Lower 31 0 Mask Sets number of bits that lower 32 bit address Address Mask register controls Defaults to OxFFCO_0000 Oxl0C RW BAR2 Lower 31 0 Mask Sets number of bits that lower 32 bit address Address Mask register controls Defaults to OxFF80_0000 Oxl10 RW BAR4 Lower 31 0 Mask Sets number of bits that lower 32 bit address Address Mask register controls Defaults to OxFFOO_0000 18 oxt14 Reserved 0x140 R Interface 0 31 0 Timeout Number of read timeouts handled on Interface 0 Timeout Counter Mapping of interface to FPGA varies by board 0x144 R Interface 1 31 0 Timeout Timeout Counter 0x148 R Interface 2 31 0 Timeout Timeout Counter 0x14CR Interface 3 31 0 Timeout Timeout Counter 0x150 R Interface 4
24. read_data is don t care If the address is 8 and the byte enables are 0x3C then 4 bytes should be returned starting at address 10 In this case target_read_ctrl 0 will be set because the transaction crosses the dword boundary The typical transaction is the aligned dword where the address ends in 0 or 4 and the byte enables are OxOF or OxFO respectively Target_read_ctr1 0 is not set in these transactions as the dword boundary is not crossed 3 1 3 Summary Of Typical Use Cases In summary there are three typical cases for how the target read backend may be implemented 1 64 bit Backend Ignore address bit 2 and always return an entire quadword The byte enables in target_read_be 7 0 may be ignored Remember to always return the contents of target_read_ctrl 7 0 onto target_read_data_ctrl 7 0 along with the data but no special action is needed if target_read_ctrl 0 is set 2 32 bit Backend Use target_read_ctrl 0 to decide if a quadword must be returned otherwise return only the requested dword in target_read_data 31 0 if the address ends in 0 or in target_read_data 63 32 if the address ends in 4 If you can guarantee all target reads are aligned dword transfers i e you only ever dereference uint pointers in the device driver then you can ignore target_read_ctrl 0 and just return the dword indicated by the address Target_read_ctrl 7 0 should still be returned on target_read_data_ctrl 7 0 along with the data The byte enables
25. scuss the signals in and out of the xxx_user_interface The user must instantiate this module in order to interface with the configFPGA This module will have contained within it connections to either a PCIe DDR NMB or SFB IO module which will convert the physical interface to the internal interface described here Direction of ports described is in relation to the user_interface module Table 5 Backend Clocks Resets Signal Direction Description Name reset Input Main module reset Input from user Allows resetting the module from an external source reset_out Output Reset to user module When de asserted this indicates that the interface is ready to use user_clk User clock Clocks logic on the user side of the interface Can be sourced by clk_out clk_out Clock sent to user Clocks logic on the physical side of the interface Signal Name Direction Description Target Interface aa A target_address 63 0 Byte address bits 1 0 always 0 target_address_valid One clock cycle strobe that indicates the target_address is valid target write_data 63 0 target_write_be 7 0 Byte enables bit 0 means data 7 0 is valid etc Indicates valid write data on this interface target_write_accept Input Accepts the valid write data Data is allowed to transfer when target_write_accept and target_write_enable are active If connecting to blockRAM this signal can be tied high debug_target_bar 2 0 Output Valid for reads and writ
26. snesanea ceeded 6 Table S BARO Address Mapeo eliana bn 15 Table4 Descriptor Format A RA 20 Ee ee oe aa Clocks Resets E E EEEE EE E ate 23 Table User Sinai 23 Table 7 Demand Mode 2 Qword Descriptor ForMat ooocccnnococonoconononcnonencnnnoncnnnononnnononnnnnronnnncnnnnncnnneninns 27 Table 8 Demand Mode dma_to_host_ctrl eesssesesseseesesssessessessresressersresrrssersseseresreseeserssresseseresresseserse 28 Table 9 Demand Mode dma drom lt host data ia 28 Table 10 Demand Mode dma _from_hosttrl nica latent ena 28 Table of Figures Figure 1 Marvell based Board CONSUL A eae ged 5 Figure 2 Non Marvell based Board Configuration eeseseseeseseseesessessresressessresresstesreseeesteseesresseeseeseresee 6 Fig re N MB Bs o ed ets dador e atados ela e e oe et dd le ert 7 Figure 4 PCle DDR BUS a E EE aia 7 Pipette BO US E E E E E E 8 Figure 6 Address Translation from Host Memory to Board AddTESS oooonocccocccnonncoonccononannnnnn cono ncnonennnos 10 Figure 7 User FPGA Address Space Decoding 0 ce eessccesececesscecssccecesccecssccecssceeenscceenscceenseeeensceeses 11 Fis re 8S NMB Detail restos pe at ll e ei dde to de de a ea aT 21 Hgure 9 DDR PCIe Detail A A A te 22 Ersure 10 SPB Der E e o e e ds 22 Figure 1 1 Example User Transactions nesnesinin a sda 26 Table 1 Change Log Revision Name Details Added DMA2 interrupts O O O Poa E Brian Poladian Added DMA addressing e
27. the user to the config FPGA and pair 19 is used as a source synchronous clock for data sent from the configFPGA to the user The configFPGA will have as many NMB interfaces as there are FPGAs Figure 8 NMB Detail configFPGA INTERFACE 0 TO_HOST_CLK NMB_QA 18 TO_HOST_DATA NMB_QA 8 0 User FPGA A FROM_HOST_CLK NMB_QA 19 gt FROM_HOST_DATA NMB_QA 17 9_ gt INTERFACE1 TO_HOST_CLK NMB_QB 18 TO_HOST_DATA NMB_QB 8 0 User FPGA B FROM_HOST_CLK NMB_QB 19 gt FROM_HOST_DATA NMB_0QB 17 gt 21 4 1 2 DDR PCle Physical Signals The DDR PCIe bus uses a 38 bit bus in the TO_HOST direction with a source synchronous clock and a 39 bit bus in the FROM_HOST direction with a source synchronous clock Data sent on the bus is DDR Figure 9 DDR PCIe Detail configFPGA INTERFACE 0 TO_HOST_CLK TO_HOST_CLK TO_HOST_DATA TO_HOST_DATA 38 0 User FPGA A FROM_HOST_CLK FROM_HOST_CLK FROM_HOST_DATA FROM_HOST_DATA 37 0 4 1 3 SFB Physical Signals The SFB interface uses the data chip select busy init and read write configuration signals used for SelectMAP FPGA programming Individual chip selects are used for every FPGA on the bus and the remaining signals are shared Figure 10 SFB Detail configFPGA User FPGA FO g SFB_CSO Ht User FPGA F1 SFB_CS1 SFB_DATA 7 0 SFB_BUSY SFB_INIT SFB_RDWR 22 4 2 Backend Signals Here we di
28. ughput of 480 Mbps Figure 5 SFB Bus User FPGA User FPGA User FPGA FOO F01 nna FOX SFBO User FPGA User FPGA User FPGA eOnnge Ge F10 F11 eter FIX SFB1 2 Board Addressing The DMA design has a consistent addressing scheme independent of the board s physical bus architecture the following description is accurate for all boards 2 1 Accessing BAR Registers BARO is used for PCIe and BAR configuration and BARs 1 2 and 4 are windows into 64 bit user address space The BAR windows can be moved independently and may overlap The BAR windows are controlled by registers on the BARO interface The 64 bit address space address 63 0 is comprised of three parts 63 32 set by HIADDR register 31 size_of_bar set by LOADDR register size_of_bar 1 0 set by target address The size_of_bar variable is set by the LOADDR_ MASK register and by default uses the maximum BAR size The 64 bit board address is assembled as follows HIADDR LOADDR amp LOADDR_MASK offset amp LOADDR_MASK Example Consider Figure 6 and Table 2 The physical address of BARO in host memory is Oxd1c00000 Suppose we want to write to physical board address 0x01000000_02005678 1 Map host memory address for BARO in host software 2 Write to BARO host_memory_address 0x100 BAR4_HIADDR register the value of the upper 3
29. xample All board addresses are now byte addresses Brian Poladian Added missing BARO Reset register description Brian Poladian Updated dma_from_host_ctrl signal description 1 Overview 1 1 Purpose This document describes the interfaces signals and procedures necessary to interface to the Dinigroup PCle DMA ConfigFPGA design This document is not pertinent to the PCIe8T family of boards please see http www dinigroup com product common pcie8t_user_interface_manual pdf if working with a DN9000K 10PCIesT DN9002K10PCIe8T DN9200K 10PCIesT DN7006K10PCIe8T DN7406K10PCIE8T or DNMEG_V5T_PCIE The Dinigroup PCle DMA design includes BAR memory access and DMA engines There exist other FPGA designs not discussed in this document that Dinigroup provides for the PCIe ConfigFPGA Please see the product web page for other documentation and updates to this user guide If you have questions comments concerns please email support dinigroup com 1 2 Board Architecture overview In the latest generation of Dinigroup boards there are several different configurations for the configFPGA user FPGAs and the host PCIe connection 1 2 1 ConfigFPGA PCle Interface On Marvell based Dinigroup boards the configFPGA connects via PCIe to the Marvell the host computer is not able to directly see the configFPGA s DMA engines or register space The software driver interface to the configFPGA runs on the Marvell and a separate set of software drivers
Download Pdf Manuals
Related Search
Related Contents
Definición Procesos Niveles 1 y 2 Copyright © All rights reserved.
Failed to retrieve file