Visible to Intel only — GUID: iga1401397708725
Ixiasoft
Visible to Intel only — GUID: iga1401397708725
Ixiasoft
30.4.3. Register Map
The Intel-provided HAL device driver accesses the device registers directly. If you are writing a device driver, and the HAL driver is active for the same device, your driver will conflict and fail to operate.
Device drivers control and communicate with the hardware through five memory-mapped 32-bit registers.
Offset | Register Name | Read/Write | 31 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | status (1) | RW | (2) | LEN | WEOP | REOP | BUSY | DONE | |||||||||
1 | readaddress | RW | Read host start address | ||||||||||||||
2 | writeaddress | RW | Write host start address | ||||||||||||||
3 | length | RW | DMA transaction length (in bytes) | ||||||||||||||
4 | — | — | Reserved (3) | ||||||||||||||
5 | — | — | Reserved (3) | ||||||||||||||
6 | control | RW | (2) | SOFTWARERESET | QUADWORD | DOUBLEWORD | WCON | RCON | LEEN | WEEN | REEN | I_EN | GO | WORD | HW | BYTE | |
7 | — | — | Reserved (3) | ||||||||||||||
Notes :
|
status Register
The status register consists of individual bits that indicate conditions inside the DMA controller. The status register can be read at any time. Reading the status register does not change its value.
Bit Number | Bit Name | Read/Write/Clear | Description |
---|---|---|---|
0 | DONE | R/C | A DMA transaction is complete. The DONE bit is set to 1 when an end of packet condition is detected or the specified transaction length is completed. Write zero to the status register to clear the DONE bit. |
1 | BUSY | R | The BUSY bit is 1 when a DMA transaction is in progress. |
2 | REOP | R | The REOP bit is 1 when a transaction is completed due to an end-of-packet event on the read side. |
3 | WEOP | R | The WEOP bit is 1 when a transaction is completed due to an end of packet event on the write side. |
4 | LEN | R | The LEN bit is set to 1 when the length register decrements to zero. |
readaddress Register
The readaddress register specifies the first location to be read in a DMA transaction. The readaddress register width is determined at system generation time. It is wide enough to address the full range of all agent ports hosted by the read port.
writeaddress Register
The writeaddress register specifies the first location to be written in a DMA transaction. The writeaddress register width is determined at system generation time. It is wide enough to address the full range of all agent ports hosted by the write port.
length Register
The length register specifies the number of bytes to be transferred from the read port to the write port. The length register is specified in bytes. For example, the value must be a multiple of 4 for word transfers, and a multiple of 2 for halfword transfers.
The length register is decremented as each data value is written by the write host port. When length reaches 0 the LEN bit is set. The length register does not decrement below 0.
The length register width is determined at system generation time. It is at least wide enough to span any of the agent ports hosted by the read or write host ports, and it can be made wider if necessary.
control Register
The control register is composed of individual bits that control the DMA’s internal operation. The control register’s value can be read at any time. The control register bits determine which, if any, conditions of the DMA transaction result in the end of a transaction and an interrupt request.
Bit Number | Bit Name | Read/ Write/ Clear | Description |
---|---|---|---|
0 | BYTE | RW | Specifies byte transfers. |
1 | HW | RW | Specifies halfword (16-bit) transfers. |
2 | WORD | RW | Specifies word (32-bit) transfers. |
3 | GO | RW | Enables DMA transaction. When the GO bit is set to 0 during idle stage (before execution starts), the DMA is prevented from executing transfers. When the GO bit is set to 1 during idle stage and the length register is non-zero, transfers occur. If go bit is de-asserted low before write transaction complete, done bit will never go high. It is advisable that GO bit is modified during idle stage (no execution happened) only. |
4 | I_EN | RW | Enables interrupt requests (IRQ). When the I_EN bit is 1, the DMA controller generates an IRQ when the status register’s DONE bit is set to 1. IRQs are disabled when the I_EN bit is 0. |
5 | REEN | RW | Ends transaction on read-side end-of-packet. When the REEN bit is set to 1, a agent port with flow control on the read side may end the DMA transaction by asserting its end-of-packet signal. REEN bit should be set to 0. |
6 | WEEN | RW | Ends transaction on write-side end-of-packet. WEEN bit should be set to 0. |
7 | LEEN | RW | Ends transaction when the length register reaches zero. When this bit is 0, length reaching 0 does not cause a transaction to end. In this case, the DMA transaction must be terminated by an end-of-packet signal from either the read or write host port. LEEN bit should be set to 1. |
8 | RCON | RW | Reads from a constant address. When RCON is 0, the read address increments after every data transfer. This is the mechanism for the DMA controller to read a range of memory addresses. When RCON is 1, the read address does not increment. This is the mechanism for the DMA controller to read from a peripheral at a constant memory address. For details, see the Addressing and Address Incrementing section. |
9 | WCON | RW | Writes to a constant address. Similar to the RCON bit, when WCON is 0 the write address increments after every data transfer; when WCON is 1 the write address does not increment. For details, see Addressing and Address Incrementing. |
10 | DOUBLEWORD | RW | Specifies doubleword transfers. |
11 | QUADWORD | RW | Specifies quadword transfers. |
12 | SOFTWARERESET | RW | Software can reset the DMA engine by writing this bit to 1 twice. Upon the second write of 1 to the SOFTWARERESET bit, the DMA control is reset identically to a system reset. The logic which sequences the software reset process then resets itself automatically. |
The data width of DMA transactions is specified by the BYTE, HW, WORD, DOUBLEWORD, and QUADWORD bits. Only one of these bits can be set at a time. If more than one of the bits is set, the DMA controller behavior is undefined. The width of the transfer is determined by the narrower of the two agents read and written. For example, a DMA transaction that reads from a 16-bit flash memory and writes to a 32-bit on-chip memory requires a halfword transfer. In this case, HW must be set to 1, and BYTE, WORD, DOUBLEWORD, and QUADWORD must be set to 0.
To successfully perform transactions of a specific width, that width must be enabled in hardware using the Allowed Transaction hardware option. For example, the DMA controller behavior is undefined if quadword transfers are disabled in hardware, but the QUADWORD bit is set during a DMA transaction.
Executing a DMA software reset when a DMA transfer is active may result in permanent bus lockup (until the next system reset). The SOFTWARERESET bit should therefore not be written except as a last resort.