AMM_GEN
This component is used to manually read or write to the external memory from the MI bus via the AMM bus. It has to be connected to EMIF Hard IP.
Internal Architecture
AMM data bus width is significantly larger than MI data bus width and all data words in the burst have to be sent/received in one continuous request. Therefore there is a buffer that can be first filled with MI bus transactions and then sent to EMIF. When manual read from memory is requested, the buffer is first automatically filled and then can be read by MI bus registers.
DP_BRAM buffer keeps
BURST_CNT
AMM wordsData are r/w from/to the buffer either by AMM interface or by internal logic
Therefore dual-port memory is selected
One of
internal logic
tasks is to cross betweenMI_DATA_WIDTH
words andAMM_DATA_WIDTH
wordsIt keeps currently selected AMM word from the buffer
This word can be edited from MI bus
Editing will automatically update buffer
EDGE_DETECT is used to detect rising edge changes of bits inside
ctrl
registerThe whole component is then controlled by FSM
Note
Slice = MI_DATA_WIDTH word inside AMM_DATA_WIDTH word
MI Bus Control
MI Address Space Definition
BASE + 0x00 -- ctrl
1. bit -- memory write
2. bit -- memory read
3. bit -- buff valid
4. bit -- amm ready
BASE + 0x04 -- address / burst
BASE + 0x08 -- slice (MI word slice inside AMM word)
BASE + 0x0C -- data
BASE + 0x10 -- burst count
Usage
Manual write to the external memory:
Filling buffer:
First set
address / burst
register to select AMM word in the buffer that will be editedThen set the
slice
register to select slice inside selected AMM wordThen set
data
registers with the data for selected sliceRepeat these steps for all slices of the burst
Set
address / burst
register to address for writing (indexing by AMM words)Data can be then saved from buffer to external memory by setting
memory write
bit to1
Manual read from the external memory:
Set
manual address
register to required address (indexing by AMM words)To load data from external memory into the buffer set
memory read
bit to1
Wait until
buff valid
bit is asserted to1
Repeat steps from ‘Filling buffer’ to read received words