Adaptive parameter configuration method for EMIF storage control interface
Through the adaptive parameter configuration method, combined with the registration mechanism and circular traversal method, the parameter configuration of the EMIF storage control interface is automatically completed, which solves the complex parameter configuration problems caused by the variety of memory types, improves development efficiency and accuracy, and reduces user manual configuration demand.
Patent Information
- Application Number
- CN202410992379.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-23
AI Technical Summary
In the EMIF storage control interface, due to the variety of memory types and different usage methods, the parameter configuration is complex, and users need to spend a lot of time debugging, especially when they are not familiar with the characteristics of the memory chip, which can easily lead to parameter configuration errors and affect project development progress.
The adaptive parameter configuration method is introduced. Through the adaptive configuration method and the circular traversal method, combined with the registration mechanism, the type configuration of the chip-select space CE is automatically completed, and the parameters of different policies are automatically configured according to the memory type, reducing the user's need for manual configuration.
It shortens project development time, avoids the process of users needing to understand storage characteristics and manually configure parameters, improves the efficiency and accuracy of storage operations, and reduces the risk of configuration errors.
Smart Images

Figure CN118964241A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer storage communication, and in particular to an adaptive parameter configuration method of an EMIF storage control interface. Background Art
[0002] The EMIF interface is the memory access interface for the chip to access the external memory, which enables the on-chip computing unit to access the external memory. The supported storage types include: synchronous static RAM, synchronous dynamic RAM, and asynchronous memory. The EMIF and external memory control signals mainly include the four chip select spaces EMIFCE, CE0~CE3, which are connected to the external storage space, the read and write data I / O signal EMIFD, the address signal EMIFA, the slot address selection signal EMIFBA, the byte mask signal EMIFBE, and the write enable EMIFWE. Due to the differences in the external memory ports, the use of the above signals may be slightly different. The corresponding CE space connection storage type configuration selection is performed in the MTYPE (storage type) field of the CE space control register of the EMIF storage interface to identify whether the space should perform synchronous storage or asynchronous storage operations. After the type selection is completed, the parameters are configured in the CEx space control register corresponding to each type. After the parameter configuration is completed, the storage read and write operations can be performed.
[0003] Since there are many types of storage, and each storage has different usage and process, the controller needs to do a lot of parameter configuration for adaptation. Before performing storage operations, a lot of parameter configuration is required to operate the storage. When the user does not have a thorough understanding of certain parameters or is not familiar with the characteristics of the storage chip, the parameter configuration is incorrect, which will cause the user to transmit incorrect data. Problems caused by configuration parameters will cost developers a lot of time to debug storage and delay project development progress. Summary of the invention
[0004] The present invention provides an adaptive parameter configuration method for an EMIF storage control interface to solve the technical problem mentioned in the background technology.
[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0006] The present invention provides an adaptive parameter configuration method for an EMIF storage control interface, which specifically comprises the following steps:
[0007] S1, connecting the host to the EMIF storage control interface, and then connecting multiple chip select spaces CE on the EMIF storage control interface to different and / or the same memories respectively;
[0008] S2, after the EMIF storage control interface waits for the system to be reset, it determines whether the self-adaptive configuration function is started. If not, it enters S3; if yes, it enters S4;
[0009] S3, the user manually configures the parameters of multiple chip select spaces CE according to storage characteristics;
[0010] S4. According to the selection parameters configured by the user, one of the two methods, an adaptive configuration method and a cyclic traversal method, is selected to configure the parameters of the one or more chip selection spaces CE.
[0011] Furthermore, there are three types of memories in S1, namely asynchronous memory, synchronous static memory and synchronous dynamic random access memory.
[0012] Furthermore, the number of the chip select spaces CE is four, the four chip select spaces CE are respectively connected to one of the three memories, and the four chip select spaces CE are not connected to the same memory.
[0013] Furthermore, the S3 specifically includes the following steps:
[0014] S31, the user queries the connection status of the system to understand the connection status of each chip select space CE and the memory;
[0015] S32, configuring parameters of the memory according to the information learned in S31;
[0016] If the current chip select space CE is connected to an asynchronous memory, manually configure the setup, trigger, and hold parameters;
[0017] If the current chip select space CE is connected to the synchronous static memory, manually configure the synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters;
[0018] If the current chip select space CE is connected to the synchronous dynamic random access memory, the column address bit number, the row address bit number, and the memory number parameters are manually configured, and then the synchronous dynamic random access memory SDRAM needs to be initialized; then the SDTIMR and SDSRETR registers are set, and the RR value in the SDRCR register is set to meet the refresh interval parameters of the synchronous dynamic random access memory SDRAM;
[0019] S34, write the corresponding storage parameters through manual programming, and then perform read and write communication with the memory.
[0020] Furthermore, the adaptive configuration method in S4 is specifically as follows:
[0021] S411, the EMIF storage control interface enters an idle mode and waits for an enable signal;
[0022] S412, after receiving the enable signal, the EMIF storage control interface enters the registration mode. In the registration mode, the memory registers the memory with the EMIF storage control interface according to the state of the EMIF interface enable chip select signal and the registration enable signal. The type of memory connected to the current chip select space CE needs to be reported during the registration.
[0023] S413. If the registration fails or times out, proceed to S411; if the registration succeeds, proceed to S414;
[0024] S414, entering the configuration mode, the EMIF storage control interface configures the storage type field of the control register in the chip select space CE through the local configuration interface according to the registration information of the memory response, thereby performing the corresponding memory type configuration;
[0025] S415, entering the working mode, and performing different configuration operations according to different storage type configurations;
[0026] If the current chip select space CE is connected to the asynchronous memory, the configuration establishment, triggering, and holding parameters are configured; the controller generates configuration parameters randomly, and then constrains the range within the configuration interval to write first and then read the asynchronous memory. If the read and write are consistent, the parameters are correct and the configuration process ends; if the read data is inconsistent with the written data, further parameters are generated for read and write tests until the data is read and written correctly, and the configuration process ends; if the configuration parameters are not read and written correctly and the configuration mode is exited by timeout, S3 is entered for manual configuration;
[0027] If the synchronous static memory connected to the current chip select space CE is connected, then configure the synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters; the controller generates configuration parameters randomly, and then constrains the range within the configuration interval to write first and then read the synchronous static memory. If the read and write are consistent, the parameters are correct and the configuration process ends. If they are inconsistent, reconfigure; if timeout, exit the configuration process and enter S3 for manual configuration;
[0028] If the current chip select space CE is connected to the synchronous dynamic random access memory, the number of column address bits, the number of row address bits, and the number of memory parameters are configured; then the synchronous dynamic random access memory SDRAM needs to be initialized; then the SDTIMR and SDSRETR registers are set, and the RR value in the SDRCR register is set to meet the refresh interval parameters of the synchronous dynamic random access memory SDRAM; the constraint memory makes a default value of the synchronous dynamic configuration parameters in the memory configuration space. In the synchronous dynamic memory configuration mode, the configuration state uses the configuration bus to read the default value of the dynamic memory parameter configuration, and then configures the read parameters into the controller, and finally performs a read and write test. If the test passes, the configuration process ends. If it is inconsistent, the configuration test is re-read. If it times out, the configuration process exits and enters S3 for manual configuration.
[0029] Furthermore, the local configuration interface in S413 mainly includes an internal register local address, a read / write signal, a read / write data, and a read / write response.
[0030] Furthermore, the loop traversal method in S4 is specifically as follows:
[0031] S421, reading and writing the connected memory after grouping according to different storage types and corresponding parameters;
[0032] S422, if the storage type is an asynchronous memory, the corresponding asynchronous parameters are randomly set within the set range, and the asynchronous parameters are the establishment, triggering, and holding parameters. The storage type and the asynchronous parameters are packaged for configuration. If the reading and writing are successful, the configuration is successful. If the reading and writing fail, the traversal is continued until the configuration is successful, and the configuration process is terminated;
[0033] If the storage type is a synchronous static memory, the corresponding synchronous static parameters are randomly set within the set range. The synchronous static parameters are synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters. The storage type and the synchronous static parameters are packaged for configuration. If the read and write are successful, the configuration is successful. If the read and write fail, the traversal continues until the configuration is successful and the configuration process ends.
[0034] If the storage type is synchronous dynamic random access memory, configure the column address bit number, row address bit number, and memory number parameters; then the synchronous dynamic random access memory SDRAM needs to be initialized; then set the SDTIMR and SDSRETR registers, and set the RR value in the SDRCR register to meet the refresh interval parameters of the synchronous dynamic random access memory SDRAM; if the read and write are successful, the configuration is successful, if the read and write fail, continue to traverse until the configuration is successful, and end the configuration process.
[0035] Beneficial effects of the present invention:
[0036] 1. The present invention introduces an adaptive configuration method. In addition, the adaptive configuration method introduces a registration mechanism. In the registration mode, the controller collects the registration information of each chip select space CE, and then automatically completes the configuration of the chip select space CE connection type through the internal configuration interface, which solves the problem that the user needs to find the hardware department to check the schematic diagram to understand the SOC connection status before configuring the connection type configuration problem.
[0037] 2. The present invention introduces an adaptive configuration mechanism (i.e., adaptive configuration method and loop traversal method), which has different configuration modes for the three storage types. The controller automatically configures parameters with different strategies according to the different storage types connected, solving the technical problem that users need to understand the storage characteristics, and then manually configure the parameters and continuously debug according to the characteristics and timing, thereby shortening the project development time. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flowchart of the present invention;
[0039] Figure 2 It is a schematic diagram of the connection between the EMIF storage control interface and multiple chip select spaces CE in the present invention;
[0040] Figure 3 is an adaptive operation state diagram in an embodiment of the present invention;
[0041] Figure 4 It is a registration waveform diagram under the registration mode of the present invention. DETAILED DESCRIPTION
[0042] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Preferred embodiments of the present invention are provided in the drawings. However, the present invention can be implemented in many other different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0043] All technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0044] Reference Figure 1 The embodiment of the present application provides an adaptive parameter configuration method of an EMIF storage control interface, which specifically includes the following steps:
[0045] S1, connecting the host to the EMIF storage control interface, and then connecting multiple chip select spaces CE on the EMIF storage control interface to different and / or the same memories respectively;
[0046] S2, after the EMIF storage control interface waits for the system to be reset, it determines whether the self-adaptive configuration function is started. If not, it enters S3; if yes, it enters S4;
[0047] S3, the user manually configures the parameters of multiple chip select spaces CE according to storage characteristics;
[0048] S4. According to the selection parameters configured by the user, one of the two methods, an adaptive configuration method and a cyclic traversal method, is selected to configure the parameters of the one or more chip selection spaces CE.
[0049] In some embodiments, there are three types of memories in S1, namely asynchronous memory, synchronous static memory and synchronous dynamic random access memory. The following introduces three types of storage parameter configurations.
[0050] a. Asynchronous memory. The controller provides flexible read and write cycle settings for various asynchronous memory devices. The main asynchronous memory types include SRAM, EPROM, Flash memory, FIFO, and even some FPGA and ASIC chips. ASRAM must first set the timing width of its read / write operations in the three stages of setup, strobe, and hold for storage operations. The timing of asynchronous memory devices can be controlled by configuring parameters in the EMIF global control register and the corresponding CEx space control register. Asynchronous memory access mainly configures the timing of the read and write cycles of the CEx register. Different parameter settings can realize the timing interface with different asynchronous devices. Each read / write cycle of the asynchronous interface consists of parameter settings: setup, trigger (strobe), and hold (hold). Their respective definitions are:
[0051] Setup: From the beginning of the memory access cycle (chip select, address valid) to the arrival of the read / write enable signal;
[0052] strobe: from read / write signal valid to invalid;
[0053] hold: From the time when the read / write signal is invalid to the end of the access cycle.
[0054] b. Synchronous static memory, its biggest advantage is the high read and write speed. For the continuous read operation of synchronous static storage, a new address strobe is output to SBSRAM in each cycle, and EMIFRW is strobed to low. The initial setup time is 2 cycles for the first read, and a read operation is completed in each subsequent cycle. There is also a read cancellation action after the read is completed. Continuous write operation of synchronous static storage. A new address strobe is output to SBSRAM in each cycle, and EMIFRW is strobed to low. A write operation is completed in each cycle. Synchronous storage access mainly configures the timing parameters of the second register of CEx. Different parameter settings can realize the timing interface with different synchronous devices. The parameter settings constitute their respective definitions:
[0055] SYNCRL: Synchronous interface data write delay, configure the write data delay period;
[0056] SYNCWL: Synchronous interface data read delay, configure the read data delay period;
[0057] CEEXT: CE extension register is enabled, and the configuration read and write are invalid after the last command is completed, or the timing is controlled by the SYNCRL bit during the read cycle.
[0058] RENEN: Read enable valid bit, configures whether the read use signal is valid during reading and writing or when the read and write are released.
[0059] c. Synchronous dynamic random access memory. Synchronous means that the memory needs to synchronize the clock. The sending of internal commands and the transmission of data are based on the clock. Dynamic means that the storage array needs to be constantly refreshed to ensure that the stored data is not lost. Because the data in SDRAM is stored through capacitors, if the power is fully discharged, it means that the data in SDRAM is lost, so SDRAM needs to be refreshed before the capacitor is fully discharged. Random means that the data is not stored linearly in sequence, but the data is read and written at a freely specified address. Before reading and writing synchronous dynamic random access memory, you need to set SDCSZ (the number of column address bits, indicating the page size of the memory), SDRSZ (the number of row address bits, indicating the number of pages per memory) and SDBSZ (the number of memories, the maximum number of pages that can be opened). Then you need to initialize the SDRAM. Then set the SDTIMR and SDSRETR registers. These values need to meet the timing parameters defined in the SDRAM memory chip manual. Set the RR value in the SDRCR register to meet the refresh interval parameters of the SDRAM.
[0060] In some embodiments, the number of the chip select spaces CE is four, the four chip select spaces CE are respectively connected to one of the three memories, and the four chip select spaces CE are not connected to the same memory.
[0061] In some embodiments, S3 specifically includes the following steps:
[0062] S31, the user queries the connection status of the system, and understands the connection status of each chip select space CE and the memory; that is, what memory is connected to each chip select space CE; and then becomes familiar with the characteristic parameters of the memory;
[0063] S32, configuring parameters of the memory according to the information learned in S31;
[0064] If the current chip select space CE is connected to an asynchronous memory, manually configure the setup, trigger, and hold parameters;
[0065] If the current chip select space CE is connected to the synchronous static memory, manually configure the synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters;
[0066] If the current chip select space CE is connected to the synchronous dynamic random access memory, the column address bit number, the row address bit number, and the memory number parameters are manually configured, and then the synchronous dynamic random access memory SDRAM needs to be initialized; then the SDTIMR and SDSRETR registers are set, and the RR value in the SDRCR register is set to meet the refresh interval parameters of the synchronous dynamic random access memory SDRAM;
[0067] S34, write the corresponding storage parameters through manual programming, and then perform read and write communication with the memory.
[0068] In some embodiments, the adaptive configuration method in S4 is specifically as follows:
[0069] S411, the EMIF storage control interface enters an idle mode and waits for an enable signal;
[0070] S412, after receiving the enable signal, the EMIF storage control interface enters the registration mode. In the registration mode, the memory registers with the EMIF storage control interface according to the status of the EMIF interface enable chip select signal and the registration enable signal. The type of memory connected to the current chip select space CE needs to be reported during the registration, such as Figure 4 As shown, after the register enable is pulled high, the Mytype value 00 is asynchronous memory, 01 is synchronous static memory, and 10 is synchronous dynamic random access memory;
[0071] S413. If the registration fails or times out, proceed to S411; if the registration succeeds, proceed to S414;
[0072] S414, entering the configuration mode, the EMIF storage control interface configures the storage type (MTYPE) field of the control register in the chip select space CE through the local configuration interface according to the registration information of the memory response, thereby performing the corresponding memory type configuration;
[0073] S415, entering the working mode, and performing different configuration operations according to different storage type configurations;
[0074] If the current chip select space CE is connected to the asynchronous memory, the configuration is established, triggered, and maintained. Since the asynchronous memory has fewer parameter variables and a controllable parameter range, it can randomly generate data to try to configure the asynchronous memory parameters. Therefore, the controller randomly generates configuration parameters and then constrains the range within the configuration interval to write the asynchronous memory first and then read it. If the read and write are consistent, the parameters are correct and the configuration process ends. If the read data is inconsistent with the write data, further parameters are generated for read and write tests until the data is correctly read and written, and the configuration process ends. If the configuration parameters are not correctly read and written and the configuration mode is exited by timeout, S3 is entered for manual configuration.
[0075] If the synchronous static memory connected to the current chip select space CE is connected, then configure the synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters; similarly, since the synchronous static memory has fewer parameter variables and the parameter range is controllable, it can randomly generate data to try to configure the parameters of the synchronous static memory. Therefore, the controller randomly generates configuration parameters and then constrains the range within the configuration interval to write first and then read the synchronous static memory. If the read and write are consistent, the parameters are correct and the configuration process ends. If they are inconsistent, reconfigure; if timeout, exit the configuration process and enter S3 for manual configuration;
[0076] If the current chip select space CE is connected to the synchronous dynamic random access memory, the number of column address bits, the number of row address bits, and the number of memory parameters are configured; then the synchronous dynamic random access memory SDRAM needs to be initialized; then the SDTIMR and SDSRETR registers are set, and the RR value in the SDRCR register is set to meet the refresh interval parameters of the synchronous dynamic random access memory SDRAM; the constraint memory makes a default value of the synchronous dynamic configuration parameters in the memory configuration space. In the synchronous dynamic memory configuration mode, the configuration state uses the configuration bus to read the default value of the dynamic memory parameter configuration, and then configures the read parameters into the controller, and finally performs a read and write test. If the test passes, the configuration process ends. If it is inconsistent, the configuration test is re-read. If it times out, the configuration process exits and enters S3 for manual configuration.
[0077] Since then, the configuration process of the adaptive configuration method is completed, and the controller enters the working state after completion. In the working state, the CPU can directly read and write the controller of the EMIF storage control interface to perform data read and write operations without configuration. If the user needs to adjust the parameters of the adaptive configuration, the user can reconfigure the storage controller parameters and then perform data transmission. The state diagram of the self-use process is as follows Figure 3 shown.
[0078] The adaptive configuration method defines four modes: idle mode, registration mode, configuration mode, and working mode. Then the transition conditions of each mode are defined, and the adaptive configuration process of three types of memory is introduced in detail. Adaptive configuration of asynchronous memory: setup, trigger (strobe), and hold parameters. Adaptive configuration of synchronous static memory: synchronous interface data write delay (SYNCRL), synchronous interface data read delay (SYNCWL), CE extension register enable (CEEXT), and read enable valid bit (RENEN) parameters. Adaptive configuration of synchronous dynamic memory: SDCSZ (column address bit number, indicating the page size of the memory), SDRSZ (row address bit number, indicating the number of pages per memory) and SDBSZ (memory number, the maximum number of pages that can be opened), and then the SDRAM needs to be initialized. Then set the SDTIMR and SDSRETR registers, and set the RR value in the SDRCR register to meet the refresh interval parameters of the SDRAM. After the adaptive configuration is completed, the system enters the working state, and then the user can perform storage read and write operations.
[0079] In some embodiments, the local configuration interface in S413 mainly includes the local address of the internal register, read / write signals, read / write data, and read / write responses. Through these local configuration interfaces, the adaptive configuration of the EMIF storage control interface is performed, so that the host does not need to participate.
[0080] In some embodiments, the loop traversal method in S4 is specifically as follows:
[0081] S421, reading and writing the connected memory after grouping according to different storage types and corresponding parameters;
[0082] S422, if the storage type is an asynchronous memory, the corresponding asynchronous parameters are randomly set within the set range, and the asynchronous parameters are the establishment, triggering, and holding parameters. The storage type and the asynchronous parameters are packaged for configuration. If the reading and writing are successful, the configuration is successful. If the reading and writing fail, the traversal is continued until the configuration is successful, and the configuration process is terminated;
[0083] If the storage type is a synchronous static memory, the corresponding synchronous static parameters are randomly set within the set range. The synchronous static parameters are synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters. The storage type and the synchronous static parameters are packaged for configuration. If the read and write are successful, the configuration is successful. If the read and write fail, the traversal continues until the configuration is successful and the configuration process ends.
[0084] If the storage type is synchronous dynamic random access memory, configure the column address bit number, row address bit number, and memory number parameters; then the synchronous dynamic random access memory SDRAM needs to be initialized; then set the SDTIMR and SDSRETR registers, and set the RR value in the SDRCR register to meet the refresh interval parameters of the synchronous dynamic random access memory SDRAM; if the read and write are successful, the configuration is successful, if the read and write fail, continue to traverse until the configuration is successful, and end the configuration process.
[0085] The loop traversal configuration method determines the external storage type and realizes automatic configuration by traversing different MYTPE (storage type) values and corresponding configuration parameters. Adaptive configuration of asynchronous memory: setup, trigger (strobe), and hold parameters. Adaptive configuration of synchronous static memory: synchronous interface data write delay (SYNCRL), synchronous interface data read delay (SYNCWL), CE extension register enable (CEEXT), and read enable valid bit (RENEN) parameters. Adaptive configuration of synchronous dynamic memory: SDCSZ (column address bit number, indicating the page size of the storage body), SDRSZ (row address bit number, indicating the number of pages per storage body) and SDBSZ (number of storage bodies, indicating the maximum number of pages that can be opened), and then the SDRAM needs to be initialized. Then set the SDTIMR and SDSRETR registers, and set the RR value in the SDRCR register to meet the refresh interval parameters of the SDRAM.
[0086] The biggest advantage of the cyclic traversal configuration method over the adaptive configuration method is that it does not require registration and directly traverses possible parameters to determine the external storage type. The advantage of this method is that there is no need to add new interface signals to the original EMIF components. The disadvantage is that it is more time-consuming than the adaptive configuration method.
[0087] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention. In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An adaptive parameter configuration method for an EMIF storage control interface, It is characterized in that The specific steps include: S1, connecting the host to the EMIF storage control interface, and then connecting multiple chip select spaces CE on the EMIF storage control interface to different and / or the same memories respectively; S2, after the EMIF storage control interface waits for the system to be reset, it determines whether the self-adaptive configuration function is started. If not, it enters S3; If yes, then enter S4; S3, the user manually configures the parameters of multiple chip select spaces CE according to storage characteristics; S4. According to the selection parameters configured by the user, one of the two methods, an adaptive configuration method and a cyclic traversal method, is selected to configure the parameters of the one or more chip selection spaces CE.
2. The adaptive parameter configuration method according to claim 1, It is characterized in that There are three types of memories in S1, namely asynchronous memory, synchronous static memory and synchronous dynamic random access memory.
3. The adaptive parameter configuration method according to claim 2, It is characterized in that The number of the chip select spaces CE is four, and the four chip select spaces CE are respectively connected to one of the three memories, and the four chip select spaces CE are not connected to the same memory.
4. The adaptive parameter configuration method according to claim 3, It is characterized in that The S3 specifically includes the following steps: S31, the user queries the connection status of the system to understand the connection status of each chip select space CE and the memory; S32, configuring parameters of the memory according to the information learned in S31; If the current chip select space CE is connected to an asynchronous memory, manually configure the setup, trigger, and hold parameters; If the current chip select space CE is connected to the synchronous static memory, manually configure the synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters; If the current chip select space CE is connected to the synchronous dynamic random access memory, the column address bit number, the row address bit number, and the memory number parameters are manually configured, and then the synchronous dynamic random access memory SDRAM needs to be initialized; then the SDTIMR and SDSRETR registers are set, and the RR value in the SDRCR register is set to meet the refresh interval parameters of the synchronous dynamic random access memory SDRAM; S34, write the corresponding storage parameters through manual programming, and then perform read and write communication with the memory.
5. The adaptive parameter configuration method according to claim 3, It is characterized in that The adaptive configuration method in S4 is specifically as follows: S411, the EMIF storage control interface enters an idle mode and waits for an enable signal; S412, after receiving the enable signal, the EMIF storage control interface enters the registration mode. In the registration mode, the memory registers the memory with the EMIF storage control interface according to the state of the EMIF interface enable chip select signal and the registration enable signal. The type of memory connected to the current chip select space CE needs to be reported during the registration. S413. If the registration fails or times out, proceed to S411; if the registration succeeds, proceed to S414; S414, entering the configuration mode, the EMIF storage control interface configures the storage type field of the control register in the chip select space CE through the local configuration interface according to the registration information of the memory response, thereby performing the corresponding memory type configuration; S415, entering the working mode, and performing different configuration operations according to different storage type configurations; If the current chip select space CE is connected to the asynchronous memory, the configuration establishment, triggering, and holding parameters are configured; the controller generates configuration parameters randomly, and then constrains the range within the configuration interval to write first and then read the asynchronous memory. If the read and write are consistent, the parameters are correct and the configuration process ends; if the read data is inconsistent with the written data, further parameters are generated for read and write tests until the data is read and written correctly, and the configuration process ends; if the configuration parameters are not read and written correctly and the configuration mode is exited by timeout, S3 is entered for manual configuration; If the synchronous static memory connected to the current chip select space CE is connected, then configure the synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters; the controller generates configuration parameters randomly, and then constrains the range within the configuration interval to write first and then read the synchronous static memory. If the read and write are consistent, the parameters are correct and the configuration process ends. If they are inconsistent, reconfigure; if timeout, exit the configuration process and enter S3 for manual configuration; If the current chip select space CE is connected to the synchronous dynamic random access memory, the number of column address bits, the number of row address bits, and the number of memory parameters are configured; then the synchronous dynamic random access memory SDRAM needs to be initialized; then the SDTIMR and SDSRETR registers are set, and the RR value in the SDRCR register is set to meet the refresh interval parameters of the synchronous dynamic random access memory SDRAM; the constraint memory makes a default value of the synchronous dynamic configuration parameters in the memory configuration space. In the synchronous dynamic memory configuration mode, the configuration state uses the configuration bus to read the default value of the dynamic memory parameter configuration, and then configures the read parameters into the controller, and finally performs a read and write test. If the test passes, the configuration process ends. If it is inconsistent, the configuration test is re-read. If it times out, the configuration process exits and enters S3 for manual configuration.
6. The adaptive parameter configuration method according to claim 5, It is characterized in that The local configuration interface in S413 mainly includes the local address of the internal register, read and write signals, read and write data, and read and write responses.
7. The adaptive parameter configuration method according to claim 3, It is characterized in that The loop traversal method in S4 is specifically as follows: S421, reading and writing the connected memory after grouping according to different storage types and corresponding parameters; S422, if the storage type is an asynchronous memory, the corresponding asynchronous parameters are randomly set within the set range, and the asynchronous parameters are the establishment, triggering, and holding parameters. The storage type and the asynchronous parameters are packaged for configuration. If the reading and writing are successful, the configuration is successful. If the reading and writing fail, the traversal is continued until the configuration is successful, and the configuration process is terminated; If the storage type is a synchronous static memory, the corresponding synchronous static parameters are randomly set within the set range. The synchronous static parameters are synchronous interface data write delay, synchronous interface data read delay, CE extension register enable, and read enable valid bit parameters. The storage type and the synchronous static parameters are packaged for configuration. If the read and write are successful, the configuration is successful. If the read and write fail, the traversal continues until the configuration is successful and the configuration process ends. If the storage type is synchronous dynamic random access memory, configure the column address bit number, row address bit number, and memory number parameters; then initialize the synchronous dynamic random access memory SDRAM; then set the SDTIMR and SDSRETR registers, and set the RR value in the SDRCR register to meet Refresh interval parameters of synchronous dynamic random access memory SDRAM; if the read and write are successful, the configuration is successful. If the reading and writing fails, the traversal continues until the configuration succeeds and the configuration process ends.
Citation Information
Patent Citations
Detector method and apparatus for external memory
CN101359512A
Flash memory controller
CN104520932A
Multi-core SoC shared external memory interface design method
CN115408969A
Verification method for accessing EMIF (external memory interface) of SDRAM (synchronous dynamic random access memory)
CN117935901A
Page Mode Access by Non-page Mode Device
US20120203977A1
