Chip selection circuit and chip selection method

By introducing a chip select controller and a generation module into the QSPI controller, the chip select signal is generated by real-time monitoring of the read/write completion flag of the flash memory. This solves the problem of delayed switching of the QSPI controller under high-priority tasks and achieves more efficient flash memory switching.

CN118969047APending Publication Date: 2024-11-15SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410954068.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the existing technology, the QSPI controller needs to suspend the flash memory task when executing a high-priority task on the bus, which results in excessively long chip select switching delay and low efficiency.

Method used

By employing a chip select controller and a chip select generation module, a chip select signal is generated by monitoring the read/write completion flag of the flash memory, and the target flash memory is switched in hardware to reduce switching latency.

Benefits of technology

It improves the real-time performance and efficiency of flash memory switching, reduces chip select switching latency, and avoids the impact of operating system scheduling and software execution speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118969047A_ABST
    Figure CN118969047A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of chip selection of flash memories, and discloses a chip selection circuit and a chip selection method. The chip selection circuit comprises a chip selection controller and a plurality of flash memories, and the chip selection controller at least comprises a chip selection generation module which is used for generating a chip selection signal when determining that a first target flash memory completes data transmission of first information based on a flash memory read-write completion mark, and switching a second target flash memory according to the chip selection signal, transmitting the second information by adopting the second target flash memory; according to the chip selection circuit disclosed by the invention, the chip selection signal can be generated in a hardware mode to switch the flash memories, so that the switching speed among the flash memories can be increased, and the switching delay is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of flash memory chip selection, and in particular to a chip selection circuit and a chip selection method. Background Art

[0002] With the development of storage systems, chip select generation methods for a queued serial peripheral interface (Quad serial Peripheral Interface, QSPI) controller in the prior art usually implement chip select signal generation based on software.

[0003] This chip selection method requires the QSPI slave to suspend its task and wait for a bus response when the bus is executing a higher priority task from another slave. This may be inefficient and cause the flash memory switching delay to be too long. A better solution is needed. Summary of the invention

[0004] In view of this, the present invention provides a chip select circuit and a chip select method to solve the problem that the chip select switching takes a long time due to high delay when switching the flash memory during information transmission between the QSPI controller and the flash memory.

[0005] On one hand, the present invention provides a chip select circuit, which includes: a chip select controller and multiple flash memory devices. The chip select controller includes: a configuration module, which is used to send first information to a first target flash memory device based on the configuration information of the chip select controller; the configuration module includes but is not limited to: a clock management module, a first-in-first-out register, a register and controller module, and a state converter; the first information includes but is not limited to: data information and instruction information; a chip select generation module, which is used to generate a chip select signal when it is determined based on a flash memory read and write completion flag that the first target flash memory device has completed the data transmission of the first information, and switch the second target flash memory device according to the chip select signal to use the second target flash memory device to transmit the second information.

[0006] On the other hand, the present invention also provides a chip selection method, which includes: the configuration module in the chip select controller sends first information to a first target flash memory based on the configuration information of the chip select controller, obtains the status of the first target flash memory, and when the instruction transmission completion flag generated in the first target flash memory is monitored, sends the instruction transmission completion flag to the chip select generation module in the chip select controller; the instruction transmission completion flag is used to indicate that the instruction information in the first information has been transmitted once in the first target flash memory; the chip select generation module of the chip select controller generates a chip select signal when it determines that the first target flash memory has completed the data transmission of the first information based on the flash read and write completion flag, and switches the second target flash memory according to the chip select signal to use the second target flash memory to transmit the second information.

[0007] On the other hand, the present invention also provides a chip selection device, which includes: a transmission module, a configuration module for a chip select controller, which sends first information to a first target flash memory based on the configuration information of the chip select controller, obtains the status of the first target flash memory, and when the instruction transmission completion flag generated in the first target flash memory is monitored, sends the instruction transmission completion flag to the chip select generation module in the chip select controller; the instruction transmission completion flag is used to indicate that the instruction information in the first information has been transmitted once in the first target flash memory; a chip select module, a chip select generation module for the chip select controller, which generates a chip select signal when it determines that the first target flash memory has completed the data transmission of the first information based on the flash read and write completion flag, and switches the second target flash memory according to the chip select signal to use the second target flash memory to transmit the second information.

[0008] On the other hand, the present invention also provides a computer device, which includes: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor implements the above-mentioned chip selection method by executing the computer instructions.

[0009] Another aspect of the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to implement the above chip selection method.

[0010] In this process, a chip select signal is generated by a chip select generation module in a hardware chip select circuit, and the second target flash memory is switched according to the chip select signal. This can make the switching of the flash memory more real-time and will not be affected by factors such as operating system scheduling and software execution speed, thereby reducing the chip select switching time caused by the delay of the chip select switching and improving the efficiency of the chip select switching. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0012] Figure 1 It is a schematic diagram of a communication architecture between a CPU and QSPI in the prior art provided by an embodiment of the present invention;

[0013] Figure 2 is a schematic structural diagram of a chip selection circuit provided by an embodiment of the present invention;

[0014] Figure 3 is a specific structural schematic diagram of a chip selection circuit provided by an embodiment of the present invention;

[0015] Figure 4 It is a schematic diagram of the specific structure of a chip selection generation module of a chip selection circuit provided by an embodiment of the present invention;

[0016] Figure 5 is a flow chart of a chip selection method provided by an embodiment of the present invention;

[0017] Figure 6 is a flow chart of another chip selection method provided by an embodiment of the present invention;

[0018] Figure 7 is a structural schematic diagram of a chip selection device provided by an embodiment of the present invention;

[0019] Figure 8 It is a structural schematic diagram of another chip selection device provided by an embodiment of the present invention.

[0020] Description of reference numerals:

[0021] Other slave devices 10; chip select circuit 20; chip select controller 21; multiple flash memories 22; first target flash memory 221; second target flash memory 222; configuration module 211; chip select generation module 212; clock management module 2111; first-in-first-out register 2112; register and controller module 2113; state converter 2114; counter module 2121; comparator module 2122; shifter module 2123; logic operation module 2124. DETAILED DESCRIPTION

