PCI2040 is a bridge chip produced by TI specifically for use between DSP and PCI bus. The internal schematic diagram is shown in Figure 1. For a detailed introduction to PCI2040, please refer to the relevant information from TI (see Reference 1). The PCI local bus standard was proposed by Intel Corporation and formulated by the Peripheral Components Special Interest Group (PCISIG). At present, the PCI bus is no longer a local bus, but has become a popular high-end bus and modern bus, which is widely used in graphics, images, animations and other various peripherals to transmit high-speed data.
The main advantages of the PCI bus are high performance (data transmission rate can reach 132/264Mbps), strong bus versatility, low cost, easy and flexible use. PCI2040 can interface with the 8-bit TMS320c54xHPI bus or the 16-bit TMS320c6x HPI bus. This article describes how to connect the 16-bit HPI interface of TMS320VC5420 to the PCI bus through the 16-bit C6X mode interface of PCI2040.
1 Two ways to map TMS320VC5420 to main memory
TMS320VC5420 is a DSP with two cores A and B. Depending on the number of TMS320VC5420, there are two ways to map TMS320VC5420 to main memory or PC storage space. If the number of TMS320VC5420 is less than three, mapping mode 1 can be used (Figure 2). If the number of TMS320VC5420 is more than two, mapping method 2 (Figure 3) can be used. This method maps each DSP to a specific memory space, and each DSP core or DSP subsystem occupies the same storage space. It is worth noting that the offset of the control space is relative to the value represented by the control space base address register at 14H in the 256-byte PCI configuration register on the PCI2040.
2 Hardware considerations
The TMS320VC5420 is a dual-CPU device with two independent C54X subsystems capable of core-to-core communication. Although PCI2040 is not specifically designed to interface with dual-CPU devices, the interface can still be implemented after special processing. There are three main aspects that need to be considered: ① Conversion from C6201HPI protocol to TMS320VC5420 HPI-16 protocol; ② Switching between two DSP cores; ③ Handling of multiple resets and multiple breaks.
2.1 Conversion of C6x HPI protocol to TMS320VC5420 HPI-16
TMS320VC5420 provides two operating modes for the HPI bus. In non-multiplexed mode (HMODE=1), the TMS320VC5420 HPI interface provides an 18-bit address bus for accessing all internal memories. Multiplexing mode (HMODE=0), address and data multiplex the same pin.
The PCI2040 only completes multiplexing mode, so the HMODE pin of the TMS320VC5420 must be dragged to the address. In addition, since the HPDY signal of C6X HPI is active at low level, and the HRDY signal of TMS320VC5420 is active at high level, a converter (such as SN74ALCV04) must be used for TMS320BVC5420 so that the VCC_H terminal can be directly connected to the VCC terminal.
2.2 Switching between two DSP cores
Select the accessed DSP subsystem through the SELA/B pin of TMS320VC5420. For example, you can connect the PCI2040 pin GPIO2 to SELA/B, so that you can select core A or core B through the high and low levels of GPIO2.
2.3 Multiple HRST TMS320BVC5420 has two ways to control the reset function of each subsystem.
The first one is to keep the A_RS and B_RS pins low when the HPIRS pin transitions from low level to high level, so that the application code can be downloaded to the DSP while the two cores are in reset state. After downloading, you can reset A_RS and B_RS to high level and drag the two subsystems out of reset state. Keeping the A_RS and B_RS pins high while the HPIRS pin transitions from low to high can also download application code to the DSP while both cores are in reset. After downloading, the subsystem can be dragged out of the reset state by writing to address 2FH. In addition, specific subsystems can be selected based on the value of SELA/B.
Second, use Power-on reset logic to reset each subsystem (A_RS and B_RS). In this case, you need to connect the HPIRS pin to the HRST pin of PIC2040. Note that after the application download is complete, there must be a write operation to address 2FH to drag the subsystem out of reset.
2.4 Handling two HINT interrupts generated by the same DSP
How multiple interrupts are handled can be determined based on the number of TMS320VC5420 connected to PCI2040. If there are two or less TMS320VC5420, you can connect A_HINT of the first TMS320VC5420 to HINT0 and B) HINT to HINT1. Connect HINT2 and HINT3 of PCI2040 to A_HINT and B_HINT of the second TMS320VC5420 (as shown in Figure 4). In this case, the memory setting uses mapping mode 1. If the board contains multiple TMS320VC5420s, the two interrupts on each DSP need to be ANDed (as shown in Figure 5). The interrupts on each DSP share the same interrupt line of PCI2040, so it is impossible to know the interrupt requested by the subsystem on a certain DSP. At this time, 1 must be written to the HINT bit of the HPLC register in each subsystem.
In this case, the memory configuration uses mapping mode 2.
3 Software considerations
C6X has a 16-bit HPI interface that uses a 32-bit word length, so all HPI operations require two HPI cycles. Since the 16-bit interface of PCI2040 is used to interface with C6X, PCI2040 also requires two HPI cycles. Unlike C6X, TMS320VC5420 uses a 16-bit word length, so that only one HPI cycle is needed to complete an operation. Therefore, when programmers access TMS320VC5420 through PCI2040, they must know that reading and writing to DSP need to follow special principles.
3.1 Write data to HPIA, HPIC and HPIC registers
When writing data to HPIA (HPI address register), HPIC (HPI control register) and HPID (HPI data register), since the two cycles of PCI2040 operations on the HPI port are for the same register, the data written in the first cycle will be overwritten in the second cycle. Therefore, the data should be written to the register multiple times to ensure the correctness of the written data (Figure 6).
3.2 Read data from HPIA, HPIC, HPID registers
When reading data from the HPIA, HPIC, and HPID registers, PCI reads these registers twice and returns the upper and lower parts of the PCI double byte (Figure 7).
3.3 Utilize the automatic increment feature. In order to maximize the performance of HPI, when reading and writing the HPID register, use the automatic increment feature of the HPIA in the first and second HPI cycles of the DSP register. The auto-increment feature allows two words to be read and written continuously via the PCI bus, ultimately enabling a 32-bit word length to be read and written at one time, thus effectively accelerating the data transfer rate.
Previous article:Application of DMA in real-time image processing
Next article:Interrupt technology and its implementation of TMS320F206
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Blood Oximeter] Disassembly Part 4 Product Trial
- A P-MOS driving circuit
- DS18B20 Digital Temperature Sensor
- Static electricity
- How to create a schematic symbol with many pins?
- EEWORLD University - How to perform frequency response analysis on an oscilloscope
- I am a novice. Why did this happen to Bu Tong? Please help.
- How do you make these snowflake dots on the AD-PCB trace?
- 【NUCLEO-L552ZE Review】-2: Stay in TrustZone
- RAM with integrated power backup