Summary of Contents for Texas Instruments TMS320C6000 DSP
Page 1
TMS320C6000 DSP External Memory Interface (EMIF) Reference Guide Literature Number: SPRU266A September 2003...
Page 2
TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions:...
TMS320C6000 CPU and Instruction Set Reference Guide (literature number SPRU189) describes the TMS320C6000 CPU architecture, instruction set, pipeline, and interrupts for these digital signal processors. TMS320C6000 DSP Peripherals Overview Reference Guide (literature number SPRU190) describes the peripherals available on the TMS320C6000 DSPs.
Page 4
Trademarks Related Documentation From Texas Instruments / Trademarks TMS320C6000 Technical Brief (literature number SPRU197) gives an introduction to the TMS320C62x and TMS320C67x DSPs, develop- ment tools, and third-party support. TMS320C64x Technical Overview (SPRU395) gives an introduction to the TMS320C64x DSP and discusses the application areas that are enhanced by the TMS320C64x VelociTI.
............... Provides an overview and describes the common operation of the external memory interface (EMIF) in the digital signal processors (DSPs) of the TMS320C6000 DSP family. Overview .
Chapter 1 Overview This chapter provides an overview and describes the common operation of the external memory interface (EMIF) in the digital signal processors (DSPs) of the TMS320C6000 DSP family. For operation and registers unique in the TMS320C620x/C670x EMIF, see Chapter 2. For operation and registers unique in the TMS320C621x/C671x EMIF, see Chapter 3.
Overview 1.1 Overview The external memory interfaces (EMIFs) of all C6000 devices support a glueless interface to a variety of external devices, including: Pipelined synchronous-burst SRAM (SBSRAM) Synchronous DRAM (SDRAM) Asynchronous devices, including SRAM, ROM, and FIFOs An external shared-memory device Table 1−1 summarizes the differences between the C6000 EMIFs.
SDRAM Interface 1.3 SDRAM Interface The C6000 EMIF supports the SDRAM commands shown in Table 1−2. Table 1−3 shows the signal truth table for the SDRAM commands. The 16-bit EMIF, 32-bit EMIF, and 64-bit EMIF table entries refer to the total bus width of the EMIF and not the size of the transfer.
SDRAM Interface Table 1−4. TMS320C6000 SDRAM Signal Descriptions SDRAM EMIF Signal SDRAM Function Signal DQMx Data/output mask. DQM is an input/output buffer control signal. When high, it disables writes and places outputs in the high impedance state during reads. DQM has a 2-CLK-cycle latency on reads and a 0-CLK-cycle latency on writes. DQM pins serve as byte strobes and are connected to BE outputs.
SDRAM Interface 1.3.1 SDRAM Initialization After reset, none of the CE spaces are configured as SDRAM. The CPU should initialize all of the CE space control registers and the SDRAM extension register before performing SDRAM initialization by setting the INIT bit to 1. If SDRAM does not exist in the system, you should not write a 1 to the INIT bit.
SDRAM Interface 1.3.3 SDRAM Refresh Mode The RFEN bit in the SDRAM control register (SDCTL) selects the SDRAM refresh mode of the EMIF. When RFEN = 0, all EMIF refreshes are disabled, and you must ensure that refreshes are implemented in an external device. When RFEN = 1, the EMIF performs refreshes of SDRAM.
SDRAM Interface 1.3.4 SDRAM Deactivation (DCAB and DEAC) The SDRAM deactivation (DCAB) is performed after a hardware reset or when INIT = 1 in the SDRAM control register (SDCTL). The SDRAMs also require this cycle prior to a refresh (REFR) and mode set register (MRS) command. On the C6000 EMIF, a DCAB is issued when a page boundary is crossed.
SDRAM Interface 1.3.5 SDRAM Activation (ACTV) The C6000 EMIF automatically issues the activate (ACTV) command before a read or write to a new row of SDRAM. The ACTV command opens up a page of memory, allowing future accesses (reads or writes) with minimum latency. When the EMIF issues an ACTV command, a delay of t is incurred before a read or write command is issued.
SBSRAM Interface 1.4 SBSRAM Interface The C6000 EMIF interfaces directly to industry-standard synchronous burst SRAMs (SBSRAMs). This memory interface allows a high-speed memory interface without some of the limitations of SDRAM. Most notably, since SBSRAMs are SRAM devices, random accesses in the same direction can occur in a single cycle.
SBSRAM Interface Table 1−7. TMS320C6000 SBSRAM Signal Descriptions EMIF Signal † SBSRAM Signal SBSRAM Function SSADS ADSC Address strobe SSOE Output enable SSWE Write enable SSCLK/CLKOUT2/ECLKOUT ‡ SBSRAM clock † For C64x DSP, SBSRAM control signals are renamed as SADS/SRE, SOE, and SWE, respectively.
Asynchronous Interface 1.5 Asynchronous Interface The asynchronous interface offers configurable memory cycle types to interface to a variety of memory and peripheral types, including SRAM, EPROM, and flash memory, as well as FPGA and ASIC designs. Table 1−9 lists the asynchronous interface pins.
Asynchronous Interface 1.5.1 Programmable ASRAM Parameters The C6000 EMIF allows a high degree of programmability for shaping asynch- ronous accesses. The programmable parameters are: Setup: The time between the beginning of a memory cycle (CE low, address valid) and the activation of the read or write strobe. Strobe: The time between the activation and deactivation of the read (ARE) or write strobe (AWE).
Asynchronous Interface 1.5.2 Asynchronous Reads Figure 1−9 shows an asynchronous read with the setup, strobe, and hold param- eter programmed with the values 2, 3, and 1, respectively. An asynchronous read proceeds as: At the beginning of the setup period: CE becomes active.
Asynchronous Interface 1.5.3 Asynchronous Writes Figure 1−10 shows two back-to-back asynchronous write cycles with the ARDY signal pulled high (always ready). The SETUP, STROBE, and HOLD are programmed to 2, 3, and 1, respectively. At the beginning of the setup period: CE becomes active.
Asynchronous Interface Figure 1−10. Asynchronous Write Timing Diagram Setup Hold Strobe Hold CE write hold Strobe Setup † Clock ‡ § BE[3:0] EA[21:2] Á Á Á Á ¶ ED[31:0] Á Á Á Á ARDY † Clock = CLKOUT1 for C620x/C670x DSP. = ECLKOUT for C621x/C671x DSP.
Page 35
Asynchronous Interface 1.5.3.1 C621x/C671x Asynchronous Writes Setup Timing For a C621x/C671x asynchronous write cycle, the address (EA) and strobe (CE and BE) signals have setup time of WRSETUP cycles as programmed in the EMIF CE space control register (CECTL). However, the data lines (ED) may become valid one cycle later than the address (EA) and strobe (CE and BE) signals.
Asynchronous Interface 1.5.4 Ready Input In addition to programmable access shaping, you can insert extra cycles into the strobe period by deactivating the ARDY input. The ready input is internally synchronized to the CPU clock (C620x/C670x EMIF), ECLKOUT (C621x/C671x EMIF), or ECLKOUT1 (C64x EMIF). This synchronization allows an asynchronous ARDY input while avoiding metastablility.
Asynchronous Interface 1.5.4.2 C621x/C671x EMIF If ARDY is low on the first rising edge of ECLKOUT before the end of the programmed strobe period (Figure 1−12), then the strobe period is extended by one ECLKOUT cycle. For each subsequent ECLKOUT rising edge that ARDY is sampled low, the strobe period is extended by one ECLKOUT cycle.
Asynchronous Interface 1.5.4.3 C64x EMIF If ARDY is low on the second rising edge of ECLKOUT before the end of the programmed strobe period (Figure 1−13), then the strobe period is extended by one ECLKOUT cycle. For each subsequent ECLKOUT rising edge that ARDY is sampled low, the strobe period is extended by one ECLKOUT cycle.
Resetting the EMIF 1.6 Resetting the EMIF A hardware reset using the RESET pin on the device forces all register values to their reset state. During reset, all outputs are driven to their inactive levels, with the exception of the clock outputs (SDCLK, SSCLK, CLKOUT1, and CLKOUT2).
Hold Interface 1.7 Hold Interface The EMIF responds to hold requests for the external bus. The hold handshake allows an external device and the EMIF to share the external bus. The hand- shake mechanism uses: HOLD: hold request input. HOLD synchronizes internally to the CPU clock.
Hold Interface Note: There is no mechanism to ensure that the external device does not attempt to drive the bus indefinitely. You should be aware of system-level issues, such as refresh, that you may need to perform. During host requests, the refresh counters within the EMIF continue to log refresh requests;...
Boundary Conditions When Accessing EMIF Registers 1.8 Boundary Conditions When Accessing EMIF Registers The C6000 EMIF has internal registers that change memory type, asynchronous memory timing, SDRAM refresh, SDRAM initialization (MRS COMMAND), clock speed, arbitration type, HOLD/NOHOLD condition, etc. The following actions can cause improper data reads or writes: Writing to the CE0, CE1, CE2, or CE3 space control registers while an external access to that CE space is active.
Clock Output Enabling Clock Output Enabling 1.9 Clock Output Enabling To reduce electromagnetic interference (EMI) radiation, the C62x/C67x EMIF allows the disabling (holding high) of CLKOUT2, CLKOUT1 (all C62x/C67x devices, except C6713 DSP), SSCLK, and SDCLK. This disabling is performed by clearing the CLK2EN, CLK1EN, SSCEN, and SDCEN bits to 0 in the EMIF global control register (GBLCTL).
Chapter 2 TMS320C620x/C670x EMIF This chapter describes the operation and registers of the EMIF in the TMS320C620x/C670x DSP. For operation and registers unique to the TMS320C621x/C671x EMIF, see Chapter 3. For operation and registers unique to the TMS320C64x EMIF, see Chapter 4. Topic Page Overview...
Overview 2.1 Overview The C620x/C670x EMIF services requests of the external bus from four requestors: On-chip program memory controller that services CPU program fetches On-chip data memory controller that services CPU data fetches On-chip direct-memory access (DMA) controller External shared-memory device controller (using EMIF arbitration signals) If multiple requests arrive simultaneously, the EMIF prioritizes them and performs the necessary number of operations.
EMIF Interface Signals 2.2 EMIF Interface Signals following describes EMIF interface signals C620x/C670x devices. 2.2.1 C6201/C6701 EMIF The EMIF signals of the C6201/C6701 DSP are shown in Figure 2−2 and described in Table 2−1. The C6201/C6701 devices provide separate clock and control signals for the SBSRAM and SDRAM interface.
EMIF Interface Signals 2.2.2 C6202(B)/C6203(B)/C6204/C6205 EMIF The EMIF signals of the C6202/C6203/C6204/C6205 DSP are shown in Figure 2−3 and described in Table 2−1. These C620x devices have combined the SDRAM and SBSRAM signals. Only one of these two memory types can be used in a system.
EMIF Interface Signals Table 2−1. TMS320C620x/C670x EMIF Interface Signal Descriptions I/O/Z Description CLKOUT1 Clock output. Runs at the CPU clock rate. CLKOUT2 Clock output. Runs at 1/2 the CPU clock rate. Used for synchronous memory interface on all C620x/C670x devices, except C6201/C6701 DSP. ED[31:0] I/O/Z EMIF 32-bit data bus I/O.
Memory Width and Byte Alignment Memory Width and Byte Alignment / SDRAM Interface 2.3 Memory Width and Byte Alignment The C620x/C670x EMIF supports 32-bit-wide ASRAM, SDRAM, and SBSRAM interface in both big-endian and little-endian modes. CE1 space supports ×16 and ×8 read-only memory (ROM) interfaces. The packing format in ROM is always little-endian, regardless of the value of the LENDIAN config- uration bit.
SDRAM Interface C620x/C670x EMIF, not all the memory space is accessible. Table 2−4 provides examples of possible SDRAM interface to larger memories where only part of the larger memories is accessible. Figure 2−4. EMIF to 16M-Bit SDRAM Interface Block Diagram 16M-bit EMIF SDRAM...
SDRAM Interface 2.4.2 Monitoring Page Boundaries The C620x/C670x EMIF storage and comparison is performed independently for each CE space. The C620x/C670x EMIF has 4 internal page registers. Each page register corresponds to a single CE space. If a given CE space is configured for SDRAM operation (by the MTYPE field in CECTL), the corre- sponding page register is used for accesses to that CE space.
SDRAM Interface 2.4.3 Address Shift The same EMIF pins determine the row and column address, thus the C620x/C670x EMIF interface appropriately shifts the address in row and column address selection. Table 2−5 shows the translation between bits of the byte address and how they appear on the EA pins for row and column addresses on the C620x/C670x DSP.
SDRAM Interface 2.4.4 SDRAM Refresh Mode The RFEN bit in the SDRAM control register (SDCTL) enables the SDRAM refresh mode of the C620x/C670x EMIF. When RFEN = 0, all EMIF refreshes are disabled, and you must ensure that refreshes are implemented in an external device.
SDRAM Interface 2.4.5 Mode Register Set (MRS) The C620x/C670x EMIF automatically performs a deactivate (DCAB) command followed by a mode register set (MRS) command whenever the INIT field in the SDRAM control register (SDCTL) is set. INIT can be set by device reset or by a write.
SDRAM Interface 2.4.7 SDRAM Read During an SDRAM read, the selected bank is activated with the row address during the ACTV command. Figure 2−9 shows the timing for the C620x/C670x EMIF issuing three read commands performed at three different column addresses. The EMIF uses a CAS latency of three and a burst length of one.
SDRAM Interface 2.4.8 SDRAM Write All SDRAM writes have a burst length of one on the C620x/C670x EMIF. The bank is activated with the row address during the ACTV command. There is no latency on writes, so data is output on the same cycle as the column address. Writes to particular bytes are disabled using the appropriate DQM inputs;...
SBSRAM Interface 2.5 SBSRAM Interface The SBSRAM interface on the C620x/C670x EMIF is shown in Figure 2−11. For the C620x/C670x EMIF, the ADV signal of the SBSRAM is pulled high. This disables the internal burst advance counter of the SBSRAM. This inter- face allows bursting by strobing a new address into the SBSRAM on every cycle.
SBSRAM Interface 2.5.1 SBSRAM Read Figure 2−12 shows a four-word read of an SBSRAM. Every access strobes a new address into the SBSRAM, indicated by the SSADS strobe low. The first access requires an initial start-up penalty of two cycles; thereafter, all accesses occur in a single EMIF clock cycle.
SBSRAM Interface 2.5.2 SBSRAM Write Figure 2−13 shows a four-word write to an SBSRAM. Every access strobes a new address into the SBSRAM. The first access requires an initial start-up penalty of two cycles; thereafter, all accesses can occur in a single EMIF clock cycle.
ROM Access Modes 2.6 ROM Access Modes The C620x/C670x EMIF supports 8-bit-wide and 16-bit-wide ROM access modes that are selected by the MTYPE field in the CE space control register (CECTL). In reading data from these narrow memory spaces, the EMIF packs multiple reads into one 32-bit-wide value.
ROM Access Modes 2.6.1 8-Bit ROM Mode In 8-bit ROM mode, the address is left-shifted by 2 bits to create a byte address on EA to access byte-wide ROM. The EMIF always packs four consecutive bytes aligned on a 4-byte boundary (byte address = 4N) into a word access, regardless of the access size.
Memory Request Priority 2.7 Memory Request Priority The C620x/C670x EMIF has multiple requestors competing for the interface. Table 2−9 summarizes the priority scheme that the EMIF uses in the case of multiple pending requests. The priority scheme may change if the DMA channel that issues a request through the DMA controller is of high priority.
EMIF Registers 2.8 EMIF Registers Control of the EMIF and the memory interfaces it supports is maintained through memory-mapped registers within the EMIF. Access to these registers requires the EMIF clock. Table 2−10 lists the memory-mapped registers and their memory addresses in the C620x/C670x DSP. Table 2−10.
EMIF Registers Figure 2−14. EMIF Global Control Register (GBLCTL) (C6201/C6701 DSP) Reserved R/W-0 Reserved † Reserved ARDY HOLD HOLDA R/W-0 R/W-0 R/W-1 R/W-1 NOHOLD SDCEN SSCEN CLK1EN CLK2EN SSCRT RBTR8 R/W-0 R/W-1 R/W-1 R/W-1 R/W-1 R/W-0 R/W-0 † The reserved bit fields should always be written with their default values when modifying the GBLCTL. Writing a value other than the default value to these fields may cause improper operation.
EMIF Registers Table 2−11. EMIF Global Control Register (GBLCTL) Field Descriptions † † Value Description field symval 31−11 Reserved − Reserved. The reserved bit location is always read as 0. A value written to this field has no effect. ARDY ARDY input bit.
EMIF Registers Table 2−11. EMIF Global Control Register (GBLCTL) Field Descriptions (Continued) † † Value Description field symval CLK1EN CLKOUT1 enable bit. DISABLE CLKOUT1 is held high. ENABLE CLKOUT1 is enabled to clock. CLK2EN For C6201/C6701 DSP: CLKOUT2 is enabled/disabled using SSCEN/SDCEN bits.
EMIF Registers 2.8.2 EMIF CE Space Control Registers (CECTL0−3) The CE space control register (CECTL) is shown in Figure 2−16 and described in Table 2−12. These registers correspond to the CE memory spaces supported by the EMIF. There are four CE space control registers corresponding to the four external CE signals.
EMIF Registers Table 2−12. EMIF CE Space Control Register (CECTL) Field Descriptions † † Value Description field symval 31−28 WRSETUP OF(value) 0−Fh Write setup width. Number of clock cycles ‡ of setup time for address (EA), chip enable (CE), and byte enables (BE) before write strobe falls.
EMIF Registers 2.8.3 EMIF SDRAM Control Register (SDCTL) The SDRAM control register (SDCTL) controls SDRAM parameters for all CE spaces that specify an SDRAM memory type in the MTYPE field of the associated CE space control register (CECTL). Because SDCTL controls all SDRAM spaces, each space must contain SDRAM with the same refresh, timing, and page characteristics.
EMIF Registers Table 2−13. EMIF SDRAM Control Register (SDCTL) Field Descriptions † † Value Description field symval 31−27 Reserved − Reserved. The reserved bit location is always read as 0. A value written to this field has no effect. SDWID SDRAM column width select.
EMIF Registers 2.8.4 EMIF SDRAM Timing Register (SDTIM) The SDRAM timing register (SDTIM) controls the refresh period in terms of EMIF clock cycles. The SDTIM is shown in Figure 2−18 and described in Table 2−14. Optionally, the PERIOD field can send an interrupt to the CPU. Thus, this counter can be used as a general-purpose timer if SDRAM is not used by the system.
Chapter 3 TMS320C621x/C671x EMIF This chapter describes the operation and registers of the EMIF in the TMS320C621x/C671x DSP. For operation and registers unique to the TMS320C620x/C670x EMIF, see Chapter 2. For operation and registers unique to the TMS320C64x EMIF, see Chapter 4. Topic Page Overview...
Overview 3.1 Overview The C621x/C671x EMIF services requests of the external bus from two requestors: On-chip enhanced direct-memory access (EDMA) controller External shared-memory device controller A block diagram of the C621x/C671x DSP is shown in Figure 3−1. Figure 3−1. TMS320C621x/C671x DSP Block Diagram EMIF L1P Cache C6000 DSP core...
EMIF Interface Signals 3.2 EMIF Interface Signals The EMIF signals of the C621x/C671x DSP are shown in Figure 3−2 and described in Table 3−1. The C621x/C671x EMIF has the following features: All of the memories interfacing with the C621x/C671x EMIF should oper- ate off of ECLKOUT (EMIF clock output).
EMIF Interface Signals Table 3−1. TMS320C621x/C671x EMIF Interface Signal Descriptions I/O/Z Description CLKOUT1 Clock output. Runs at the CPU clock rate. CLKOUT2 Clock output. Runs at 1/2 the CPU clock rate. ECLKIN EMIF clock input. Must be provided by the system on C621x/C671x DSP. ECLKOUT EMIF clock output.
Memory Width and Byte Alignment 3.3 Memory Width and Byte Alignment The C621x/C671x EMIF supports memory widths of 8 bits, 16 bits, and 32 bits, including reads and writes of both big- and little-endian devices. The C6712 EMIF supports memory widths of 8 bits and 16 bits only. There is no distinction between ROM and asynchronous interface.
SDRAM Interface 3.4 SDRAM Interface The C621x/C671x EMIF supports SDRAM commands shown in Table 1−2 and Table 1−3 shows the signal truth table for the SDRAM commands. Table 1−4 summarizes the pin connection and related signals specific to SDRAM operation. Table 1−5 summarizes the similarities and differences on the C6000 SDRAM interface.
SDRAM Interface 3.4.1 Monitoring Page Boundaries The C621x/C671x EMIF can simultaneously open up to four pages of SDRAM. These pages can be within a single CE space, or spread over all CE spaces. For example, two pages can be open in CE0 and CE2, or four pages can be open in CE0.
SDRAM Interface Figure 3−6. Logical Address-to-Page Register Mapping for 32-Bit Logical Address CE space nrb=11 ncb=8 CE space nrb=11 ncb=8 nbb=2 CE space nrb=12 ncb=8 CE space nrb=12 ncb=8 nbb=2 CE space nrb=13 ncb=8 CE space nrb=13 ncb=8 nbb=2 Page Register= nrb + nbb CE space nrb=11 ncb=9...
SDRAM Interface 3.4.2 Address Shift The same EMIF pins determine the row and column address, thus the C621x/C671x EMIF interface appropriately shifts the address in row and column address selection. Table 3−4 describes the addressing for a 8-, 16-, and 32-bit-wide SDRAM interface. The address presented on the pins are shifted for 8-bit and 16-bit interfaces.
SDRAM Interface Table 3−4. Byte Address-to-EA Mapping for 8-, 16-, and 32-Bit Interface # of [21:17] column column Interface DRAM address bus width bits É É É É É É É É É É É É É É É É É É...
SDRAM Interface 3.4.3 SDRAM Refresh Mode The RFEN bit in the SDRAM control register (SDCTL) enables the SDRAM refresh mode of the C621x/C671x EMIF. When RFEN = 0, all EMIF refreshes are disabled, and you must ensure that refreshes are implemented in an external device.
SDRAM Interface 3.4.5 Timing Requirements Several SDRAM timing parameters decouple the EMIF from SDRAM speed limitations. The C621x/C671x EMIF has additional timing parameters that are programmable using the SDRAM control register (SDCTL) and the SDRAM extension register (SDEXT), as shown in Table 3−6. Consult the SDRAM data sheet for information on the appropriate parameters for the specific SDRAM.
SDRAM Interface Table 3−7. Recommended Values for Command-to-Command Parameters Suggested Suggested value for value for Value in EMIF Parameter Description clock cycles † TCL = 0 TCL = 1 READ to READ command to READ command. RD2RD + 1 RD2RD = 0 RD2RD = 0 READ Used to interrupt a READ burst for random...
SDRAM Interface 3.4.6 SDRAM Read Figure 3−9 shows the C621x/C671x EMIF performing a three word read burst from SDRAM. The EMIF uses a burst length of four, and has a programmable CAS latency of either two or three cycles. The CAS latency is three cycles in this example (CASL = 1).
SDRAM Interface 3.4.7 SDRAM Write All SDRAM writes have a burst length of four on the C621x/C671x EMIF. The bank is activated with the row address during the ACTV command. Writes have no latency, so data is output on the same cycle as the column address. Writes to particular bytes are disabled using the appropriate DQM inputs;...
SBSRAM Interface 3.5 SBSRAM Interface Figure 3−11 shows the SBSRAM interface on the C621x/C671x EMIF. The interface takes advantage of the internal advance counter of the SBSRAM. For this interface, the ADV signal is pulled low, so that every access to the SBSRAM from the C621x/C671x DSP is assumed to be a four-word burst.
SBSRAM Interface Gaps may occur within a read burst due to other DMA activities. The following specific condition also causes a gap in a read burst: when requesting a read from SBSRAM, a delay of one ECLKOUT cycle will be observed. This only happens when reading a burst of (N ×...
EMIF Registers 3.7 EMIF Registers Control of the EMIF and the memory interfaces it supports is maintained through memory-mapped registers within the EMIF. Access to these registers requires the EMIF clock. Table 3−10 lists the memory-mapped registers in the C621x/C671x DSP. See the device-specific datasheet for the memory address of these registers.
EMIF Registers Table 3−11. EMIF Global Control Register (GBLCTL) Field Descriptions † † Value Description field symval 31−12 Reserved − Reserved. The reserved bit location is always read as 0. A value written to this field has no effect. BUSREQ Bus request (BUSREQ) output bit indicates if the EMIF has an access/refresh pending or in progress.
EMIF Registers Table 3−11. EMIF Global Control Register (GBLCTL) Field Descriptions (Continued) † † Value Description field symval CLK1EN Not on C6713, C6712C, and C6711C DSP: CLKOUT1 enable bit. On C6713, C6712C, and C6711C DSP, this bit must be programmed to 0 for proper operation. DISABLE CLKOUT1 is held high.
EMIF Registers Table 3−12. EMIF CE Space Control Register (CECTL) Field Descriptions (Continued) † † Value Description field symval 7−4 MTYPE § 0−Fh Memory type of the corresponding CE spaces. ASYNC8 8-bit-wide asynchronous interface. ASYNC16 16-bit-wide asynchronous interface. ASYNC32 32-bit-wide asynchronous interface. SDRAM32 32-bit-wide SDRAM.
EMIF Registers 3.7.3 EMIF SDRAM Control Register (SDCTL) The SDRAM control register (SDCTL) controls SDRAM parameters for all CE spaces that specify an SDRAM memory type in the MTYPE field of the associated CE space control register (CECTL). Because SDCTL controls all SDRAM spaces, each space must contain SDRAM with the same refresh, timing, and page characteristics.
EMIF Registers 3.7.4 EMIF SDRAM Timing Register (SDTIM) The SDRAM timing register (SDTIM) controls the refresh period in terms of EMIF clock cycles. The SDTIM is shown in Figure 3−17 and described in Table 3−14. Optionally, the PERIOD field can send an interrupt to the CPU. Thus, this counter can be used as a general-purpose timer if SDRAM is not used by the system.
EMIF Registers 3.7.5 EMIF SDRAM Extension Register (SDEXT) The SDRAM extension register (SDEXT) allows programming of many parameters of SDRAM. The SDEXT is shown in Figure 3−18 and described in Table 3−15. This programmability offers two distinct advantages: Allows an interface to a wide variety of SDRAMs and is not limited to a few configurations or speed characteristics.
Page 110
EMIF Registers Table 3−15. EMIF SDRAM Extension Register (SDEXT) Field Descriptions (Continued) † † Value Description field symval 16−15 R2WDQM OF(value) 0−3h Specifies number of of cycles that BEx signals must be high preceding a WRITE interrupting a READ. R2WDQM = (# of cycles BEx high) − 1 14−12 RD2WR OF(value) 0−7h...
Chapter 4 TMS320C64x EMIF This chapter describes the operation and registers of the EMIF in the TMS320C64x DSP. operation registers unique TMS320C620x/C670x EMIF, see Chapter 2. For operation and registers unique to the TMS320C621x/C671x EMIF, see Chapter 3. Topic Page Overview .
Overview 4.1 Overview The C64x EMIF services requests of the external bus from two requestors: On-chip enhanced direct-memory access (EDMA) controller External shared-memory device controller A block diagram of the C64x DSP is shown in Figure 4−1. The C64x EMIF offers additional flexibility by replacing the SBSRAM mode with a program- mable synchronous mode, which supports glueless interfaces to the following: ZBT (zero bus turnaround) SRAM...
EMIF Interface Signals 4.2 EMIF Interface Signals The EMIF signals of the C64x DSP are shown in Figure 4−2 and described in Table 4−2. These signals apply to both EMIFA and EMIFB with the exception of the SDCKE signal, which applies to EMIFA only. The C64x EMIF is an enhanced version of the C621x EMIF.
EMIF Interface Signals Table 4−2. TMS320C64x EMIF Interface Signal Descriptions I/O/Z Description CLKOUT4 Clock output. Runs at 1/4 the CPU clock rate. CLKOUT4 pin is MUXed with the GP1 (general-purpose input/output 1 pin); by default, this pin functions as CLKOUT4. CLKOUT6 Clock output.
Page 116
EMIF Interface Signals Table 4−2. TMS320C64x EMIF Interface Signal Descriptions (Continued) I/O/Z Description SDRAS Active-low row address strobe for SDRAM memory interface. Synchronous memory output enable. Active-low read strobe for asynchronous memory interface. SDCAS Active-low column address strobe for SDRAM memory interface. SADS/SRE Synchronous memory address strobe or read enable (selected by RENEN in CE space secondary control register).
Memory Width and Byte Alignment 4.3 Memory Width and Byte Alignment The C64x DSP has two EMIFs: EMIFA and EMIFB. EMIFA supports memory widths of 8 bits, 16 bits, 32 bits, and 64 bits. EMIFB supports memory widths of 8 bits and 16 bits. Table 4−3 summarizes the addressable memory ranges on the C64x device.
SDRAM Interface 4.4 SDRAM Interface The C64x EMIF supports SDRAM commands shown in Table 1−2 and Table 1−3 shows the signal truth table for the SDRAM commands. Table 1−4 summarizes the pin connection and related signals specific to SDRAM operation. Table 1−5 summarizes the similarities and differences on the C6000 SDRAM interface.
SDRAM Interface 4.4.1 Monitoring Page Boundaries Similar to the C621x/C671x EMIF, up to four pages of SDRAM can be opened simultaneously with the C64x EMIF SDRAM paging scheme. This can be all in one CE space, or spread across multiple CE spaces. However, the page register always stores 16 bits of address (instead of being limited by the number of row address bits plus the number of bank address bits (NRB + NBB)).
SDRAM Interface Figure 4−5. Logical Address-to-Page Register Mapping for EMIFA CE space nrb=11 ncb=8 CE space nrb=11 ncb=8 nbb=2 CE space nrb=12 ncb=8 CE space nrb=12 ncb=8 nbb=2 CE space nrb=13 ncb=8 CE space nrb=13 ncb=8 nbb=2 Page Register=16 bits CE space nrb=11 ncb=9...
SDRAM Interface Figure 4−6. Logical Address-to-Page Register Mapping for EMIFB CE space nrb=11 ncb=8 CE space nrb=11 ncb=8 nbb=2 CE space nrb=12 ncb=8 CE space nrb=12 ncb=8 nbb=2 CE space nrb=13 ncb=8 CE space nrb=13 ncb=8 nbb=2 Page Register=16 bits CE space nrb=11 ncb=9...
SDRAM Interface 4.4.2 Address Shift The same EMIF pins determine the row and column address, thus the C64x EMIF interface appropriately shifts the address in row and column address selection. Table 4−5 describes the addressing for a 8-, 16-, 32-, and 64-bit-wide SDRAM interface.
SDRAM Interface Table 4−5. Byte Address-to-EA Mapping for 8-, 16-, 32-, 64-Bit Interface EMIFB ‡ EMIFA # of Inter- ‡ column column face face address DRAM bits width É É É É É É É É É É É É É...
Page 127
SDRAM Interface 4.4.4 SDRAM Self-Refresh Mode The SLFRFR bit in the SDRAM control register (SDCTL) forces the C64x EMIF to place the external SDRAM in a low-power mode (self refresh), in which the SDRAM maintains valid data while consuming a minimal amount of power.
SDRAM Interface Note: The EMIF SDCKE signal must be connected to the SDRAM CKE signal for proper SLFRFR operation. 4.4.5 Mode Register Set (MRS) The C64x EMIF uses a mode register value of either 0032h or 0022h. The register value and description are shown in Figure 4−7 and summarized in Table 4−6.
SDRAM Interface 4.4.6 Timing Requirements Several SDRAM timing parameters decouple the EMIF from SDRAM speed limitations. The C64x EMIF has additional timing parameters that are programmable using the SDRAM control register (SDCTL) and the SDRAM extension register (SDEXT), as shown in Table 4−7. Consult the SDRAM data sheet for information on the appropriate parameters for a specific SDRAM.
SDRAM Interface Table 4−8. Recommended Values for Command-to-Command Parameters Suggested Suggested value for value for Value in EMIF Parameter Description clock cycles † TCL = 0 TCL = 1 READ to READ command to READ command. RD2RD + 1 RD2RD = 0 RD2RD = 0 READ Used to interrupt a READ burst for random...
SDRAM Interface 4.4.7 SDRAM Read Figure 4−9 shows the C64x EMIF performing a three doubleword (EMIFA) or halfword (EMIFB) read burst from SDRAM. The EMIF uses a burst length of four, and has a programmable CAS latency of either two or three cycles. The CAS latency is three cycles in this example (CASL = 1).
SDRAM Interface 4.4.8 SDRAM Write All SDRAM writes have a burst length of four on the C64x EMIF. The bank is activated with the row address during the ACTV command. Writes have no latency, so data is output on the same cycle as the column address. Writes to particular bytes are disabled using the appropriate DQM inputs;...
Programmable Synchronous Interface 4.5 Programmable Synchronous Interface The C64x EMIF offers additional flexibility by replacing the SBSRAM interface with a programmable synchronous interface. The programmable synchro- nous interface supports glueless interfaces to the following devices: Pipelined and flow-through SBSRAM Zero bus turnaround (ZBT) synchronous pipeline SRAM Synchronous FIFOs in standard and first word fall through (FWFT) mode The programmable synchronous interface is configured by the CE space secondary control register (CESEC).
Programmable Synchronous Interface 4.5.1 SBSRAM Interface The programmable synchronous mode supports SBSRAM interface, shown in Figure 4−11. In order to support different synchronous memory types, the C64x SBSRAM interface combines the C620x/C670x EMIF and C621x/C671x EMIF interfaces. The C64x interface does not explicitly make use of the burst mode of the SBSRAM.
Programmable Synchronous Interface 4.5.1.1 SBSRAM Read Figure 4−12 shows a six-element (doubleword for EMIFA, halfword for EMIFB) read with a two-cycle read latency of an SBSRAM for the C64x EMIF. Every access strobes a new address into the SBSRAM, indicated by the SADS strobe low.
Programmable Synchronous Interface 4.5.1.2 SBSRAM Write Figure 4−13 shows a six-element (doubleword for EMIFA, halfword for EMIFB) write to SBSRAM. Every access strobes a new address into the SBSRAM. The C64x EMIF issues a deselect cycle at the end of the burst transfer.
Programmable Synchronous Interface 4.5.2 Zero Bus Turnaround (ZBT) SRAM Interface The programmable synchronous mode supports zero bus turnaround (ZBT) SRAM interface shown in Figure 4−14. For ZBT SRAM interface, the following fields in CESEC must be set: SYNCRL = 10b; 2 cycle read latency SYNCWL = 10b;...
Programmable Synchronous Interface 4.5.2.1 ZBT SRAM Read The ZBT SRAM read waveforms are identical to the SBSRAM read wave- forms, since the register settings corresponding to the reads are the same. Refer to section 4.5.1.1 for details. 4.5.2.2 ZBT SRAM Write For ZBT SRAM writes, the control signal waveforms are exactly the same as standard SRAM writes.
Programmable Synchronous Interface 4.5.3 Synchronous FIFO Interface The programmable synchronous mode supports both standard timing synchronous FIFO interface and first word fall through (FWFT) FIFO interface. For synchronous FIFO interface, set the following field in CESEC: RENEN = 1; SADS/SRE signal acts as SRE signal Figure 4−16 shows the synchronous FIFO interface with glue.
Programmable Synchronous Interface 4.5.3.1 Standard Synchronous FIFO Read Figure 4−19 and Figure 4−20 show a six-word read from a standard synchro- nous FIFO. The CESEC settings are: SYNCRL = 01b; one cycle read latency RENEN = 1; SADS/SRE signal acts as SRE signal CEEXT = 0;...
Programmable Synchronous Interface 4.5.3.2 Standard Synchronous FIFO Write Figure 4−21 shows a six-word write to a standard synchronous FIFO. The CESEC settings are: SYNCWL = 00b; zero cycle write latency RENEN = 1; SADS/SRE signal acts as SRE signal Figure 4−21. Standard Synchronous FIFO Write Timing Diagram Write Write Write...
Page 145
Programmable Synchronous Interface 4.5.3.4 First Word Fall Through (FWFT) Synchronous FIFO Read Figure 4−22 shows a six-word read from a first word fall through (FWFT) synchronous FIFO. The CESEC settings are: SYNCRL = 00b; zero cycle read latency RENEN = 1; SADS/SRE signal acts as SRE signal CEEXT = 0;...
Page 146
Peripheral Device Transfer (PDT) 4.6 Peripheral Device Transfer (PDT) To perform a peripheral device transfer (PDT), the PDTS or PDTD bits in the EDMA options parameter must be appropriately set (see the TMS320C6000 DSP Enhanced DMA (EDMA) Controller Reference Guide (SPRU234) for details).
Peripheral Device Transfer (PDT) 2) Generates PDT control signal (PDT) and the PDT address pins. PDT is asserted low 0, 1, 2, or 3 cycles prior to the data phase of the transaction. The PDTWL and PDTRL fields in the PDT control register (PDTCTL) control the latency of the PDT signal for write and read transfers, respec- tively (see section 4.8.7).
Page 148
Peripheral Device Transfer (PDT) 4.6.1 PDT Write A PDT write transfer refers to a transfer from a peripheral to memory, in which the memory is physically written. To enable a PDT write transfer, set the PDTD bit in the EDMA options field to 1. The assertion/deassertion of the PDT address pins (PDTA and PDTDIR) and the PDT pin are timed according to the destination memory clock.
Peripheral Device Transfer (PDT) 4.6.1.1 PDT Write Examples Both the standard synchronous (STD) FIFO interface and the first word fall through (FWFT) FIFO interface support PDT write transactions. Table 4−11 gives an overview of the supported systems. Figure 4−24 through Figure 4−29 describe the various systems where PDT write transfers are supported.
Peripheral Device Transfer (PDT) Figure 4−29. Case C: PDT Write Transfer From Standard FIFO With Glue Timing Diagram ACTV/PDT_OPEN WRITE ECLKOUT †‡ BE[7:0] †‡ ED[63:0] † EA[18:14] Prev Bank/Row † EA13 Prev outputs † EA[12:3] Prev Column SDRAS SDCAS SDWE FIFO inputs †...
Page 157
Peripheral Device Transfer (PDT) 4.6.2 PDT Read A PDT read transfer refers to a transfer from memory to a peripheral, in which the memory is physically read. To enable a PDT read transfer, set the PDTS bit in the EDMA options field to 1. The assertion/deassertion of the PDT address pins (PDTA and PDTDIR) and the PDT pin are timed according to the source memory clock.
Peripheral Device Transfer (PDT) 4.6.2.1 PDT Read Examples Both the standard synchronous FIFO interface and the first word fall through (FWFT) FIFO interface support PDT read transactions. Figure 4−31 shows an example of a PDT read transaction from SDRAM to a synchronous FIFO. The PDT signal is used to generate the write enable (WEN) input to the FIFO.
Peripheral Device Transfer (PDT) Figure 4−32. Case D: Glueless PDT Read Transfer to Synchronous FIFO Timing Diagram Read data latched Read data latched Read data latched Read data ACTV/PDT_OPEN Read latched ECLKOUT †‡ BE[7:0] †‡ ED[63:0] † EA[18:14] Prev Bank/Row †...
Page 161
Peripheral Device Transfer (PDT) 4.6.3 PDT Transfers with Multiple FIFOs on the Same Bus The following sections describe PDT transfers with multiple FIFOs connected to a single CE space via the same data bus. 4.6.3.1 PDT Read and Write Transactions on the Same Bus If both PDT read and write transactions are required on the same bus, glue is required to properly create the OE, REN, and WEN signals for the FIFO.
Peripheral Device Transfer (PDT) Figure 4−34. Case E: PDT Write Transfer with Read and Write FIFOs in the System (FWFT FIFO) Timing Diagram WRITE ACTV/PDT_OPEN ECLKOUT † ED[63:0] PDTDIR † For EMIFB, ED[15:0] is used; for 32-bit EMIFA, ED[31:0] is used. Figure 4−35.
Peripheral Device Transfer (PDT) 4.6.3.2 Multiple PDT Read and Write Transactions on the Same Bus Each of the previous systems can extend to include additional read and or write FIFOs. In a system where more than two synchronous FIFOs interface to a single CE space, additional unused upper row address bits of the SDRAM can be used to select the appropriate FIFO for the current transaction.
(MTYPE) bus width. Element size (ESIZE) is set to a 32-bit word. This is a preferred setting, see the TMS320C6000 DSP Enhanced DMA (EDMA) Controller Reference Guide (SPRU234). Element count (ELECNT) is set to a multiple of the bus width size (in elements).
EMIF Registers 4.8 EMIF Registers Control of the EMIF and the memory interfaces it supports is maintained through memory-mapped registers within the EMIF. Access to these registers requires the EMIF clock. Table 4−15 lists the memory-mapped registers in the C64x DSP. See the device-specific datasheet for the memory address of these registers.
EMIF Registers Table 4−16. EMIF Global Control Register (GBLCTL) Field Descriptions † † Value Description field symval 31−20 Reserved − Reserved. The reserved bit location is always read as 0. A value written to this field has no effect. § 19−18 EK2RATE 0−3h ECLKOUT2 rate.
Page 169
EMIF Registers Table 4−16. EMIF Global Control Register (GBLCTL) Field Descriptions (Continued) † † Value Description field symval ARDY ARDY input bit. Valid ARDY bit is shown only when performing asynchronous memory access (when async CEn is active). ARDY input is low. External device is not ready. HIGH ARDY input is high.
EMIF Registers Table 4−16. EMIF Global Control Register (GBLCTL) Field Descriptions (Continued) † † Value Description field symval CLK6EN ¶ CLKOUT 6 enable bit. CLKOUT6 pin is muxed with GP2 pin. Upon exiting reset, CLKOUT6 is enabled and clocking. After reset, CLKOUT6 may be configured as GP2 via the GPIO enable register (GPEN).
EMIF Registers Figure 4−37. EMIF CE Space Control Register (CECTL) 28 27 22 21 20 19 WRSETUP WRSTRB WRHLD RDSETUP R/W-1111 R/W-11 1111 R/W-11 R/W-1111 14 13 RDSTRB MTYPE WRHLDMSB RDHLD R/W-11 R/W-11 1111 R/W-0 R/W-0 R/W-011 Legend: R/W = Read/Write; -n = value after reset Table 4−17.
Page 172
EMIF Registers Table 4−17. EMIF CE Space Control Register (CECTL) Field Descriptions (Continued) † † Value Description field symval 7−4 MTYPE § 0−Fh Memory type of the corresponding CE spaces. ASYNC8 8-bit-wide asynchronous interface. ASYNC16 16-bit-wide asynchronous interface. ASYNC32 32-bit-wide asynchronous interface. SDRAM32 32-bit-wide SDRAM.
EMIF Registers 4.8.3 EMIF CE Space Secondary Control Registers (CESEC0−3) The CE space secondary control register (CESEC) is shown in Figure 4−38 and described in Table 4−18. These registers are added for the programmable synchronous interface, and control the cycle timing of programmable synchronous memory accesses and the clock, used for synchronization for the specific CE space.
EMIF Registers Table 4−18. EMIF CE Space Secondary Control Register (CESEC) Field Descriptions † † Value Description field symval 31−7 Reserved − Reserved. The reserved bit location is always read as 0. A value written to this field has no effect. SNCCLK Synchronization clock selection bit.
EMIF Registers 4.8.4 EMIF SDRAM Control Register (SDCTL) The SDRAM control register (SDCTL) controls SDRAM parameters for all CE spaces that specify an SDRAM memory type in the MTYPE field of the associated CE space control register (CECTL). Because SDCTL controls all SDRAM spaces, each space must contain SDRAM with the same refresh, timing, and page characteristics.
Page 176
EMIF Registers Table 4−19. EMIF SDRAM Control Register (SDCTL) Field Descriptions (Continued) † † Value Description field symval 29−28 SDRSZ 0−3h SDRAM row size bits. 11ROW 11 row address pins (2048 rows per bank). 12ROW 12 row address pins (4096 rows per bank). 13ROW 13 row address pins (8192 rows per bank).
EMIF Registers Table 4−19. EMIF SDRAM Control Register (SDCTL) Field Descriptions (Continued) † † Value Description field symval 11−1 Reserved − Reserved. The reserved bit location is always read as 0. A value written to this field has no effect. SLFRFR Self-refresh mode, if SDRAM is used in the system: DISABLE...
EMIF Registers 4.8.6 EMIF SDRAM Extension Register (SDEXT) The SDRAM extension register (SDEXT) allows programming of many parameters of SDRAM. The SDEDXT is shown in Figure 4−41 and described in Table 4−21. The programmability offers two distinct advantages: Allows an interface to a wide variety of SDRAMs and is not limited to a few configurations or speed characteristics.
Page 180
EMIF Registers Table 4−21. EMIF SDRAM Extension Register (SDEXT) Field Descriptions (Continued) † † Value Description field symval 16−15 R2WDQM OF(value) 0−3h Specifies number of of cycles that BEx signals must be high pre- ceding a WRITE interrupting a READ. R2WDQM = (# of cycles BEx high) −...
EMIF Registers 4.8.7 EMIF Peripheral Device Transfer Control Register (PDTCTL) The peripheral device transfer control register (PDTCTL) configures the latency of the PDT signal with respect to the data phase of the transaction. The PDTCTL is shown in Figure 4−42 and defined in Table 4−22. Figure 4−42.
Appendix A Appendix A Revision History Table A−1 lists the changes made since the previous version of this document. Table A−1. Document Revision History Page Additions/Modifications/Deletions Added last paragraph in section 1.3.1: For the duration of SDRAM initialization, the BE signals are inactive high.
Page 183
Revision History Table A−1. Document Revision History (Continued) Page Additions/Modifications/Deletions Added second and third paragraph in section 2.4: The C620x/C670x EMIF allows programming of the SDRAM column size to be 8 or 9 address bits. The number of row address bits and bank bits are not user-programmable.
Page 184
Revision History Table A−1. Document Revision History (Continued) Page Additions/Modifications/Deletions 3-10 Added Note in Table 3−3: Other SDRAM configurations are possible, if the number of column, row, and bank bits are supported by the C621x/C671x DSP. 3-12 Changed title in Figure 3−6: Logical Address-to-Page Register Mapping for 32-Bit Logical Address 3-23 Added first two sentences: Gaps may occur within a read burst due to other DMA activities.
Page 185
Revision History Table A−1. Document Revision History (Continued) Page Additions/Modifications/Deletions 4-25 Changed first paragraph in section 4.5.1. The programmable synchronous mode supports SBSRAM interface, shown in Figure 4−11. In order to support different synchronous memory types, the C64x SBSRAM interface combines the C620x/C670x EMIF and C621x/C671x EMIF interfaces.
Page 186
Index Index EMIF to 16M-bit SDRAM interface C620x/C670x DSP 2-7 C621x/C671x DSP 3-9 ARDY bit, in GBLCTL EMIF to 32-bit SRAM interface 1-15 C6201/C6701 DSP 2-24 EMIF to 64M-bit SDRAM interface C6202/C6203/C6204/C6205 DSP 2-24 C620x/C670x DSP 2-7 C621x/C671x DSP 3-25 C64x DSP 4-9 C64x DSP 4-57 EMIF to ROM interface...
Page 187
Index EMIF global control register (GBLCTL) C620x/C670x DSP 2-23 C621x/C671x DSP 3-25 CE space control registers (CECTL) C64x DSP 4-57 C620x/C670x DSP 2-27 EMIF interface C621x/C671x DSP 3-27 programmable synchronous interface C64x DSP 4-60 (C64x DSP) 4-24 CE space secondary control registers SBSRAM 4-25 (CESEC) 4-63 synchronous FIFO 4-30...
Page 188
Index EMIF to ROM interface 8-bit 1-16 16-bit 1-16 INIT bit, in SDCTL 32-bit 1-16 C620x/C670x DSP 2-29 EMIF to SBSRAM interface C621x/C671x DSP 3-30 C620x/C670x DSP 2-17 C64x DSP 4-65 C621x/C671x DSP 3-21 C64x DSP 4-25 EMIF to synchronous FIFO interface (C64x DSP) glueless read 4-31 glueless write 4-31 MAP bit, in GBLCTL...
Page 189
C6201/C6701 DSP 2-24 C621x/C671x DSP 3-32 C6202/C6203/C6204/C6205 DSP 2-24 C64x DSP 4-67 RD2DEAC bits, in SDEXT related documentation from Texas Instruments iii C621x/C671x DSP 3-34 RENEN bit, in CESEC 4-63 C64x DSP 4-69 resetting the EMIF 1-27 RD2RD bit, in SDEXT...