[0022] In the chip design process, the central processing unit (CPU) is usually used to implement power-off data backup and power-on data recovery of the chip through QSPI external flash memory (FLASH). The specific steps are: when the chip loses power, the CPU sends instructions to control the QSPI controller to start the data transfer process, and the CPU initiates a write operation command to the external FLASH to write the backup data into the FLASH; when the chip is powered on again, it is necessary to determine whether the last shutdown was normal, so it is necessary to read the mark from the FLASH to decide whether to restore the system data. If data recovery is required, the CPU initiates a read operation command to the external FLASH, and reads the data saved at the last power failure into the original space through QSPI under the control of the QSPI controller.

[0023] like Figure 1 The communication architecture diagram of the CPU and QSPI shown in the figure, in order to save the data information of multiple subsystems, the CPU mounts the QSPI controller, other slave devices (SLAVE) 10 and multiple FLASH through the on-chip network (Network on Chip, NOC) bus, and multiple FLASH are selected and switched through the chip select signal to write the desired data to the selected FLASH through the QSPI controller within a specific time, or read the data from the FLASH. The switching speed between multiple FLASH is one of the reasons that affect the data transmission speed between the CPU and FLASH. With the continuous development of chip design, the chip system is becoming more and more complex, and higher requirements are put forward for the switching speed between multiple FLASH.

[0024] At present, there are the following prior arts for the generation of chip select signals: first, the QSPI controller outputs a single-bit chip select signal. When the CPU and FLASH communicate, the QSPI controller pulls down the output single-bit chip select signal. After the transmission is completed, the single-bit chip select signal is pulled up. The chip select signal generated at this stage does not require the CPU to operate; outside the QSPI controller, the CPU configures a register, and the register signal is connected to the chip select pin of the FLASH after a logical operation with the single-bit signal output by the QSPI controller, so as to select multiple FLASHs; second, the QSPI controller outputs a multi-bit chip select signal, which is directly connected to multiple FLASHs by hardware. When the CPU and FLASH communicate, the chip select signal connected to the desired FLASH pin is pulled down by configuring different bit positions of the chip select signal. The CPU can only pull down one FLASH chip select signal at a time, indicating that the FLASH is selected. The selected FLASH can receive and send data with the CPU through the QSPI bus.

[0025] However, there are the following problems in the prior art:

[0026] The chip select signal is generated by relying on software. When the bus is executing a higher priority task from other slaves, the task of the QSPI slave needs to be suspended and wait for the bus response. There is a problem that the chip select switching takes a long time due to the long delay time of the flash memory switching.

[0027] To solve the above problems, various embodiments of the present invention provide a chip select circuit, which includes: a chip select controller, multiple flash memory devices, and the chip select controller includes: a configuration module, which is used to send first information to a first target flash memory device based on the configuration information of the chip select controller; the configuration module includes but is not limited to: a clock management module, a first-in-first-out register, a register and controller module, and a state converter; the first information includes but is not limited to: data information, instruction information; a chip select generation module, which is used to generate a chip select signal when it is determined based on a flash memory read and write completion flag that the first target flash memory device has completed the data transmission of the first information, and switch the second target flash memory device according to the chip select signal to use the second target flash memory device to transmit the second information.

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0029] According to an embodiment of the present invention, a chip selection circuit is provided. Figure 2 is a schematic diagram of the structure of a chip selection circuit provided by an embodiment of the present invention, such as Figure 2 As shown, the chip selection circuit 20 includes: a chip selection controller 21, a plurality of flash memories 22, and the chip selection controller 21 includes: a configuration module 211 and a chip selection generation module 212, wherein:

[0030] The configuration module 211 is used to send the first information to the first target flash memory 221 based on the configuration information of the chip select controller 21; the configuration module 211 includes but is not limited to: a clock management module 2111, a first-in-first-out register 2112, a register and controller module 2113, and a state converter 2114; the first information includes but is not limited to: data information and instruction information;

[0031] The chip select generation module 212 is used to generate a chip select signal when determining based on the flash read and write completion flag that the first target flash memory 221 completes the data transmission of the first information, and switch the second target flash memory 222 according to the chip select signal to use the second target flash memory 222 to transmit the second information.

[0032] In one possible implementation, the chip select controller 21 may refer to a QSPI controller, which may be a queued serial peripheral interface that can be used to communicate with a flash memory, has a higher transmission rate than a serial peripheral interface (SPI), and is a high-speed, full-duplex communication bus; wherein, SPI may refer to a serial peripheral interface, which may be a synchronous serial communication interface specification that enables a host to communicate with various peripheral devices to exchange information.

[0033] Here, QSPI's full-duplex may mean that QSPI's four data lines support data transmission in two directions at the same time, and data can be sent and received at the same time; in specific applications, QSPI is mainly half-duplex, that is, the four data lines can switch between sending and receiving, but can only be used to send or receive data at a certain time.

[0034] In one possible implementation, the flash memory 22 may refer to FLASH, which may be a form of electronically erasable programmable read-only memory that allows multiple erasing or writing during operation; data will not be lost when power is off, while allowing fast reading of data stored in FLASH.

[0035] Exemplarily, FLASH may include, but is not limited to: a solid state drive, a flash drive, and a memory card.

[0036] In a possible implementation, the clock management module 2111 is used to manage the clock signal of the chip select controller 21 to ensure synchronization and coordination of the system.

[0037] Here, a clock signal may refer to a continuous periodic square wave signal used to synchronize various components in a circuit to ensure that they perform operations at the correct time point.

[0038] In a possible implementation, the FIFO register 2112 may be used to store data to be sent or data received from the FLASH.

[0039] Here, the data to be sent may be the first information and the second information, and the data received from the FLASH may include but is not limited to a flash memory read and write completion flag.

[0040] Among them, the instruction information in the first information may include but is not limited to: read instructions, write instructions, erase instructions, status register instructions, etc., and the data information in the first information may include but is not limited to: data length, data content, additional data, etc.; the second information may refer to information sent by the second target flash memory, and the second information may also include data information and instruction information.

