| |||
| Home > Functional Overview > System-on-chip design considerations > Byte lane control | |||
The SSMC generates byte lane control signals nSMBLS[3:0] according to:
little or big-endian operation
AMBA transfer width (indicated by HSIZE[2:0])
external memory bank data bus width, defined in each Bank Control Register
external memory bank type, byte, halfword, or word
the decoded HADDR[1:0] value for write accesses only.
Word transfers are the largest size transfers supported by the SSMC. Any access attempted with a size greater than a word causes the generation of an error response. Each memory bank can be 8, 16, or 32 bits wide. The memory configuration for a particular bank determines how the nSMWEN and nSMBLS signals are connected to provide byte, halfword, and word access. For read accesses, you must control the nSMBLS signals by driving them either all HIGH or all LOW.
Do this by programming the Read Byte Lane Enable (RBLE) bit in each Bank Control Register. Accesses to memory banks constructed from 8-bit or non byte-partitioned memory devices and Accesses to memory banks constructed from 16 or 32-bit memory devices explain why different connections in respect of nSMWEN and nSMBLS[3:0] are required for different memory configurations.
The SMBLS7POL input controls the reset value of nSMBLS:
0 = nSMBLS is active LOW. This is the default.
1 = nSMBLS is active HIGH.
For memory banks constructed from 8-bit or non byte-partitioned memory devices, it is important that you clear the RBLE bit to zero within the respective Bank Control Register. This forces all nSMBLS[3:0] lines HIGH during a read access to that particular bank, because the byte lane selects are connected to the device write enables. Figure 2.31 shows 8-bit memory devices configuring memory banks that are 8, 16, and 32 bits wide. In each of these configurations, the nSMBLS[3:0] signals are connected to the write enable (nWE) inputs of each 8-bit memory.
The nSMWEN signal from the SSMC is not used in this configuration.
For write transfers, the relevant nSMBLS[3:0] byte lane signals are asserted LOW, and steer the data to the addressed bytes.
For read transfers, all nSMBLS[3:0] lines are deasserted HIGH. This enables you to define the external bus for at least the width of the accessed memory.
For memory banks constructed from 16 or 32-bit memory devices, it is important that you set the RBLE bit to 1 within the respective Bank Control Register. This asserts all nSMBLS[3:0] lines LOW during a read access to that particular bank, because during a read, you must select all bytes of the devices to avoid un-driven byte lanes on the read data value.
For 16 and 32-bit wide memory devices, byte select signals exist and you must control these appropriately, as Figure 2.32 and Figure 2.33 show.
Figure 2.34 shows connections for a typical memory system with different data width memory devices.
The SSMC uses the programmed external memory width of each bank and the endianness to determine which remaining bytes it must drive to ensure that the external bus is never floating.
nSMDATAEN[3:0] controls the input/output pads cells for the external write data bus lines as Table 2.4 shows. Data is driven out on SMDATAOUT when nSMDATAEN is asserted LOW.
Table 2.5 to Table 2.10 list how the internal databuses HRDATASMC[31:0] and HWDATASMC[31:0] map onto the external databus. The two internal databuses are listed as HDATA[31:0] in the tables. This mapping of the data is affected by:
the external databus width
big/little-endian operation
size of the AHB access (word, halfword, or byte as determined by HSIZE[1:0])
alignment within word of byte and halfword accesses, as controlled by HADDR[1:0].
Table 2.5 to Table 2.10 lists how byte lane control and data bus steering is achieved for all combinations of:
big-endian configuration
little-endian configuration
bus width
HSIZE[1:0]
HADDR[1:0].
For each access, the external bits on the SMDATA bus that map to the internal AHB bus HDATASMC are listed.
For read transfers, ensure that the RBLE bit is cleared to zero in the respective Bank Control Register. This forces all nSMBLS[3:0] lines to be deasserted HIGH and enables you to define the external bus for at least the width of the accessed memory. See Bank Control Registers 0-7.
Table 2.5 lists the little-endian read accesses for an 8-bit external bus.
Table 2.5. Little-endian read, 8-bit external bus
Access: Little-endian, 8-bit external bus | External data mapping onto system data bus SMDATA[31:0] onto HDATASMC | ||||||
|---|---|---|---|---|---|---|---|
Internal width | HSIZE[1:0] | HADDR[1:0] | SMADDR[1:0] | [31:24] | [23:16] | [15:8] | [7:0] |
Word (4 transfers) | 10 10 10 10 | xx xx xx xx | 11 10 01 00 | 7:0 - - - | - 7:0 - - | - - 7:0 - | - - - 7:0 |
Halfword (2 transfers) | 01 01 | 1x 1x | 11 10 | 7:0 - | - 7:0 | - - | - - |
Halfword (2 transfers) | 01 01 | 0x 0x | 01 00 | - - | - - | 7:0 - | - 7:0 |
Byte | 00 | 11 | 11 | 7:0 | - | - | - |
Byte | 00 | 10 | 10 | - | 7:0 | - | - |
Byte | 00 | 01 | 01 | - | - | 7:0 | - |
Byte | 00 | 00 | 00 | - | - | - | 7:0 |
Table 2.6 lists the little-endian read accesses for a 16-bit external bus.
Table 2.6. Little-endian read, 16-bit external bus
Access: Little-endian, 16-bit external bus | External data mapping onto system data bus SMDATA[31:0] onto HDATASMC | ||||||
|---|---|---|---|---|---|---|---|
Internal width | HSIZE[1:0] | HADDR[1:0] | SMADDR[1:0] | [31:24] | [23:16] | [15:8] | [7:0] |
Word (2 transfers) | 10 10 | xx xx | 1x 0x | 15:8 - | 7:0 - | - 15:8 | - 7:0 |
Halfword | 01 | 1x | 1x | 15:8 | 7:0 | - | - |
Halfword | 01 | 0x | 0x | - | - | 15:8 | 7:0 |
Byte | 00 | 11 | 1x | 15:8 | - | - | - |
Byte | 00 | 10 | 1x | - | 7:0 | - | - |
Byte | 00 | 01 | 0x | - | - | 15:8 | - |
Byte | 00 | 00 | 0x | - | - | - | 7:0 |
Table 2.7 lists the little-endian read accesses for a 32-bit external bus.
Table 2.7. Little-endian read, 32-bit external bus
Access: Little-endian, 32-bit external bus | External data mapping onto system data bus SMDATA[31:0] onto HDATASMC | |||||
|---|---|---|---|---|---|---|
Internal width | HSIZE[1:0] | HADDR[1:0] | [31:24] | [23:16] | [15:8] | [7:0] |
Word | 10 | xx | 31:24 | 23:16 | 15:8 | 7:0 |
Halfword | 01 | 1x | 31:24 | 23:16 | - | - |
Halfword (2 transfers) | 01 | 0x | - | - | 15:8 | 7:0 |
Byte | 00 | 11 | 31:24 | - | - | - |
Byte | 00 | 10 | - | 23:16 | - | - |
Byte | 00 | 01 | - | - | 15:8 | |
Byte | 00 | 00 | - | - | - | 7:0 |
Table 2.8 lists the big-endian read accesses for an 8-bit external bus.
Table 2.8. Big-endian read, 8-bit external bus
Access: Big-endian, 8-bit external bus | External data mapping onto system data bus SMDATA[31:0] onto HDATASMC | ||||||
|---|---|---|---|---|---|---|---|
Internal width | HSIZE[1:0] | HADDR[1:0] | SMADDR[1:0] | [31:24] | [23:16] | [15:8] | [7:0] |
Word (4 transfers) | 10 10 10 10 | xx xx xx xx | 11 10 01 00 | - - - 7:0 | - - 7:0 - | - 7:0 - - | 7:0 - - - |
Halfword (2 transfers) | 01 01 | 1x 1x | 11 10 | - - | - - | - 7:0 | 7:0 - |
Halfword (2 transfers) | 01 01 | 0x 0x | 01 00 | - 7:0 | 7:0 - | - - | - - |
Byte | 00 | 11 | 11 | - | - | - | 7:0 |
Byte | 00 | 10 | 10 | - | - | 7:0 | - |
Byte | 00 | 01 | 01 | - | 7:0 | - | - |
Byte | 00 | 00 | 00 | 7:0 | - | - | - |
Table 2.9 lists the big-endian read accesses for a 16-bit external bus.
Table 2.9. Big-endian read, 16-bit external bus
Access: Big-endian, 16-bit external bus | External data mapping onto system data bus SMDATA[31:0] onto HDATASMC | ||||||
|---|---|---|---|---|---|---|---|
Internal width | HSIZE[1:0] | HADDR[1:0] | SMADDR[1:0] | [31:24] | [23:16] | [15:8] | [7:0] |
Word (2 transfers) | 10 10 | xx xx | 1x 0x | - 15:8 | - 7:0 | 15:8 - | 7:0 - |
Halfword | 01 | 1x | 1x | - | - | 15:8 | 7:0 |
Halfword | 01 | 0x | 0x | 15:8 | 7:0 | - | - |
Byte | 00 | 11 | 1x | - | - | - | 7:0 |
Byte | 00 | 10 | 1x | - | - | 15:8 | - |
Byte | 00 | 01 | 0x | - | 7:0 | - | - |
Byte | 00 | 00 | 0x | 15:8 | - | - | - |
Table 2.10 lists the big-endian read accesses for a 32-bit external bus.
Table 2.10. Big-endian read, 32-bit external bus
Access: Big-endian, 32-bit external bus | External data mapping onto system data bus SMDATA[31:0] on to HDATASMC | |||||
|---|---|---|---|---|---|---|
Internal width | HSIZE[1:0] | HADDR[1:0] | [31:24] | [23:16] | [15:8] | [7:0] |
Word | 10 | xx | 31:24 | 23:16 | 15:8 | 7:0 |
Halfword | 01 | 1x | - | - | 15:8 | 7:0 |
Halfword | 01 | 0x | 31:24 | 23:16 | - | - |
Byte | 00 | 11 | - | - | - | 7:0 |
Byte | 00 | 10 | - | - | 15:8 | - |
Byte | 00 | 01 | - | 23:16 | - | - |
Byte | 00 | 00 | 31:24 | - | - | - |