[0041] Furthermore, the data storage method of the FIFO register 2112 may refer to FIFO (First In, First Out), which may mean that the data that first enters the queue will be processed or removed first.

[0042] In a possible implementation, the register and controller module 2113 may be used to initialize configuration information such as mode selection, chip select signal default value, etc. of the chip select controller 21 during the information transmission process of the first information.

[0043] Here, mode selection may include but is not limited to: data transmission mode, transmission rate mode, read-write mode; wherein, data transmission mode may include but is not limited to: standard mode (data is transmitted through a single data line), four-way mode (using four data lines for parallel transmission of data); transmission rate mode may include but is not limited to: single rate, dual rate; read-write mode may include but is not limited to: read-only, write-only, read-write.

[0044] In a possible implementation, the state converter 2114 may be used to implement the state transition of sending the first information and the serial-to-parallel conversion of the first information before sending.

[0045] Here, state transfer may refer to the system switching between different operating states to ensure the correctness and coordination of the information transmission process; the operating state may include but is not limited to: initialization state, preparation state, sending state, receiving state, completion state; serial-to-parallel conversion may refer to converting serial data into parallel data or converting parallel data into serial data to ensure that the first information format meets the transmission requirements.

[0046] In a possible implementation, the instruction information in the first information may be a command for controlling the first target flash memory 221 to perform a specific operation, including instructions such as read, write, erase, and status query.

[0047] When the instruction information is a write operation, the first information also includes data information to be written.

[0048] In one possible implementation, the chip select generation module 212 obtains a flash memory read and write completion flag, determines based on the flash memory read and write completion flag that the first target flash memory 221 completes the data transmission of the first information, generates a chip select signal to cancel the selection of the first target flash memory 221, and prepares to select the second target flash memory 222.

[0049] Here, the switching to the second target flash memory 222 may be achieved by controlling a corresponding chip selection pin.

[0050] For example, Figure 3 is a specific structural diagram of a chip selection circuit provided by an embodiment of the present invention, such as Figure 3 As shown, where:

[0051] The external connection pins of the chip select controller 21 include but are not limited to: SCK (Serial Clock), MOSI (Master Out Slave In), MISO (Master In Slave Out), WP (Write Protect), HOLDn (Hold), CSn[0] and CSn[1] (Chip Select).

[0052] Here, SCK may refer to a serial clock signal, generated by the clock management module 2112 in the chip select controller 21, and used to synchronize information transmission with FLASH; MOSI may refer to a master device output and slave device input data line, used by the state converter 2114 in the chip select controller 21 to send information to FLASH; MISO may refer to a master device input and slave device output data line, used by the state converter 2114 in the chip select controller 21 to receive information from FLASH; WP may refer to a write protection pin, used to control the write protection function of FLASH according to the state converter 2114 in the chip select controller 21; HOLDn may refer to a pause pin, used to pause information transmission according to the state converter 2114 in the chip select controller 21; CSn[0] and CSn[1] may refer to chip select signals generated by the chip select generation module 212, used to select a specific FLASH to transmit the second information.

[0053] Furthermore, the pins connecting FLASH and the chip select controller 21 may include but are not limited to: CLK (Clock), DQ0 / DQ1 / DQ2 / DQ3, and CS (Chip Select).

[0054] Here, CLK can be used to receive the clock signal of the clock management module 2112 in the chip select controller 21, DQ0 / DQ1 / DQ2 / DQ3 can refer to data pins, which are used to transmit information between the state converter 2114 in the chip select controller 21, and CS can be used to receive the chip select signal of the chip select controller 21.

[0055] Through the above method, the chip select circuit 20 automatically generates a chip select signal and switches the target flash memory, so that the data transmission request can be responded to more quickly and the data transmission delay can be reduced.

[0056] In a specific embodiment, the chip selection generation module 212 at least includes a counter module 2121, a comparator module 2122, a shifter module 2123 and a logic operation module 2124, wherein:

[0057] The counter module 2121 is used to count the instruction information in the first information according to the instruction transmission completion flag sent by the first target flash memory 221, and output the count value; the instruction transmission completion flag is used to indicate that the instruction information in the first information has completed one transmission in the first target flash memory 221;

[0058] The comparator module 2122 is used to compare the count value with a preset count threshold value, and when the count value is equal to the preset count threshold value, generate a flash memory read / write completion flag, the flash memory read / write completion flag is used to indicate that the chip select controller 21 has completed the information transmission of the first information with the first target flash memory 221; the preset count threshold value is the expected read / write data amount of the preset first target flash memory 221;

[0059] The shifter module 2123 is used to obtain the flash memory read and write completion flag in the comparator module 2122, and obtain the first flash memory chip selection state and the preset chip selection scheme in the register and controller module 2113, determine that the chip selection controller 21 has completed the information transmission of the first information with the first target flash memory 221 based on the flash memory read and write completion flag, and shift the first flash memory chip selection state based on the preset chip selection scheme to determine the second flash memory chip selection state; the first flash memory chip selection state is used to represent the chip selection state of the first target flash memory 221, and the second flash memory chip selection state is used to represent the chip selection state of the second target flash memory 222;

[0060] The logic operation module 2124 is used to perform a preset logic operation according to the second flash memory chip select state and the transmission state signal in the state converter to obtain a chip select signal; the transmission state signal includes: a low-level signal representing that the instruction information in the first information is being transmitted and a high-level signal representing that the instruction information in the first information has been transmitted.

[0061] In a possible implementation, a clock signal and a reset signal are sent to the counter module 2121, and the counter module 2121 counts the instruction information in the first information according to the clock signal, the reset signal and the instruction transmission completion flag sent by the first target flash memory 221, and outputs the count value.

[0062] Here, the reset signal may be a control signal used to initialize the state of the counter module 2121. Sending a clock signal and a reset signal to the counter module 2121 may ensure that the counter module 2121 can accurately update the count value.

[0063] In one possible implementation, a count value is used to represent the amount of data currently being transmitted, and a preset count threshold is used to represent the expected amount of data to be transmitted corresponding to the first target flash memory; when the count value is equal to the preset count threshold, it represents that the current first target flash memory is full of the expected amount of data to be transmitted, and the second target flash memory needs to be switched, and the comparator module 2122 outputs a flash read and write completion flag.

[0064] Here, the preset counting threshold may be a preset amount of data expected to be read or written per FLASH chip, which is stored in the register of the chip select controller 21 and the static memory of the controller module 2113 before the chip select controller 21 sends the first information to the first target flash memory 221 .

[0065] In one possible implementation, the shifter module 2123 shifts the first flash memory chip select state based on a preset chip select scheme to determine the second flash memory chip select state; the flash memory chip select register in the register and controller module 2113 switches the first target flash memory to the second target flash memory according to the second flash memory chip select state.

[0066] Here, the first flash memory chip select state can represent the current first target flash memory; the preset chip select scheme can be a chip select scheme register in the register and controller module 2113, which represents a preset strategy or condition for selecting the second target flash memory; shift processing can refer to moving data a certain number of positions in a specific direction in binary or other digital form; the flash memory chip select register can be a multi-BIT register, and different BIT bits can represent the selection of different FLASH. Through the flash memory chip select register, multiple power-on data can be saved in different FLASH, thereby avoiding information overwriting; wherein, power-on can refer to the chip startup process, and power-off or power-off can refer to the chip shutdown process.

[0067] Furthermore, the chip select scheme register can be a multi-BIT register for storing at least one preset chip select scheme, and the register can be configured at power-on according to different scenarios and functions, thereby improving the diversity and flexibility of the QSPI chip select scheme and adapting to more QSPI transmission occasions.

[0068] In a possible implementation, after the chip selection signal is determined by the logic operation module 2124, the chip selection signal can be output from the pin, and the chip selection signal can be BIT-connected to the FLASH one by one.

[0069] For example, Figure 4 FIG. 1 is a schematic diagram of a specific structure of a chip selection generation module of a chip selection circuit provided by an embodiment of the present invention. Figure 4 As shown, where:

[0070] The chip selection generation module 212 includes a counter module 2121 , a comparator module 2122 , a shifter module 2123 and a logic operation module 2124 .

[0071] The counter module 2121 obtains the clock signal, the reset signal and the instruction transmission completion flag, and outputs the count value; the comparator module 2122 obtains the count value, the FLASH0 count threshold (i.e., the preset count threshold) and the FLASH1 count threshold (i.e., the preset count threshold), and outputs the FLASH read and write completion flag (i.e., the flash memory read and write completion flag); the shifter module 2123 obtains the FLASH read and write completion flag, the FLASH chip select state (i.e., the first flash memory chip select state), and the chip select scheme (i.e., the preset chip select scheme), and outputs the FLASH chip select state (i.e., the second flash memory chip select state); the logic operation module 2124 obtains the FLASH chip select state and the transmission status signal (i.e., the transmission status signal), and generates a QSPI chip select signal (i.e., the chip select signal).

[0072] Through the above method, a chip select signal is generated according to the chip select generation module 212 including a counter module 2121, a comparator module 2122, a shifter module 2123 and a logic operation module 2124. The QSPI chip select signal is generated by adopting a hardware circuit instead of a conventional software configuration register method, which fully saves the switching time between FLASHs, saves bus resources, increases bus utilization, and achieves more efficient QSPI data transmission.

[0073] According to an embodiment of the present invention, a chip selection method is provided. Figure 5 is a flow chart of a chip selection method provided by an embodiment of the present invention, such as Figure 5 As shown, the method comprises the following specific steps:

[0074] Step S501, the configuration module 211 in the chip select controller 21 sends the first information to the first target flash memory 221 based on the configuration information of the chip select controller 21, obtains the state of the first target flash memory 221, and when the instruction transmission completion flag generated in the first target flash memory 221 is detected, the instruction transmission completion flag is sent to the chip select generation module 212 in the chip select controller 21; the instruction transmission completion flag is used to indicate that the instruction information in the first information has completed one transmission in the first target flash memory 221;

[0075] In step S502, the chip select generation module 212 in the chip select controller 21 generates a chip select signal when determining based on the flash read and write completion flag that the first target flash memory 221 has completed the data transmission of the first information, and switches the second target flash memory 222 according to the chip select signal to use the second target flash memory 222 to transmit the second information.

[0076] In a possible implementation, monitoring the instruction transmission completion flag generated in the first target flash memory 221 can be implemented based on the following steps:

[0077] Sending a preset instruction and address to the first target flash memory 221 to read the program operation register in the first target flash memory 221;

[0078] When it is detected that the program operation register is at a low level, it is determined that the instruction information in the first information has completed one transmission, and an instruction transmission completion flag is generated.

[0079] In a possible implementation, switching the second target flash memory 222 according to the chip selection signal may be implemented based on the following steps:

[0080] The chip select controller 21 switches the target flash memory from the first target flash memory 221 to the second target flash memory 222 according to the generated chip select signal;

[0081] The chip select controller 21 sends the second information to the second target flash memory 222 to start new data transmission.

[0082] Through the above method, the chip selection generation module 212 in the chip selection controller 21 generates a chip selection signal, which can reduce the delay time when the flash memory is switched and improve the switching speed.

[0083] In a specific embodiment, based on the configuration information of the chip select controller 21, sending the first information to the first target flash memory 221 includes:

[0084] Based on the configuration module 211 of the chip select controller 21, determine the preset count threshold value corresponding to the first target flash memory 221 that receives the first information by default and the first target flash memory 221, and send the first information to the first target flash memory 221 through the chip select controller 21; the preset count threshold value is used to determine whether the information transmission of the first information between the first target flash memory 221 and the chip select controller 21 has been completed;

[0085] When the configuration module 211 of the chip select controller 21 sends the first information, the state converter 2114 in the chip select controller 21 is used to obtain the data transmission state corresponding to the instruction information in the first information;

[0086] When the data transmission status of the instruction information in the first information is information transmission in progress, determining that the transmission status signal is a low level signal;

[0087] When the data transmission state of the instruction information in the first information is that the information transmission is completed, it is determined that the transmission state signal is a high level signal.

[0088] In a possible implementation, the method further includes:

[0089] The status register and control register in the configuration register and controller module 2113 initialize the configuration information, and set and manage the operation mode, transmission parameters and status monitoring of the chip select controller 21.

[0090] Here, the current state and error flag of the chip select controller 21 are monitored through the state register, and the operation mode, data transmission mode, and control signal of the chip select controller 21 are configured through the control register.

[0091] In a possible implementation, the preset counting threshold may be calculated according to the total amount of data that needs to be written or read from each FLASH.

[0092] In one possible implementation, the data transmission status may include: information transmission in progress and information transmission completed; information transmission in progress may include reading data and writing data, and information transmission completed may include reading data completed and writing data completed.

[0093] Here, when the data transmission state of the instruction information in the first information is that the information transmission is completed, the transmission state signal is determined to be a high level signal, which can reduce the power consumption of FLASH when there is no information transmission.

[0094] In a possible implementation manner, when the data transmission status of the instruction information in the first information is information transmission in progress, determining the type of the instruction information in the first information;

[0095] When the instruction information in the first information is a write operation, the information transmission is completed when the last BIT data of the instruction information in the first information is determined to be completed;

[0096] When the instruction information in the first information is a read operation, wait for a preset window period, and determine when FLASH writes the last BIT data into QSPI as the end of information transmission.

[0097] Through the above method, the preset counting threshold corresponding to the first target flash memory 221 that receives the first information by default can be determined according to different needs and scenarios, so as to improve the application scenarios of chip selection generation, so that the chip selection method can adapt to different needs and more application scenarios.

[0098] In a specific embodiment, the state of the first target flash memory 221 is obtained, and when the instruction transmission completion flag generated in the first target flash memory 221 is monitored, the instruction transmission completion flag is sent to the chip selection generation module 212 in the chip selection controller 21, including:

[0099] When the transmission status signal of the first information is at a high level, the program operation register in the first target flash memory 221 is read, and it is determined according to the program operation register that the first target flash memory 221 has completed the information transmission of the instruction information in the first information and the first target flash memory 221 is in an idle state, the instruction transmission completion flag generated by the first target flash memory 221 is obtained, and the instruction transmission completion flag is sent to the chip select generation module 212 in the chip select controller 21.

[0100] Specifically, when an instruction information in the first information is transmitted, a preset instruction and address are sent to the chip select controller 21, and the chip select controller 21 is read to obtain the program operation register in the first target flash memory 221; when the program operation register is detected to be at a low level, it is determined that the instruction information in the first information has completed one transmission, and an instruction transmission completion flag is generated, the instruction transmission completion flag generated by the first target flash memory 221 is obtained, and the instruction transmission completion flag is sent to the chip select generation module 212 in the chip select controller 21.

[0101] Through the above method, by real-time monitoring the status of the first target flash memory 221, when the instruction transmission completion flag is detected, the flag is immediately sent to the chip select controller 21, which can ensure that the system can quickly switch to the second target flash memory for new data transmission without delay due to waiting, thereby improving the overall efficiency of data transmission.

[0102] In a specific embodiment, when it is determined based on the flash memory read and write completion flag that the first target flash memory 221 completes the data transmission of the first information, a chip select signal is generated, and the second target flash memory 222 is switched according to the chip select signal to use the second target flash memory 222 to transmit the second information, including:

[0103] When the chip selection generation module 212 in the chip selection controller 21 determines that the chip selection controller 21 has completed the information transmission of the instruction information in the first information with the first target flash memory 221 based on the instruction transmission completion flag, the chip selection generation module 212 in the chip selection controller 21 is used to count the counter module 2121 in the chip selection generation module 212 based on the transmission scheme, and output the count value; the transmission scheme is determined according to the transmission mode of the instruction information in the first information and the transmission information length;

[0104] The comparator module 2122 in the chip selection generation module 212 compares the count value with the preset count threshold of the first target flash memory 221, and generates a flash read / write completion flag when the count statistic value is equal to the preset count threshold. The flash read / write completion flag is used to indicate that the chip selection controller 21 has completed the information transmission of the first information with the first target flash memory 221; the preset count threshold is the expected read / write data volume of the preset first target flash memory 221;

[0105] The shifter module 2123 in the chip select generation module 212 obtains the flash memory read / write completion flag in the comparator module 2122, and obtains the first flash memory chip select state and the preset chip select scheme of the register and controller module 2113 in the configuration module 211, determines that the chip select controller 21 has completed the information transmission of the first information with the first target flash memory 221 based on the flash memory read / write completion flag, and performs shift processing on the first flash memory chip select state based on the preset chip select scheme to determine the second flash memory chip select state; the first flash memory chip select state is used to characterize the chip select state of the first target flash memory 221, and the second flash memory chip select state is used to characterize the chip select state of the second target flash memory 222;

[0106] The logic operation module 2124 in the chip select generation module 212 performs a preset logic operation according to the transmission status signal of the state converter 2114 in the second flash memory chip select state and the configuration module 211 to obtain a chip select signal; the chip select signal is used to determine the second target flash memory 222; the transmission status signal includes: a low-level signal representing that the instruction information in the first information is in transmission and a high-level signal representing that the instruction information in the first information has been transmitted.

[0107] In a possible implementation, the transmission scheme determined according to the transmission mode of the instruction information in the first information and the transmission information length may be as shown in Table 1:

[0108]

[0109] Table 1

[0110] Specifically, the transmission mode may include: single-line transmission, dual-line transmission and four-line transmission; the transmission information length may include: 8BIT, 16BIT, 32BIT; when the transmission mode is single-line transmission, if 8 bits of data are transmitted each time, the count value of the counter module increases by 1, if 16 bits of data are transmitted each time, the count value of the counter module increases by 2, if 32 bits of data are transmitted each time, the count value of the counter module increases by 4; when the transmission mode is dual-line transmission, if 8 bits of data are transmitted each time, the counter module increases by 4 because the transmission efficiency of dual-line transmission is doubled. The count value of the counter module increases by 2. If 16 bits of data are transmitted each time, the count value of the counter module increases by 4. If 32 bits of data are transmitted each time, the count value of the counter module increases by 8. When the transmission mode is four-wire transmission, if 8 bits of data are transmitted each time, since the transmission efficiency of the four-wire transmission is increased by four times, the count value of the counter module increases by 4. If 16 bits of data are transmitted each time, the count value of the counter module increases by 8. If 32 bits of data are transmitted each time, the count value of the counter module increases by 16. Among them, cnt in Table 1 may refer to the count value of the counter module.

[0111] Here, the transmission scheme is determined by the transmission mode and the transmission information length, and the count value update of the counter module is determined according to the transmission scheme, which can flexibly adapt to different transmission requirements and ensure that the counter module accurately reflects the progress of data transmission, thereby realizing effective transmission control and management.

[0112] Through the above method, when switching the chip select signal, the next desired FLASH can be selected according to the specified preset chip select scheme through hardware, thereby enhancing the flexibility of chip selection; the count value update of the counter module is determined according to the transmission scheme, which can flexibly adapt to different transmission requirements.

[0113] In a specific embodiment, the method further comprises:

[0114] When the chip select controller 21 detects a preset error in the information transmission process of the first information, it sets the flag bit corresponding to the preset error to a high level, updates the transmission state signal from a low level signal to a high level signal, and stops the information transmission of the first information;

[0115] The chip select controller 21 turns off the counter module 2121 of the chip select generation module 212, receives the error type of a preset error, determines the corresponding adjustment method according to the error type, obtains the correct instruction adjusted according to the adjustment method, clears the flag bit corresponding to the preset error, updates the transmission status signal from a high level signal to a low level signal, turns on the counter module 2121 of the chip select generation module 212, and makes the counter module 2121 of the chip select generation module 212 restart counting at the closed position.

[0116] In a possible implementation, the chip select controller 21 is used to set the flag bit corresponding to the preset error high, which may refer to setting the flag bit corresponding to the preset error to a high level (ie, to 1) to facilitate error identification and processing.

[0117] In one possible implementation, preset errors may include but are not limited to: 1. The address of the write / read access fails in the boundary check, the FIFO is read when the FIFO is empty or the FIFO is written when the FIFO is full, and data is written when the register and controller module 2113 is not fully configured.

[0118] Through the above method, when a preset error is detected, by updating the transmission status signal from a low level signal to a high level signal, the information transmission of the first information is stopped, which can avoid wider data damage or system crash caused by the propagation of erroneous data, thereby improving the robustness of the system; when an error is detected, the transmission of the first information is immediately stopped, which can avoid further propagation of the erroneous information, thereby protecting the integrity of the data.

[0119] Figure 6 FIG. 1 is a flow chart of another chip selection method provided by an embodiment of the present invention. Figure 6 As shown, the method comprises the following specific steps:

[0120] Step S601, detecting whether the current state is chip power on / chip power off; if so, proceeding to step S602;

[0121] Here, it is determined whether the current state of the chip is powered on (i.e., turned on) or powered off (i.e., turned off);

[0122] Step S602, QSPI configures chip select default values ​​and QSPI status & control registers;

[0123] Here, it is equivalent to configuring the first target flash memory 221 to receive the first information by default, and configuring the status register and the control register in the register and controller module 2113;

[0124] Step S603, sending the total amount of data sent / read by FLASH and configuring the counting threshold register;

[0125] Here, it is equivalent to determining a preset counting threshold;

[0126] Step S604, the software issues instructions, and the bus transmits instructions, addresses, alternate bytes, transmission data, etc.;

[0127] Here, it is equivalent to sending the first information to the chip selection controller 21;

[0128] Step S605, QSPI receives / reads data;

[0129] Here, it is equivalent to the chip selection controller 21 performing a read operation or a write operation on the FLASH according to the instruction information in the first information;

[0130] Step S606, the software issues an instruction to read the program operation status register (i.e., program operation register) in the FLASH;

[0131] Here, it is equivalent to sending instructions and data and reading the program operation register in FLASH;

[0132] Step S607, determine whether the program operation in FLASH is completed; if so, proceed to step S608, if not, return to step S606;

[0133] Here, it is equivalent to determining that the program operation in FLASH is completed if the program operation register represents a high level, and obtaining the instruction transfer completion flag;

[0134] Step S608, setting the instruction transmission completion flag high;

[0135] Step S609, confirming the current transmission scheme;

[0136] Here, it is equivalent to determining the transmission scheme according to the transmission mode and transmission information length of the instruction information in the first information;

[0137] Step S610 updates the count value according to the current transmission scheme;

[0138] Step S611, determine whether the count value is equal to the count threshold (i.e., the preset count threshold); if so, proceed to step S612;

[0139] Here, it is equivalent to determining in the comparator module 2122 whether the count value determined by the counter module 2121 is equal to the preset count threshold value, and if so, generating a flash memory read and write completion flag;

[0140] Step S612, the chip select is shifted to the next FLASH and the count value is cleared;

[0141] Here, it is equivalent to performing a shift process on the first flash memory chip select state corresponding to the first target flash memory in the shifter module 2123 to determine the second flash memory chip select state.

[0142] Figure 7 is a schematic diagram of the structure of a chip selection device provided by an embodiment of the present invention, such as Figure 7 As shown, the device can be applied to intelligent electronic devices such as servers and computers; the device includes: a transmission module 701 and a chip selection module 702;

[0143] Among them, the transmission module 701 is used for the configuration module 211 in the chip select controller 21 to send the first information to the first target flash memory 221 based on the configuration information of the chip select controller 21, obtain the state of the first target flash memory 221, and when the instruction transmission completion flag generated in the first target flash memory 221 is monitored, the instruction transmission completion flag is sent to the chip select generation module 212 in the chip select controller 21; the instruction transmission completion flag is used to indicate that the instruction information in the first information has completed one transmission in the first target flash memory 221;

[0144] The chip select module 702 is used for the chip select generation module 212 in the chip select controller 21. When it is determined based on the flash read and write completion flag that the first target flash memory 221 completes the data transmission of the first information, a chip select signal is generated, and the second target flash memory 222 is switched according to the chip select signal to use the second target flash memory 222 to transmit the second information.

[0145] In a specific embodiment, the transmission module 701 is used to determine, based on the configuration module 211 of the chip select controller 21, a preset count threshold value corresponding to the first target flash memory 221 that receives the first information by default and the first target flash memory 221, and send the first information to the first target flash memory 221 through the chip select controller 21; the preset count threshold value is used to determine whether the information transmission of the first information between the first target flash memory 221 and the chip select controller 21 has been completed;

[0146] When the configuration module 211 of the chip select controller 21 sends the first information, the state converter 2114 in the chip select controller 21 is used to obtain the data transmission state corresponding to the instruction information in the first information;

[0147] When the data transmission status of the instruction information in the first information is information transmission in progress, determining that the transmission status signal is a low level signal;

[0148] When the data transmission state of the instruction information in the first information is that the information transmission is completed, it is determined that the transmission state signal is a high level signal.

[0149] In a specific embodiment, the transmission module 701 is used to read the program operation register in the first target flash memory 221 when the transmission status signal of the first information is at a high level, determine according to the program operation register that the first target flash memory 221 has completed the information transmission of the instruction information in the first information and the first target flash memory 221 is in an idle state, obtain the instruction transmission completion flag generated by the first target flash memory 221, and send the instruction transmission completion flag to the chip select generation module 212 in the chip select controller 21.

[0150] In a specific embodiment, the chip selection module 703 is used to use the chip selection generation module 212 in the chip selection controller 21 to count the counter module 2121 in the chip selection generation module 212 based on the transmission scheme and output the count value when the chip selection generation module 212 in the chip selection controller 21 determines that the chip selection controller 21 has completed the information transmission of the instruction information in the first information with the first target flash memory 221 based on the instruction transmission completion flag; the transmission scheme is determined according to the transmission mode of the instruction information in the first information and the transmission information length;

[0151] The comparator module 2122 in the chip selection generation module 212 compares the count value with the preset count threshold of the first target flash memory 221, and generates a flash read / write completion flag when the count statistic value is equal to the preset count threshold. The flash read / write completion flag is used to indicate that the chip selection controller 21 has completed the information transmission of the first information with the first target flash memory 221; the preset count threshold is the expected read / write data volume of the preset first target flash memory 221;

[0152] The shifter module 2123 in the chip select generation module 212 obtains the flash memory read / write completion flag in the comparator module 2122, and obtains the first flash memory chip select state and the preset chip select scheme of the register and controller module 2113 in the configuration module 211, determines that the chip select controller 21 has completed the information transmission of the first information with the first target flash memory 221 based on the flash memory read / write completion flag, and performs shift processing on the first flash memory chip select state based on the preset chip select scheme to determine the second flash memory chip select state; the first flash memory chip select state is used to characterize the chip select state of the first target flash memory 221, and the second flash memory chip select state is used to characterize the chip select state of the second target flash memory 222;

[0153] The logic operation module 2124 in the chip select generation module 212 performs a preset logic operation according to the transmission status signal of the state converter 2114 in the second flash memory chip select state and the configuration module 211 to obtain a chip select signal; the chip select signal is used to determine the second target flash memory 222; the transmission status signal includes: a low-level signal representing that the instruction information in the first information is in transmission and a high-level signal representing that the instruction information in the first information has been transmitted.

[0154] In a specific embodiment, the apparatus further includes: an error handling module 703;

[0155] The error processing module 703 is used for the chip selection controller 21 to set the flag bit corresponding to the preset error high when detecting a preset error in the information transmission process of the first information, update the transmission state signal from a low level signal to a high level signal, and stop the information transmission of the first information;

[0156] The chip select controller 21 turns off the counter module 2121 of the chip select generation module 212, receives the error type of a preset error, determines the corresponding adjustment method according to the error type, obtains the correct instruction adjusted according to the adjustment method, clears the flag bit corresponding to the preset error, updates the transmission status signal from a high level signal to a low level signal, turns on the counter module 2121 of the chip select generation module 212, and makes the counter module 2121 of the chip select generation module 212 restart counting at the closed position.

[0157] It should be noted that: when the chip selection device provided in the above embodiment implements the corresponding chip selection method, only the division of the above program modules is used as an example. In actual application, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. Figure 5 The embodiments of the method shown belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0158] The embodiment of the present invention also provides a computer device having the above Figure 7 The chip select device is shown.

[0159] See also Figure 8 , Figure 8 is a schematic diagram of the structure of another chip selection device provided by an embodiment of the present invention. Figure 8As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.

[0160] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0161] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0162] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0163] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0164] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0165] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0166] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0167] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0168] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0169] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A chip select circuit, characterized in that: The chip select circuit comprises: a chip select controller and a plurality of flash memories, and the chip select controller comprises: A configuration module, configured to send first information to a first target flash memory based on the configuration information of the chip select controller; the configuration module includes but is not limited to: a clock management module, a first-in-first-out register, a register and controller module, and a state converter; the first information includes but is not limited to: data information and instruction information; The chip select generation module is used to generate a chip select signal when determining based on the flash memory read and write completion flag that the first target flash memory has completed the data transmission of the first information, and switch the second target flash memory according to the chip select signal to use the second target flash memory to transmit the second information.

2. The chip select circuit according to claim 1, characterized in that: The chip selection generation module at least includes a counter module, a comparator module, a shifter module and a logic operation module, wherein: The counter module is used to count the instruction information in the first information according to the instruction transmission completion flag sent by the first target flash memory, and output the count value; the instruction transmission completion flag is used to indicate that the instruction information in the first information has completed one transmission in the first target flash memory; The comparator module is used to compare the count value with a preset count threshold, and when the count value is equal to the preset count threshold, generate a flash memory read / write completion flag, wherein the flash memory read / write completion flag is used to indicate that the chip select controller has completed the information transmission of the first information with the first target flash memory; the preset count threshold is a preset expected read / write data amount of the first target flash memory; a shifter module, configured to obtain the flash memory read / write completion flag in the comparator module, and obtain the first flash memory chip select state and a preset chip select scheme in the register and controller module, determine that the chip select controller has completed the information transmission of the first information with the first target flash memory based on the flash memory read / write completion flag, and perform shift processing on the first flash memory chip select state based on the preset chip select scheme to determine a second flash memory chip select state; the first flash memory chip select state is used to characterize the chip select state of the first target flash memory, and the second flash memory chip select state is used to characterize the chip select state of the second target flash memory; A logic operation module is used to perform a preset logic operation according to the second flash memory chip select state and the transmission state signal in the state converter to obtain a chip select signal; the transmission state signal includes: a low-level signal indicating that the instruction information in the first information is being transmitted and a high-level signal indicating that the instruction information in the first information has been transmitted.

3. A chip selection method applied to the chip selection circuit according to any one of claims 1 or 2, characterized in that: The method comprises: The configuration module in the chip select controller sends the first information to the first target flash memory based on the configuration information of the chip select controller, obtains the state of the first target flash memory, and when monitoring the instruction transmission completion flag generated in the first target flash memory, sends the instruction transmission completion flag to the chip select generation module in the chip select controller; the instruction transmission completion flag is used to indicate that the instruction information in the first information has completed one transmission in the first target flash memory; The chip select generation module of the chip select controller generates a chip select signal when it determines that the first target flash memory has completed the data transmission of the first information based on the flash read and write completion flag, and switches the second target flash memory according to the chip select signal to use the second target flash memory to transmit the second information.

4. The method according to claim 3, characterized in that The step of sending first information to a first target flash memory based on the configuration information of the chip select controller includes: Based on the configuration information of the chip select controller, a preset count threshold value corresponding to a first target flash memory that receives the first information by default and the first target flash memory is determined, and the configuration module of the chip select controller sends the first information to the first target flash memory; the preset count threshold value is used to determine whether the information transmission of the first information between the first target flash memory and the chip select controller has been completed; When the configuration module of the chip select controller sends the first information, a state converter in the chip select controller is used to obtain a data transmission state corresponding to the instruction information in the first information; When the data transmission status of the instruction information in the first information is information transmission in progress, determining that the transmission status signal is a low level signal; When the data transmission status of the instruction information in the first information is that the information transmission is completed, it is determined that the transmission status signal is a high level signal.

5. The method according to claim 4, characterized in that The acquiring the state of the first target flash memory and sending the instruction transmission completion flag to the chip selection generation module in the chip selection controller when the instruction transmission completion flag generated in the first target flash memory is monitored includes: When the transmission status signal of the first information is at a high level, read the program operation register in the first target flash memory, determine according to the program operation register that the first target flash memory has completed the information transmission of the instruction information in the first information and the first target flash memory is in an idle state, obtain the instruction transmission completion flag generated by the first target flash memory, and send the instruction transmission completion flag to the chip select generation module in the chip select controller.

6. The method according to claim 5, characterized in that When it is determined based on the flash memory read / write completion flag that the first target flash memory completes the data transmission of the first information, a chip select signal is generated, and the second target flash memory is switched according to the chip select signal to use the second target flash memory to transmit the second information, including: When the chip select generation module in the chip select controller determines that the chip select controller has completed information transmission of the instruction information in the first information with the first target flash memory based on the instruction transmission completion flag, counting the counter module in the chip select generation module based on the transmission scheme, and outputting the count value; the transmission scheme is determined according to the transmission mode and transmission information length of the instruction information in the first information; The comparator module in the chip select generation module compares the count value with a preset count threshold of the first target flash memory, and generates a flash read / write completion flag when the count statistic is equal to the preset count threshold, wherein the flash read / write completion flag is used to indicate that the chip select controller has completed the information transmission of the first information with the first target flash memory; the preset count threshold is a preset expected read / write data volume of the first target flash memory; The shifter module in the chip select generation module obtains the flash memory read and write completion flag in the comparator module, and obtains the first flash memory chip select state and the preset chip select scheme of the register and controller module in the configuration module, determines that the chip select controller has completed the information transmission of the first information with the first target flash memory based on the flash memory read and write completion flag, and performs shift processing on the first flash memory chip select state based on the preset chip select scheme to determine the second flash memory chip select state; the first flash memory chip select state is used to represent the chip select state of the first target flash memory, and the second flash memory chip select state is used to represent the chip select state of the second target flash memory; The logic operation module in the chip select generation module performs a preset logic operation according to the second flash memory chip select state and the transmission state signal of the state converter in the configuration module to obtain a chip select signal; the chip select signal is used to determine the second target flash memory; the transmission state signal includes: a low-level signal indicating that the instruction information in the first information is in transmission and a high-level signal indicating that the instruction information in the first information has been transmitted.

7. The method according to claim 6, characterized in that The method further comprises: When the chip select controller detects a preset error in the information transmission process of the first information, the chip select controller sets the flag bit corresponding to the preset error to a high level, updates the transmission status signal from a low level signal to a high level signal, and stops the information transmission of the first information; The chip select controller turns off the counter module in the chip select generation module, receives the error type of the preset error, determines the corresponding adjustment method according to the error type, obtains the correct instruction adjusted according to the adjustment method, clears the flag bit corresponding to the preset error, updates the transmission status signal from the high level signal to the low level signal, turns on the counter module of the chip select generation module, and makes the counter module of the chip select generation module restart counting at the closed position.

8. A chip selection device, characterized in that: The device comprises: A transmission module, a configuration module for a chip select controller, based on the configuration information of the chip select controller, sends first information to a first target flash memory, obtains the state of the first target flash memory, and when an instruction transmission completion flag generated in the first target flash memory is detected, sends the instruction transmission completion flag to a chip select generation module in the chip select controller; the instruction transmission completion flag is used to indicate that the instruction information in the first information has completed one transmission in the first target flash memory; A chip select module, a chip select generation module for the chip select controller, generates a chip select signal when determining based on a flash memory read and write completion flag that the first target flash memory has completed the data transmission of the first information, and switches the second target flash memory according to the chip select signal to use the second target flash memory to transmit the second information.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the chip selection method according to any one of claims 3 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the chip selection method according to any one of claims 3 to 7.

Citation Information

Cited By

  • Data transformation engine and data transformation engine verification method, device and equipment

    CN122549318A

  • Data transformation engine and data transformation engine verification method, apparatus and device

    CN122549318B