WO2023174086A1 - Universal interface register system and rapid generation method - Google Patents
Universal interface register system and rapid generation method Download PDFInfo
- Publication number
- WO2023174086A1 WO2023174086A1 PCT/CN2023/079789 CN2023079789W WO2023174086A1 WO 2023174086 A1 WO2023174086 A1 WO 2023174086A1 CN 2023079789 W CN2023079789 W CN 2023079789W WO 2023174086 A1 WO2023174086 A1 WO 2023174086A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- module
- register
- data
- general
- instruction
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/30101—Special purpose registers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/39—Circuit design at the physical level
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
- G06F9/30105—Register structure
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2115/00—Details relating to the type of the circuit
- G06F2115/02—System on chip [SoC] design
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application belongs to the field of computer chips, and specifically relates to a universal interface register system and a rapid generation method.
- ASIC Application Specific Integrated Circuit
- Register interface generally refers to the hardware logic that controls the work of each module by reading and writing registers through the CPU (Central Processing Unit, Central Processing Unit).
- Chip functions are becoming more and more complex, and the number of required registers is increasing, and there are Different types of registers are required, and it would be very time-consuming and labor-intensive to rely solely on manpower, and errors are prone to occur and are difficult to find.
- traditional technologies are basically aimed at manual implementation of registers and their control logic. Their versatility and completion efficiency are low. After completing these control logics, they still face a huge and complex integration work. , and these tasks are far more time-consuming and labor-intensive than the register control logic design itself.
- this application proposes a universal interface register system, including a protocol bridge module and a cache module, in which:
- the protocol bridge module is configured to parse the bus data on the bus based on the bus connected to the general interface register system into instructions or instructions and data used in the general interface register system based on the bus protocol; and send the instructions or instructions and data to the cache module;
- the cache module is configured to receive instructions or instructions and data, and read data from the cache module according to the instructions or instructions and data. Send to the protocol bridge module or cache the data to the cache module according to instructions and data.
- the cache module includes an address decoding module and a register module, where:
- the register module includes a general register module and a custom register module.
- the register module is configured to cache data received by the general interface register system;
- the address decoding module is configured to receive instructions or instructions and data from the protocol bridge module, decode the instruction addresses in the instructions or instructions and data, and send the decoded instructions or instructions and data to the corresponding type in the register module. register module;
- the general register module includes general register logic and general register information files, wherein:
- the general register logic configuration is used to compare the instructions and/or data received by the general register module with all register information file addresses in the general register information file, select the general register that meets the comparison and write data to the general register or from the general register read data;
- the general register information file configuration is used to save the information and addresses of all general registers of the general register module and to provide matching mapping for all registers in the general register module.
- the custom register module includes custom register logic and custom register information files, where:
- the custom register logic configuration is used to compare the instructions and/or data received by the custom register module with all register information file addresses in the custom register information file, and select the custom register that satisfies the comparison. And write data to the custom register or read data from the custom register;
- the custom register information file is configured to save the information and addresses of all custom registers in the custom register module and provide matching mapping for all registers in the custom register module.
- the cache module also includes:
- the RxFIFO module is configured to receive data sent from the protocol bus through the protocol bridge module.
- the TxFIFO module is configured to receive data sent from the protocol bus through the protocol bridge module.
- the cache module also includes:
- the interrupt module is configured to monitor exceptions in the general interface register system in real time, and write the corresponding exceptions to the corresponding exception registers in the general register module, and based on the corresponding exception enable status registers in the general register module and The logical AND operation of the value of the exception register generates the corresponding interrupt signal.
- the cache module further includes a clock reset module, and the clock reset module includes a clock gating control module. module, asynchronous reset and synchronous release module, where:
- the clock gating module is configured to control the clock of one or more general registers in the general register module
- the asynchronous reset synchronous release module is configured to release the general interface register system and the protocol bus synchronously after asynchronous reset.
- the protocol bridge module includes a general protocol read and write state machine, an asynchronous read FIFO, an asynchronous instruction FIFO, an asynchronous write FIFO, and a cache module access state machine, where:
- the general protocol read and write state machine is configured to parse the instructions or instructions and data on the protocol bus received by the protocol bridge module, send the instructions to the asynchronous instruction FIFO, and send the data to the asynchronous write FIFO or read the data from the asynchronous read FIFO Encapsulate the transmission data on the protocol bus and send it to the protocol bus;
- the cache module access state machine is configured to read instructions from the asynchronous instruction FIFO or read instructions and data from the asynchronous instruction FIFO and from the asynchronous write FIFO and send instructions or instructions and data to the cache module and obtain from the cache module Data is sent to the asynchronous read FIFO.
- Another aspect of this application also proposes a method for quickly generating the general interface register system in the above embodiment, including:
- configuring functional modules and register parameters according to the requirements of the corresponding interface includes:
- Figure 1 is a structural diagram of a general interface register system provided in some embodiments of the present application.
- Figure 2 is a schematic diagram of the internal structure of a protocol bridge of a general interface register system provided in some embodiments of the present application;
- Figure 3 is a functional schematic diagram of an address decoding module of a general interface register system provided in some embodiments of the present application;
- Figure 4 is a schematic structural diagram of a general register module of a general interface register system provided in some embodiments of the present application;
- Figure 5 is a schematic structural diagram of a custom register module of a universal interface register system provided in some embodiments of the present application.
- Figure 6 is a schematic diagram of the RxFIFO structure of a general interface register system provided in some embodiments of the present application.
- Figure 7 is a schematic structural diagram of an interrupt module of a general interface register system provided in some embodiments of the present application.
- Figure 8 is a schematic structural diagram of a clock reset module of a universal interface register system provided in some embodiments of the present application.
- Figure 9 is a quick generation method of a general interface register system provided in some embodiments of the present application.
- this application proposes a universal interface register system, including a protocol bridge module 1 and a cache module 2, where:
- the protocol bridge module 1 is configured to parse the bus data on the bus based on the bus connected to the general interface register system into instructions or instructions and data used in the general interface register system based on the bus protocol; and send the instructions or instructions and data to Cache module 2;
- the cache module 2 is configured to receive instructions or instructions and data, read data from the cache module and send it to the protocol bridge module according to the instructions or instructions and data, or cache data to the cache module 2 according to the instructions and data.
- the protocol bridge module is connected to the CPU (the CPU in the SOC chip or an independent CPU outside the SOC chip) through the connected bus and serves as a "slave", that is, the CPU ancillary equipment. Communicates with the CPU through the bus and receives instructions or data sent by the CPU through the bus. Protocol bridge module 1 sends the CPU through the bus Analyze the bus data sent, that is, according to the bus protocol, the address, chip select signal, read and write data, chip select signal, etc. sent by the CPU are output to the address decoding module for address decoding, thereby determining that the general register address is selected. segment, a custom register address segment, or a memory address segment.
- the corresponding chip select signal, address, write signal and write data will be given to cache module 2.
- the corresponding The chip select signal, address, and read signal are given to the cache module 2, and then the returned read data is received and sent to the bus.
- the cache module 2 serves as the data cache module of the general interface register system. It is used to receive the parsed write instructions (including chip select signals and addresses) from the protocol bridge module 1 and cache the write data, or to send the data to the protocol bridge according to the read instructions. Module 1 sends the data corresponding to the read command.
- the cache module 2 includes an address decoding module 3 and a register module 11, where:
- the register module 11 includes a general register module 4 and a custom register module 5.
- the register module 11 is configured to cache data received by the general interface register system;
- the address decoding module 3 is configured to receive instructions or instructions and data from the protocol bridge module 1 and decode the instruction addresses in the instructions or instructions and data, and send the decoded instructions or instructions and data to the register module.
- Figure 3 shows the internal structure diagram of the address decoding module 3, that is, the address decoding module 3 includes address decoding logic 12, and the function of the address decoding logic 12 is Analyze the chip select signal, byte enable signal, read/write enable signal, address, and/or write data parsed by the protocol bridge module 1, and then send the corresponding above-mentioned instructions or the above-mentioned instructions and data according to the analysis results. to general register module 4, custom register module 5, or memory interface 6. That is to say, the function of the address decoding module 3 is to decode the address output by the protocol bridge module and determine that the CPU wants to access the registers in the general register module 4, the registers in the custom register module 5 and Memory (referring to the memory interface).
- the memory to be accessed directly needs to be accessed by the memory interface 6 in the register system; if it is a write operation, then the corresponding chip select signal, write enable signal, access address, write data and word The enable signal is output to the corresponding module; if it is a read operation, the corresponding chip select signal, read enable, and access address are then output to the corresponding module, and the corresponding read data is obtained.
- the address decoding logic 12 performs address decoding on the input read and write addresses to obtain the chip select signal (the chip select signal of the register corresponding to the general register module 4, the chip select signal of the custom register module 5 and Memory chip select signal), if the chip select signal of the general register module 4 is 1, the input chip select signal, byte valid signal, read/write enable signal, address, and read/write data line are output to the general register The chip select signal, byte valid signal, read/write enable signal, address, read/write data line connected to module 4; if the chip select signal of custom register module 5 is 1, Then the input chip select signal, byte valid signal, read/write enable signal, address, read/write data line are output to the chip select signal, byte valid signal, read/write enable connected to the custom register module 5 Signal, address, read/write data lines; if the Memory chip select signal is 1, output the input chip select signal, byte valid signal, read/write enable signal, address, read/write data line to the memory interface 6 Connected chip select signal
- the general register module 4 includes a general register logic 16 and a general register information file 17, wherein:
- the general register logic 16 is configured to compare the instructions and/or data received by the general register module 4 with all register information file addresses in the general register information file 17, select the general register that satisfies the comparison and write data to the general register. Or read data from general register;
- the general register information file 17 is configured to save the information and addresses of all general registers of the general register module and provide matching mapping for all registers in the general register module.
- the function of the general register module 4 is to set some registers necessary for the register interface, such as displaying the enable valid signal, enable clear signal, enable status, interrupt CPU clear signal, and interrupt in clock gating. CPU setting signals, interrupt status, masking signals and other related signals; if the general register module is selected after address decoding, the general register module 4 will write or read the register according to the chip select signal, read and write enable and address The value of When control signals such as read and write enable are valid, compare the internal addresses of all register information mentioned above to select the corresponding register, and then write the value to the register or read the value in the register.
- the general register module 4 includes a general register logic 16 and a general register information file 17, where the general register logic 16 receives the chip select signal, byte enable signal, and read signal sent by the general register module 4. /Write enable signals, addresses, and/or write data, and compare the addresses of the above signals with the addresses of all registers in the general register information file 17. If the comparison result is a match and a register is selected, add the register The restriction of the type is to write the written data into the general register through the register logic 16 and finally output it, or to read the input value or the value inside the register after double qualification of address comparison and register type.
- the general register information file 17 contains information of the general interface register system proposed in this application.
- the custom register module 5 includes custom register logic 18 and a custom register information file 19, wherein:
- the custom register logic 18 is configured to combine the instructions and/or data received by the custom register module 5 with the custom Compare all register information file addresses in the defined register information file 19, select the custom register that meets the comparison and write data to the general register or read data from the custom register;
- the custom register information file is configured to save the information and addresses of all general registers of the general register module and to provide matching mapping for all custom registers in the custom register module 5 .
- the function of the custom register module is to set some registers required by user hardware logic, such as the most common enable signals of user hardware logic. After address decoding, if the custom register module 5 is selected , the value will be written into the register according to the chip select signal, read and write enable and address, or the value in the register will be read out according to the relevant signal.
- the custom register module 5 contains a user-defined register containing all the information (address, register type, reset value, invalid bit, etc.), which contains information such as the address of the custom register, reset value, and custom register type. By combining the input address with the chip select signal, read When control signals such as write enable are valid, compare the internal address containing user-defined register information to select the corresponding register, and then write the value to the register or read the value in the register.
- the custom register logic 18 in the custom register module 5 selects a custom register by comparing the input address with the address in the custom register information file 19 generated by the script, and then adds The upper register type limit writes the written data to the register through the register logic and finally outputs it, or the value input by the user hardware logic or the value inside the register is read out after address comparison and register type limit.
- the cache module 2 also includes:
- the RxFIFO module is configured to receive data sent from the protocol bus through the protocol bridge module.
- the TxFIFO module is configured to receive data sent from the protocol bus through the protocol bridge module.
- the register module 11 also includes an RxFIFO module and a TxFIFO module.
- RxFIFO and TxFIFO The function of RxFIFO and TxFIFO is to add DMA related functions based on the synchronous FIFO function, and also supports Single transmission, Burst transmission and Packet transmission.
- the depth and data width of the FIFO are also configurable. ;
- some other logical functions related to FIFO or DMA can also be added to this module, and the new functions can also be flexibly configured to be turned off/on.
- the RxFIFO module and TxFIFO have the same structure, as shown in Figure 6.
- Figure 6 shows the structure diagram of RxFIFO.
- the RxFIFO implements a DMA function control module that controls the synchronization FIFO accordingly.
- the register module 11 has an external DMA module.
- the DMA module can be integrated on the general interface register system proposed in this application, or can be a different chip module (other modules in Figure 1) outside the general interface register system.
- the DMA control module Provide some flow control information to the DMA module, including Single, Burst, and Packet mode selections wait. When the DMA function is not set, TXFIFO and RXFIFO function as ordinary FIFOs.
- the cache module 2 also includes:
- Interrupt module 7 the interrupt module 7 is configured to monitor exceptions in the general interface register system in real time, and write the corresponding exceptions to the corresponding exception registers in the general register module 4, and based on the use of the corresponding exceptions in the general register module 4 The logical AND operation of the values in the status register and exception register generates the corresponding interrupt signal.
- the interrupt module 7 is in the register module 11. As in the above embodiment, the interrupt module 7 reads the corresponding register value from the interrupt signal register in the general register module 4 and The corresponding enable status register value is performed, and a logical AND operation is performed, and then an interrupt signal is sent to the CPU based on the operation result, and the CPU handles the corresponding exception.
- the number of exception settings is configurable, and the number of exception ports matching the number of exceptions is configured according to the user's needs; of course, the number of interrupt enable signals is configured to match the number of exceptions.
- the number of settings is the same.
- the enabled exception status register can be obtained (needs to be configured in the general register module). This register is used to record the corresponding If it is abnormal, then the enabled exception status register itself will perform a bitwise OR operation to obtain a 1-bit interrupt signal and output it to the CPU. The CPU will then query the exception status register, the enable status register and the enabled exception status register.
- the interrupt module 7 also contains a fixed number of exception settings related to TX FIFO and RX FIFO. These exceptions can be generated according to the configuration of the parameters by choosing whether to generate RX FIFO and TX FIFO. , if the TX FIFO and RX FIFO modules are not generated, then the corresponding interrupts of these two modules will not be generated.
- Figure 7 shows a schematic diagram in which the user configures eight-bit exception settings in the source file template.
- an eight-bit enable status register will be generated.
- the exception status register is bitwise ANDed
- an eight-bit enabled exception status register is obtained, and then the eight-bit enabled exception status register itself is bitwise ORed to obtain a 1-bit interrupt signal output to the CPU, and then the CPU
- These three status registers are queried to obtain the abnormal cause of the interrupt; the interrupt principle inside the RX FIFO and TX FIFO is similar to this.
- the interrupt module also supports multi-level interrupt configuration, full interrupt output or single-bit interrupt output.
- the 8 spaces in the first column shown in Figure 7 represent the exception status register values of the 8 exceptions corresponding to exception #0 to exception #7, and the second column represents the value of the exception status register after being enabled.
- the three columns refer to the value of the enable status register.
- the corresponding exception status register in the first column will be assigned a value.
- the first An exception status register will be assigned a value of 1; the value of the enable status register in the third column is specified by the CPU, that is, if you choose to ignore exception #0, the CPU will set this bit to 0 during initialization, and interrupt module 7 will detect
- the value 1 of the exception status register and the value of the enable status register will be logically AND operation, if the CPU does not choose to ignore the exception #0, the value of the corresponding enable status register is 1, then the AND result of 1 and 1 is 1, then the enabled exception status register is 1, and the interrupt module 7 sends an interrupt signal to the CPU.
- interrupt module 7 can be flexibly configured as needed.
- Figure 7 shows only 8 interrupts for abnormal conditions. According to functional needs, more or deeper interrupt exceptions can be flexibly configured based on the above mechanism.
- the cache module 2 also includes a clock reset module 10.
- the clock reset module 10 includes a clock gating module 20 and an asynchronous reset and synchronous release module 21, wherein:
- the clock gating module 20 is configured to control the clock of one or more general registers in the general register module;
- the asynchronous reset synchronous release module 21 is configured to release the general interface register system and the protocol bus synchronously after asynchronous reset.
- the clock module 20 is used to perform a clock gating function (Clock-Gating) on the registers in the general register module 4. It has always been an important means to reduce the power consumption of microprocessors, mainly for registers. Dynamic power consumption caused by flipping, how to design clock gating more effectively is crucial to minimize power consumption while ensuring processor performance), the asynchronous reset synchronous release module 21 is a functional module for asynchronous reset synchronous release, through The configuration of parameters selects whether to generate the above-mentioned clock gating module 20 and asynchronous reset synchronous release module 21. If you choose to generate this module and it is fully functional, the custom register module in Figure 1 comes from the clock gated by the clock gating module 20. The clocks of other modules can also come from the clock gated by the clock module 20. It’s the clock sent in from the top;
- the reset signal is released synchronously after an asynchronous reset; if the clock gating function is generated separately, the custom register module comes from the clock after gating, and the clocks of other modules can come from the clock after gating or can be The clock sent in from the top layer; the reset signal is passed directly from the top layer; if the asynchronous reset is generated separately and released synchronously, the clocks in the custom registers and other modules are passed directly from the top layer, and the reset signal is released synchronously through the asynchronous reset. of.
- the protocol bridge module 1 includes a general protocol read and write state machine, an asynchronous read FIFO, an asynchronous instruction FIFO, an asynchronous write FIFO, and a cache module access state machine 23, where:
- the general protocol read and write state machine is configured to parse the instructions or instructions and data on the protocol bus received by the protocol bridge module, send the instructions to the asynchronous instruction FIFO, and send the data to the asynchronous write FIFO or read the data from the asynchronous read FIFO Encapsulate the transmission data on the protocol bus and send it to the protocol bus;
- the cache module access state machine 23 is configured to read instructions from the asynchronous instruction FIFO or read instructions and data from the asynchronous instruction FIFO and from the asynchronous write FIFO, and send instructions or instructions and data to the cache module 2, and from the cache Module 2 obtains data and sends it to the asynchronous read FIFO.
- the protocol bridge module 1 mainly has two functions: protocol conversion and cross-clock domain processing.
- Protocol conversion is to convert the general protocol interface into a storage SRAM (Static Random-Access Memory, SRAM, Static Random Memory) interface (that is, the bus protocol of the bus connected to the general interface register system and the data transmission interface of the logic circuit inside the general interface register system internal agreement).
- SRAM Static Random-Access Memory
- Static Random Memory Static Random Memory
- the protocol bridge module 1 receives the address, chip select signal, byte enable signal, read and write data and other information sent by the CPU according to the unified standard protocol, and then converts these information contents into SRAM storage
- the protocol interface (the internal protocol interface of the data transmission interface of the logic circuit within the general interface register system) facilitates subsequent address decoding and storing data in the corresponding storage address segment.
- Figure 2 taking the asynchronous clock domain as an example, under the premise that the clocks of clock domain 1 and clock domain 2 are different, the read and write commands received by the general protocol interface (bus interface) are parsed through the general protocol read and write state machine 22 , chip select information and read and write data.
- the cache access state machine 23 extracts information from the three FIFOs according to the SRAM interface requirements and its own clock domain. Finally, the transformation from a general protocol interface to a storage SRAM interface was completed.
- the general interface register system proposed in this application supports synchronous processing and also supports asynchronous cross-clock domain processing.
- Synchronization means that one end of the general protocol and other modules, that is, user-defined functional modules, are in the same clock domain. That is, clock domain 1 and clock domain 2 in the figure are the same clock domain.
- the protocol bridge is a synchronous bridge, and the three FIFOs used are synchronous FIFOs.
- Asynchronous processing means that one end of the general protocol and other modules are in different clock domains (the clock frequencies of clock domain 1 and clock domain 2 are different).
- the protocol bridge is an asynchronous bridge, and the three FIFOs used are asynchronous FIFOs.
- Asynchronous bridges are compatible with synchronous circuits.
- the protocol bridge module can be specifically divided into a general protocol read and write state machine 22, an asynchronous read FIFO 24, an asynchronous instruction FIFO 25, an asynchronous write FIFO 26, and a cache module access state machine 23.
- the general protocol read and write state machine is located in the time domain of the bus protocol.
- the asynchronous read FIFO 24, the asynchronous instruction FIFO 25, and the asynchronous write FIFO 26 are between the time domain of the bus protocol and the time domain of the general interface register system.
- the cache access state machine 23 is located in the time domain using the interface register system. In some cases, because the clock specified by the bus protocol and the clock frequency of the interface register system are different, clock domain 1 and clock domain 2 in Figure 2 are not the same in many cases.
- this application uses asynchronous FIFO as the data connection structure between the universal protocol read-write state machine and the cache access state machine to meet the versatility of the interface register system proposed in this application.
- Another aspect of this application also proposes a method for quickly generating the universal interface register system in the above embodiment, as shown in Figure 9.
- the method includes:
- Step S1 Configure functional modules and register parameters according to the requirements of the corresponding interface
- Step S2 Design the hardware circuit of the general interface register system into a template design file
- Step S3 Activate the corresponding modules in the template design file and generate the final design file according to the functional module and register parameters and the configuration parameters of each module in the general interface register system in the configuration file.
- configuring functional modules and register parameters according to the requirements of the corresponding interface includes:
- this application proposes the general interface register system as before, and designs the above system into a design template of RTL language, and marks each module in the above system, and sets the corresponding according to the mark. Configure parameters. If a corresponding module is required, set the parameter of the corresponding tag of the module to True or Yes.
- the specifications of the register module and custom register module are determined according to the area of the above system in the SOC chip, and then tailored according to the specifications of the corresponding needs. For example, if certain general registers are not required, they can be directly Set the corresponding register mark position to No. If you do not need the interrupt module, you can set the corresponding configuration parameter to No.
- the presence or absence of any module can be configured through the configuration file.
- the number and specifications of the registers in the general register module and custom register module in the register module need to be specified in the configuration file.
- the depth and bit width of TxFIFO, RXFIFO, and asynchronous FIFO can be specified according to the actual needs of the interface.
- the register type and its domain are defined by filling in parameters in the form (configuration file). (Since the internal integration has been completed, the user's own implemented module is combined with the tool-generated register module. Integration) and then call the script to extract the parameters in the table and fill them into the corresponding hardware logic template and register list template. During this process, the script will also check whether the parameters in the table are correctly defined. If an error occurs, it will not be correct. A register list and its corresponding register logic are generated and an error is reported at the same time. After the user corrects the errors in the form, the parameters in the form can be extracted through a script and filled in the register logic template and register list template to obtain the correct register. Interface logic and register list.
- some common modules can be integrated internally, which not only increases the reusability of the modules, but also avoids the problem of logical errors in the written code. You can choose whether to generate some of the common modules by configuring the corresponding parameters.
- the program can be stored in a computer-readable storage medium.
- the above-mentioned The storage medium can be read-only memory, magnetic disk or optical disk, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- Bus Control (AREA)
Abstract
Description
相关申请的交叉引用Cross-references to related applications
本申请要求于2022年03月14日提交中国专利局、申请号202210246442.9、申请名称为“一种通用接口寄存器系统及快速生成方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application submitted to the China Patent Office on March 14, 2022, with application number 202210246442.9 and the application name "A universal interface register system and rapid generation method", the entire content of which is incorporated herein by reference. Applying.
本申请属于计算机芯片领域,具体涉及一种通用接口寄存器系统及快速生成方法。This application belongs to the field of computer chips, and specifically relates to a universal interface register system and a rapid generation method.
当今社会,随着物联网,云计算,大数据,人工智能,自动驾驶等高新技术的飞速发展,对ASIC芯片的应用和可靠性要求也越来越高。而ASIC芯片内需通过配置相应的寄存器才能使整个ASIC芯片内部的各个模块之间协同工作,寄存器及其控制逻辑的可靠性对于ASIC芯片的正常工作发挥着至关重要的作用,因此,为寄存器及其控制逻辑提供一个通用性的模板在其填入对应的参数后即可得到对应的寄存器及其控制逻辑这个对于ASIC(Application Specific Integrated Circuit,集成电路)芯片能否正常工作起到至关重要的作用。In today's society, with the rapid development of high-tech technologies such as the Internet of Things, cloud computing, big data, artificial intelligence, and autonomous driving, the application and reliability requirements for ASIC chips are becoming higher and higher. The ASIC chip needs to configure the corresponding registers to make the various modules inside the ASIC chip work together. The reliability of the registers and their control logic plays a vital role in the normal operation of the ASIC chip. Therefore, it is necessary to provide registers and Its control logic provides a universal template. After filling in the corresponding parameters, you can get the corresponding register and its control logic. This is crucial for the normal operation of the ASIC (Application Specific Integrated Circuit) chip. effect.
寄存器接口一般是指通过CPU(Central Processing Unit,中央处理器)读写寄存器内进而控制各个模块工作的硬件逻辑,芯片功能越来越复杂,所需寄存器的数目越来越多,而且芯片中又需要不同的类型的寄存器,如果完全依靠人力是非常耗时费力的,而且容易出现错误让人难以发现。为了提高效率并且避免人为错误,传统的技术基本上都是针对寄存器及其控制逻辑的人工实现,通用性及其完成效率较低,在完成这些控制逻辑之后,依然面临着庞大而复杂的集成工作,而这些工作还远比寄存器控制逻辑设计本身更加耗时耗力。Register interface generally refers to the hardware logic that controls the work of each module by reading and writing registers through the CPU (Central Processing Unit, Central Processing Unit). Chip functions are becoming more and more complex, and the number of required registers is increasing, and there are Different types of registers are required, and it would be very time-consuming and labor-intensive to rely solely on manpower, and errors are prone to occur and are difficult to find. In order to improve efficiency and avoid human errors, traditional technologies are basically aimed at manual implementation of registers and their control logic. Their versatility and completion efficiency are low. After completing these control logics, they still face a huge and complex integration work. , and these tasks are far more time-consuming and labor-intensive than the register control logic design itself.
申请内容Application content
为解决以上问题,本申请提出一种通用接口寄存器系统,包括协议桥模块,缓存模块,其中:In order to solve the above problems, this application proposes a universal interface register system, including a protocol bridge module and a cache module, in which:
协议桥模块配置用于基于通用接口寄存器系统所连接的总线,将总线上的总线数据基于总线协议解析成通用接口寄存器系统内使用的指令或指令和数据;并将指令或指令和数据发送到缓存模块;The protocol bridge module is configured to parse the bus data on the bus based on the bus connected to the general interface register system into instructions or instructions and data used in the general interface register system based on the bus protocol; and send the instructions or instructions and data to the cache module;
缓存模块配置用于接收指令或指令和数据,根据指令或指令和数据从缓存模块读取数据 发送到协议桥模块或根据指令和数据将数据缓存到缓存模块。The cache module is configured to receive instructions or instructions and data, and read data from the cache module according to the instructions or instructions and data. Send to the protocol bridge module or cache the data to the cache module according to instructions and data.
在本申请的一些实施例中,缓存模块包括地址译码模块,寄存器模块,其中:In some embodiments of this application, the cache module includes an address decoding module and a register module, where:
寄存器模块包括通用寄存器模块和自定义寄存器模块,寄存器模块配置用于缓存通用接口寄存器系统接收到的数据;The register module includes a general register module and a custom register module. The register module is configured to cache data received by the general interface register system;
地址译码模块配置用于接收协议桥模块的指令或指令和数据并对指令或指令和数据中的指令地址进行译码,并将译码后的指令或指令和数据发送到寄存器模块中对应类型的寄存器模块;以及The address decoding module is configured to receive instructions or instructions and data from the protocol bridge module, decode the instruction addresses in the instructions or instructions and data, and send the decoded instructions or instructions and data to the corresponding type in the register module. register module; and
将译码后的指令或指令和数据发送到存储器中。Send decoded instructions or instructions and data to memory.
在本申请的一些实施例中,通用寄存器模块包括通用寄存器逻辑,通用寄存器信息文件,其中:In some embodiments of the present application, the general register module includes general register logic and general register information files, wherein:
通用寄存器逻辑配置用于将通用寄存器模块所接收指令和/或数据,与通用寄存器信息文件中的所有寄存器信息文件地址进行比较,选中满足比较的通用寄存器并向通用寄存器写入数据或从通用寄存器读取数据;The general register logic configuration is used to compare the instructions and/or data received by the general register module with all register information file addresses in the general register information file, select the general register that meets the comparison and write data to the general register or from the general register read data;
通用寄存器信息文件配置用于保存通用寄存器模块的所有通用寄存器的信息与地址以及为通用寄存器模块中所有寄存器提供匹配映射。The general register information file configuration is used to save the information and addresses of all general registers of the general register module and to provide matching mapping for all registers in the general register module.
在本申请的一些实施例中,自定义寄存器模块包括自定义寄存器逻辑,自定义寄存器信息文件,其中:In some embodiments of this application, the custom register module includes custom register logic and custom register information files, where:
所述自定义寄存器逻辑配置用于将所述自定义寄存器模块所接收的指令和/或数据,与所述自定义寄存器信息文件中的所有寄存器信息文件地址进行比较,选中满足比较的自定义寄存器并向所述自定义寄存器写入数据或从所述自定义寄存器读取数据;The custom register logic configuration is used to compare the instructions and/or data received by the custom register module with all register information file addresses in the custom register information file, and select the custom register that satisfies the comparison. And write data to the custom register or read data from the custom register;
所述自定义寄存器信息文件配置用于保存所述自定义寄存器模块的所有自定义寄存器的信息与地址以及为所述自定义寄存器模块中所有寄存器提供匹配映射。The custom register information file is configured to save the information and addresses of all custom registers in the custom register module and provide matching mapping for all registers in the custom register module.
在本申请的一些实施例中,缓存模块还包括:In some embodiments of this application, the cache module also includes:
RxFIFO模块,RxFIFO模块配置用于接收从协议总线通过协议桥模块发送的数据。RxFIFO module, the RxFIFO module is configured to receive data sent from the protocol bus through the protocol bridge module.
TxFIFO模块,TxFIFO模块配置用于接收从协议总线通过协议桥模块发送的数据。TxFIFO module, the TxFIFO module is configured to receive data sent from the protocol bus through the protocol bridge module.
在本申请的一些实施例中,缓存模块还包括:In some embodiments of this application, the cache module also includes:
中断模块,中断模块配置用于实时监测通用接口寄存器系统中的异常,并将对应的异常写入到通用寄存器模块中对应的异常寄存器,并基于通用寄存器模块中的对应异常的使能状态寄存器和异常寄存器的值的逻辑与运算生成对应的中断信号。Interrupt module, the interrupt module is configured to monitor exceptions in the general interface register system in real time, and write the corresponding exceptions to the corresponding exception registers in the general register module, and based on the corresponding exception enable status registers in the general register module and The logical AND operation of the value of the exception register generates the corresponding interrupt signal.
在本申请的一些实施例中,缓存模块还包括时钟复位模块,时钟复位模块包括时钟门控 模块,异步复位同步释放模块,其中:In some embodiments of the present application, the cache module further includes a clock reset module, and the clock reset module includes a clock gating control module. module, asynchronous reset and synchronous release module, where:
时钟门控模块配置用于对通用寄存器模块中的一个或多个通用寄存器的时钟进行控制;The clock gating module is configured to control the clock of one or more general registers in the general register module;
异步复位同步释放模块配置用于,使通用接口寄存器系统与协议总线异步复位后同步释放。The asynchronous reset synchronous release module is configured to release the general interface register system and the protocol bus synchronously after asynchronous reset.
在本申请的一些实施例中,协议桥模块包括通用协议读写状态机,异步读FIFO,异步指令FIFO,异步写FIFO,缓存模块访问状态机,其中:In some embodiments of this application, the protocol bridge module includes a general protocol read and write state machine, an asynchronous read FIFO, an asynchronous instruction FIFO, an asynchronous write FIFO, and a cache module access state machine, where:
通用协议读写状态机配置用于解析协议桥模块接收到的协议总线上的指令或指令和数据,将指令发送到异步指令FIFO,以及将数据发送到异步写FIFO或从异步读FIFO读取数据封装成协议总线上的传输数据发送到协议总线上;The general protocol read and write state machine is configured to parse the instructions or instructions and data on the protocol bus received by the protocol bridge module, send the instructions to the asynchronous instruction FIFO, and send the data to the asynchronous write FIFO or read the data from the asynchronous read FIFO Encapsulate the transmission data on the protocol bus and send it to the protocol bus;
缓存模块访问状态机配置用于从异步指令FIFO中读取指令或从异步指令FIFO和从异步写FIFO中读取指令和数据,并将指令或指令和数据发送到缓存模块,以及从缓存模块获取数据发送到异步读FIFO中。The cache module access state machine is configured to read instructions from the asynchronous instruction FIFO or read instructions and data from the asynchronous instruction FIFO and from the asynchronous write FIFO and send instructions or instructions and data to the cache module and obtain from the cache module Data is sent to the asynchronous read FIFO.
本申请的另一方面还提出一种上述实施方式中的通用接口寄存器系统的快速生成方法,包括:Another aspect of this application also proposes a method for quickly generating the general interface register system in the above embodiment, including:
根据对应接口的需求配置功能模块以及寄存器参数;Configure function modules and register parameters according to the requirements of the corresponding interface;
将通用接口寄存器系统的硬件电路设计成模板设计文件;Design the hardware circuit of the general interface register system into a template design file;
根据功能模块和寄存器参数以及配置文件中关于上述通用接口寄存器系统中各个模块的配置参数激活模板设计文件中对应的模块并生成最终设计文件。Activate the corresponding modules in the template design file and generate the final design file according to the functional module and register parameters as well as the configuration parameters of each module in the above-mentioned general interface register system in the configuration file.
在本申请的一些实施方式中,根据对应接口的需求配置功能模块以及寄存器参数包括:In some implementations of this application, configuring functional modules and register parameters according to the requirements of the corresponding interface includes:
根据需求配置中接口所连接的总线协议选择对应的通用协议读写状态机逻辑;Select the corresponding general protocol to read and write state machine logic according to the bus protocol connected to the interface in the required configuration;
根据寄存器参数配置通用寄存器模块和自定义寄存器模块中的寄存器的类型及寄存器个数。Configure the type and number of registers in the general register module and custom register module according to the register parameters.
通过本申请提出的一种通用接口寄存器系统,通过协议桥对接多种总线协议并解析总线上的数据,并通过缓存模块中各个模块缓存从总线上解析的数据,实现ASIC芯片或SOC(System on Chip,片上系统)芯片内部逻辑与总线的通用接口。同时将上述系统集成成通用模板,并对通用接口寄存器系统中各个模块进行标记,根据配置文件中对应的标记的参数裁剪通用模板并生成对应的寄存器接口电路设计文件。可在SOC芯片中快速实现各个模块之间的接口电路的设计,只需将SOC芯片中不同模块所连接的总线类型以及所功能需求中所需要的各种寄存器的类型及个数写入配置文件,便可基于通用模板生成。Through a general interface register system proposed in this application, multiple bus protocols are connected through a protocol bridge and the data on the bus is parsed, and the data parsed from the bus is cached through each module in the cache module, thereby realizing ASIC chips or SOC (System on Chip, system on chip) is a universal interface for the internal logic and bus of the chip. At the same time, the above system is integrated into a universal template, and each module in the universal interface register system is marked. The universal template is cut according to the corresponding marked parameters in the configuration file and the corresponding register interface circuit design file is generated. The design of the interface circuit between each module can be quickly implemented in the SOC chip. You only need to write the bus type connected to the different modules in the SOC chip and the type and number of various registers required for the functional requirements into the configuration file. , which can be generated based on the general template.
为了更清楚地说明本申请一些实施例中或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in some embodiments of the present application or in related technologies, the drawings needed to be used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
图1为本申请一些实施例中提供的一种通用接口寄存器系统的结构图;Figure 1 is a structural diagram of a general interface register system provided in some embodiments of the present application;
图2为本申请一些实施例中提供的一种通用接口寄存器系统的协议桥内部结构示意图;Figure 2 is a schematic diagram of the internal structure of a protocol bridge of a general interface register system provided in some embodiments of the present application;
图3为本申请一些实施例中提供的一种通用接口寄存器系统的地址译码模块的功能示意图;Figure 3 is a functional schematic diagram of an address decoding module of a general interface register system provided in some embodiments of the present application;
图4为本申请一些实施例中提供的一种通用接口寄存器系统的通用寄存器模块的结构示意图;Figure 4 is a schematic structural diagram of a general register module of a general interface register system provided in some embodiments of the present application;
图5为本申请一些实施例中提供的一种通用接口寄存器系统的自定义寄存器模块的结构示意图;Figure 5 is a schematic structural diagram of a custom register module of a universal interface register system provided in some embodiments of the present application;
图6为本申请一些实施例中提供的一种通用接口寄存器系统的RxFIFO结构示意图;Figure 6 is a schematic diagram of the RxFIFO structure of a general interface register system provided in some embodiments of the present application;
图7为本申请一些实施例中提供的一种通用接口寄存器系统的中断模块的结构示意图;Figure 7 is a schematic structural diagram of an interrupt module of a general interface register system provided in some embodiments of the present application;
图8为本申请一些实施例中提供的一种通用接口寄存器系统的时钟复位模块的结构示意图;Figure 8 is a schematic structural diagram of a clock reset module of a universal interface register system provided in some embodiments of the present application;
图9为本申请一些实施例中提供的一种通用接口寄存器系统的快速生成方法。Figure 9 is a quick generation method of a general interface register system provided in some embodiments of the present application.
为使本申请的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本申请一些实施例中进一步详细说明。In order to make the purpose, technical solutions and advantages of the present application more clear, some embodiments of the present application will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
如图1所示,本申请提出一种通用接口寄存器系统,包括协议桥模块1,缓存模块2,其中:As shown in Figure 1, this application proposes a universal interface register system, including a protocol bridge module 1 and a cache module 2, where:
协议桥模块1配置用于基于通用接口寄存器系统所连接的总线,将总线上的总线数据基于总线协议解析成通用接口寄存器系统内使用的指令或指令和数据;并将指令或指令和数据发送到缓存模块2;The protocol bridge module 1 is configured to parse the bus data on the bus based on the bus connected to the general interface register system into instructions or instructions and data used in the general interface register system based on the bus protocol; and send the instructions or instructions and data to Cache module 2;
缓存模块2配置用于接收指令或指令和数据,根据指令或指令和数据从缓存模块读取数据发送到协议桥模块或根据指令和数据将数据缓存到缓存模块2。The cache module 2 is configured to receive instructions or instructions and data, read data from the cache module and send it to the protocol bridge module according to the instructions or instructions and data, or cache data to the cache module 2 according to the instructions and data.
在本申请的一些实施例中,如图1所示,协议桥模块通过所连接的总线和CPU(SOC芯片中的CPU或SOC芯片之外独立的CPU)相连并作为“从机”,即CPU的附属设备。通过总线与CPU通信,同时接收CPU通过总线发送的指令或数据。协议桥模块1将CPU通过总线发 送的总线数据进行解析,即按照该总线的协议将CPU发送的地址、片选信号、读写数据、片选信号等输出给地址译码模块进行地址译码,从而确定选择的是通用寄存器地址段、还是自定义寄存器地址段、还是存储器地址段,如果是写操作,选中之后将对应的片选信号、地址、写信号和写数据给到缓存模块2,同样对于读操作,选中之后将对应的片选信号、地址、读信号给到缓存模块2,然后接收返回的读数据并发送到总线上。In some embodiments of the present application, as shown in Figure 1, the protocol bridge module is connected to the CPU (the CPU in the SOC chip or an independent CPU outside the SOC chip) through the connected bus and serves as a "slave", that is, the CPU ancillary equipment. Communicates with the CPU through the bus and receives instructions or data sent by the CPU through the bus. Protocol bridge module 1 sends the CPU through the bus Analyze the bus data sent, that is, according to the bus protocol, the address, chip select signal, read and write data, chip select signal, etc. sent by the CPU are output to the address decoding module for address decoding, thereby determining that the general register address is selected. segment, a custom register address segment, or a memory address segment. If it is a write operation, after selection, the corresponding chip select signal, address, write signal and write data will be given to cache module 2. Similarly, for a read operation, after selection, the corresponding The chip select signal, address, and read signal are given to the cache module 2, and then the returned read data is received and sent to the bus.
缓存模块2作为通用接口寄存器系统的数据缓存模块,用于接收来自协议桥模块1解析后的写入指令(包括片选信号,地址)和写入数据并缓存,或者根据读取指令向协议桥模块1发送该读指令对应的数据。The cache module 2 serves as the data cache module of the general interface register system. It is used to receive the parsed write instructions (including chip select signals and addresses) from the protocol bridge module 1 and cache the write data, or to send the data to the protocol bridge according to the read instructions. Module 1 sends the data corresponding to the read command.
在本申请的一些实施例中,缓存模块2包括地址译码模块3,寄存器模块11,其中:In some embodiments of the present application, the cache module 2 includes an address decoding module 3 and a register module 11, where:
寄存器模块11包括通用寄存器模块4和自定义寄存器模块5,寄存器模块11配置用于缓存通用接口寄存器系统接收到的数据;The register module 11 includes a general register module 4 and a custom register module 5. The register module 11 is configured to cache data received by the general interface register system;
地址译码模块3配置用于接收协议桥模块1的指令或指令和数据并对指令或指令和数据中的指令地址进行译码,并将译码后的指令或指令和数据发送到寄存器模块中对应类型的寄存器模块11;以及The address decoding module 3 is configured to receive instructions or instructions and data from the protocol bridge module 1 and decode the instruction addresses in the instructions or instructions and data, and send the decoded instructions or instructions and data to the register module. Corresponding type of register module 11; and
将译码后的指令或指令和数据发送到存储器中。Send decoded instructions or instructions and data to memory.
在本申请一些实施例中,如图3所示,图3示出了地址译码模块3的内部结构图,即地址译码模块3包括地址译码逻辑12,地址译码逻辑12的功能是将协议桥模块1解析后的片选信号、字节使能信号、读/写使能信号、地址、和/或写数据进行解析,然后根据解析结果将对应的上述指令或上述指令和数据发送到通用寄存器模块4、自定义寄存器模块5或存储器接口6。也就说地址译码模块3的功能在于将协议桥模块输出的地址进行译码,确定CPU要访问的是通用寄存器模块4中的寄存器、自定义寄存器模块5中的寄存器和Memory(指存储器接口6直接要访问的存储器,在寄存器系统中需要由存储器接口6进行访问)中的哪一个;如果是写操作的话,之后将对应的片选信号、写使能信号、访问地址、写数据和字节使能信号输出给对应的模块;如果是读操作的话,之后将对应的片选信号、读使能、访问地址输出给对应的模块,进而得到相应的读数据。In some embodiments of the present application, as shown in Figure 3, Figure 3 shows the internal structure diagram of the address decoding module 3, that is, the address decoding module 3 includes address decoding logic 12, and the function of the address decoding logic 12 is Analyze the chip select signal, byte enable signal, read/write enable signal, address, and/or write data parsed by the protocol bridge module 1, and then send the corresponding above-mentioned instructions or the above-mentioned instructions and data according to the analysis results. to general register module 4, custom register module 5, or memory interface 6. That is to say, the function of the address decoding module 3 is to decode the address output by the protocol bridge module and determine that the CPU wants to access the registers in the general register module 4, the registers in the custom register module 5 and Memory (referring to the memory interface). 6 The memory to be accessed directly needs to be accessed by the memory interface 6 in the register system; if it is a write operation, then the corresponding chip select signal, write enable signal, access address, write data and word The enable signal is output to the corresponding module; if it is a read operation, the corresponding chip select signal, read enable, and access address are then output to the corresponding module, and the corresponding read data is obtained.
具体地,如图3所示,地址译码逻辑12通过输入的读写地址进行地址译码得到片选信号(通用寄存器模块4对应的寄存器的片选信号,自定义寄存器模块5的片选信号和Memory片选信号),若通用寄存器模块4的片选信号为1,则将输入的片选信号、字节有效信号、读/写使能信号、地址、读/写数据线输出给通用寄存器模块4相连的片选信号、字节有效信号、读/写使能信号、地址、读/写数据线;若自定义寄存器模块5的片选信号为1, 则将输入的片选信号、字节有效信号、读/写使能信号、地址、读/写数据线输出给自定义寄存器模块5相连的片选信号、字节有效信号、读/写使能信号、地址、读/写数据线;若Memory片选信号为1,则将输入的片选信号、字节有效信号、读/写使能信号、地址、读/写数据线输出给存储器接口6相连的片选信号、字节有效信号、读/写使能信号、地址、读/写数据线。Specifically, as shown in Figure 3, the address decoding logic 12 performs address decoding on the input read and write addresses to obtain the chip select signal (the chip select signal of the register corresponding to the general register module 4, the chip select signal of the custom register module 5 and Memory chip select signal), if the chip select signal of the general register module 4 is 1, the input chip select signal, byte valid signal, read/write enable signal, address, and read/write data line are output to the general register The chip select signal, byte valid signal, read/write enable signal, address, read/write data line connected to module 4; if the chip select signal of custom register module 5 is 1, Then the input chip select signal, byte valid signal, read/write enable signal, address, read/write data line are output to the chip select signal, byte valid signal, read/write enable connected to the custom register module 5 Signal, address, read/write data lines; if the Memory chip select signal is 1, output the input chip select signal, byte valid signal, read/write enable signal, address, read/write data line to the memory interface 6 Connected chip select signal, byte valid signal, read/write enable signal, address, read/write data line.
在本申请的一些实施例中,通用寄存器模块4包括通用寄存器逻辑16,通用寄存器信息文件17,其中:In some embodiments of the present application, the general register module 4 includes a general register logic 16 and a general register information file 17, wherein:
通用寄存器逻辑16配置用于将通用寄存器模块4所接收的指令和/或数据,与通用寄存器信息文件17中的所有寄存器信息文件地址进行比较,选中满足比较的通用寄存器并向通用寄存器写入数据或从通用寄存器读取数据;The general register logic 16 is configured to compare the instructions and/or data received by the general register module 4 with all register information file addresses in the general register information file 17, select the general register that satisfies the comparison and write data to the general register. Or read data from general register;
通用寄存器信息文件17配置用于保存通用寄存器模块的所有通用寄存器的信息与地址以及为通用寄存器模块中所有寄存器提供匹配映射。The general register information file 17 is configured to save the information and addresses of all general registers of the general register module and provide matching mapping for all registers in the general register module.
在本申请一些实施例中,通用寄存器模块4的功能在于设置一些寄存器接口必需的寄存器,比如展示时钟门控中的使能有效信号、使能清除信号、使能状态、中断CPU清除信号、中断CPU设置信号、中断状态以及屏蔽信号等相关的信号;经过地址译码之后如果选中了通用寄存器模块,则通用寄存器模块4会根据片选信号、读写使能和地址写入或者读出寄存器内的值,该通用寄存器模块内部含有一个通用寄存器模块4内的所有相关的寄存器信息的文件,内部包含着寄存器的地址,复位值和寄存器类型等信息,通过将输入的地址和在片选信号、读写使能等控制信号有效的情况下与上边所提到的所有寄存器信息的内部的地址进行比较从而选中对应的寄存器,然后将值写入寄存器或者读出寄存器内的值。In some embodiments of the present application, the function of the general register module 4 is to set some registers necessary for the register interface, such as displaying the enable valid signal, enable clear signal, enable status, interrupt CPU clear signal, and interrupt in clock gating. CPU setting signals, interrupt status, masking signals and other related signals; if the general register module is selected after address decoding, the general register module 4 will write or read the register according to the chip select signal, read and write enable and address The value of When control signals such as read and write enable are valid, compare the internal addresses of all register information mentioned above to select the corresponding register, and then write the value to the register or read the value in the register.
具体地,如图4所示,通用寄存器模块4包括通用寄存器逻辑16和通用寄存器信息文件17,其中通用寄存器逻辑16是接收上述通用寄存器模块4发送的片选信号、字节使能信号、读/写使能信号、地址、和/或写数据,并将上述信号的地址与通用寄存器信息文件17中所有寄存器的地址进行比较,如果比较结果为匹配并选中某个寄存器,则再加上寄存器类型的限制将写入的数据通过寄存器逻辑16写入通用寄存器并最终进行输出,或者将输入的值或寄存器内部的值在地址对比和寄存器类型双重限定之后读出。Specifically, as shown in Figure 4, the general register module 4 includes a general register logic 16 and a general register information file 17, where the general register logic 16 receives the chip select signal, byte enable signal, and read signal sent by the general register module 4. /Write enable signals, addresses, and/or write data, and compare the addresses of the above signals with the addresses of all registers in the general register information file 17. If the comparison result is a match and a register is selected, add the register The restriction of the type is to write the written data into the general register through the register logic 16 and finally output it, or to read the input value or the value inside the register after double qualification of address comparison and register type.
另外,通用寄存器信息文件17包含本申请所提出的通用接口寄存器系统的信息。In addition, the general register information file 17 contains information of the general interface register system proposed in this application.
在本申请的一些实施例中,自定义寄存器模块5包括自定义寄存器逻辑18,自定义寄存器信息文件19,其中:In some embodiments of the present application, the custom register module 5 includes custom register logic 18 and a custom register information file 19, wherein:
自定义寄存器逻辑18配置用于将自定义寄存器模块5所接收的指令和/或数据,与自定 义寄存器信息文件19中的所有寄存器信息文件地址进行比较,选中满足比较的自定义寄存器并向通用寄存器写入数据或从自定义寄存器读取数据;The custom register logic 18 is configured to combine the instructions and/or data received by the custom register module 5 with the custom Compare all register information file addresses in the defined register information file 19, select the custom register that meets the comparison and write data to the general register or read data from the custom register;
自定义寄存器信息文19件配置用于保存通用寄存器模块的所有通用寄存器的信息与地址以及为自定义寄存器模块5中所有自定义寄存器提供匹配映射。The custom register information file is configured to save the information and addresses of all general registers of the general register module and to provide matching mapping for all custom registers in the custom register module 5 .
在本申请一些实施例中,自定义寄存器模块的功能在于设置用户硬件逻辑所需的一些寄存器,比如最常见的用户硬件逻辑的使能信号,经过地址译码后如果选中了自定义寄存器模块5,则会根据片选信号、读写使能和地址将值写入寄存器内或者根据相关信号读出寄存器内的值,该自定义寄存器模块5内部含有一个包含用户定义的寄存器全部信息(地址、寄存器类型、复位值,无效比特等等)的自定义寄存器信息文件19,内部包含着自定义寄存器的地址,复位值和自定义寄存器类型等信息,通过将输入的地址和在片选信号、读写使能等控制信号有效的情况下与包含用户定义的寄存器信息内部的地址进行比较选中对应的寄存器,然后将值写入寄存器或者读出寄存器内的值。In some embodiments of this application, the function of the custom register module is to set some registers required by user hardware logic, such as the most common enable signals of user hardware logic. After address decoding, if the custom register module 5 is selected , the value will be written into the register according to the chip select signal, read and write enable and address, or the value in the register will be read out according to the relevant signal. The custom register module 5 contains a user-defined register containing all the information (address, register type, reset value, invalid bit, etc.), which contains information such as the address of the custom register, reset value, and custom register type. By combining the input address with the chip select signal, read When control signals such as write enable are valid, compare the internal address containing user-defined register information to select the corresponding register, and then write the value to the register or read the value in the register.
具体地,如图5所示,自定义寄存器模块5中的自定义寄存器逻辑18通过输入的地址与脚本生成好的自定义寄存器信息文件19中的地址进行比较选中某个自定义寄存器,再加上寄存器类型的限制将写入的数据通过寄存器逻辑写入寄存器最终进行输出,或者将用户硬件逻辑输入的值或寄存器内部的值在地址对比和寄存器类型限制之后读出。Specifically, as shown in Figure 5, the custom register logic 18 in the custom register module 5 selects a custom register by comparing the input address with the address in the custom register information file 19 generated by the script, and then adds The upper register type limit writes the written data to the register through the register logic and finally outputs it, or the value input by the user hardware logic or the value inside the register is read out after address comparison and register type limit.
在本申请的一些实施例中,缓存模块2还包括:In some embodiments of the present application, the cache module 2 also includes:
RxFIFO模块,RxFIFO模块配置用于接收从协议总线通过协议桥模块发送的数据。RxFIFO module, the RxFIFO module is configured to receive data sent from the protocol bus through the protocol bridge module.
TxFIFO模块,TxFIFO模块配置用于接收从协议总线通过协议桥模块发送的数据。TxFIFO module, the TxFIFO module is configured to receive data sent from the protocol bus through the protocol bridge module.
在本申请一些实施例中,在寄存器模块11中还包括RxFIFO模块和TxFIFO模块。In some embodiments of the present application, the register module 11 also includes an RxFIFO module and a TxFIFO module.
RxFIFO和TxFIFO的功能是在同步FIFO功能的基础上加入了DMA相关功能,也支持Single传输、Burst传输和Packet传输。首先,可以通过配置参数选择是否生成这个模块,其次,可以通过参数的配置选择该模块是一个普通的同步FIFO的功能还是具有DMA功能的同步FIFO,其中FIFO的深度和数据位宽也是可配的;除此之外,该模块中还可以添加其余与FIFO或DMA相关的一些逻辑功能,新增的功能也可以灵活配置为可关闭/开启的。The function of RxFIFO and TxFIFO is to add DMA related functions based on the synchronous FIFO function, and also supports Single transmission, Burst transmission and Packet transmission. First, you can choose whether to generate this module by configuring parameters. Secondly, you can choose whether the module is an ordinary synchronous FIFO function or a synchronous FIFO with DMA function by configuring parameters. The depth and data width of the FIFO are also configurable. ; In addition, some other logical functions related to FIFO or DMA can also be added to this module, and the new functions can also be flexibly configured to be turned off/on.
RxFIFO模块和TxFIFO具备相同的结构,如图6所示,图6示出的是RxFIFO的结构图,RxFIFO中实现有对同步FIFO进行相应控制的DMA功能控制模块,当设置DMA功能时,需要在寄存器模块11外外挂一个DMA模块,DMA模块可以集成在本申请提出的通用接口寄存器系统上,也可以是通用接口寄存器系统外不同的芯片模块(图1中的其他模块)上,DMA控制模块,提供一些流控信息给DMA模块,包括Single,Burst,Packet模式的选择 等。当不设置DMA功能时,TXFIFO和RXFIFO起普通FIFO的作用。The RxFIFO module and TxFIFO have the same structure, as shown in Figure 6. Figure 6 shows the structure diagram of RxFIFO. The RxFIFO implements a DMA function control module that controls the synchronization FIFO accordingly. When setting the DMA function, you need to The register module 11 has an external DMA module. The DMA module can be integrated on the general interface register system proposed in this application, or can be a different chip module (other modules in Figure 1) outside the general interface register system. The DMA control module, Provide some flow control information to the DMA module, including Single, Burst, and Packet mode selections wait. When the DMA function is not set, TXFIFO and RXFIFO function as ordinary FIFOs.
在本申请的一些实施例中,缓存模块2还包括:In some embodiments of the present application, the cache module 2 also includes:
中断模块7,中断模块7配置用于实时监测通用接口寄存器系统中的异常,并将对应的异常写入到通用寄存器模块4中对应的异常寄存器,并基于通用寄存器模块4中的对应异常的使能状态寄存器和异常寄存器的值的逻辑与运算生成对应的中断信号。Interrupt module 7, the interrupt module 7 is configured to monitor exceptions in the general interface register system in real time, and write the corresponding exceptions to the corresponding exception registers in the general register module 4, and based on the use of the corresponding exceptions in the general register module 4 The logical AND operation of the values in the status register and exception register generates the corresponding interrupt signal.
在本申请一些实施例中,如图1所示,中断模块7在寄存器模块11中,如上述实施例中,中断模块7从通用寄存器模块4中的中断信号寄存器中读取对应的寄存器值以及对应的使能状态寄存器值,并进行逻辑与运算,然后根据运算结果向发送中断信号,CPU去处理相应的异常。In some embodiments of the present application, as shown in Figure 1, the interrupt module 7 is in the register module 11. As in the above embodiment, the interrupt module 7 reads the corresponding register value from the interrupt signal register in the general register module 4 and The corresponding enable status register value is performed, and a logical AND operation is performed, and then an interrupt signal is sent to the CPU based on the operation result, and the CPU handles the corresponding exception.
在本申请提供的一种通用接口寄存器系统中,异常设置的数目是可配置的,根据用户的需要配置与异常数目相匹配的异常端口的数目;当然,配置设置中断使能信号的数目与异常设置的数目是一样的,结合中断设置和中断使能进行按位与的逻辑操作之后就可得到使能后的异常状态寄存器(需要在通用寄存器模块中配置),这个寄存器是用来记录相应的异常的,之后将使能后的异常状态寄存器自身再进行按位或的操作得到1比特中断信号输出给CPU,CPU再对异常状态寄存器、使能状态寄存器和使能后的异常状态寄存器进行查询得到产生异常的原因;除此之外,中断模块7中还包含了与TX FIFO和RX FIFO相关固定数目的异常设置,这些异常可以根据参数的配置选择是否生成RX FIFO和TX FIFO来决定是否生成,如果没有生成TX FIFO和RX FIFO模块,那么对应的这两个模块的中断也不会生成。In a general interface register system provided by this application, the number of exception settings is configurable, and the number of exception ports matching the number of exceptions is configured according to the user's needs; of course, the number of interrupt enable signals is configured to match the number of exceptions. The number of settings is the same. After combining the interrupt settings and interrupt enable and performing a bitwise logical operation, the enabled exception status register can be obtained (needs to be configured in the general register module). This register is used to record the corresponding If it is abnormal, then the enabled exception status register itself will perform a bitwise OR operation to obtain a 1-bit interrupt signal and output it to the CPU. The CPU will then query the exception status register, the enable status register and the enabled exception status register. Get the cause of the exception; in addition, the interrupt module 7 also contains a fixed number of exception settings related to TX FIFO and RX FIFO. These exceptions can be generated according to the configuration of the parameters by choosing whether to generate RX FIFO and TX FIFO. , if the TX FIFO and RX FIFO modules are not generated, then the corresponding interrupts of these two modules will not be generated.
如图7所示,图7所展示的是用户在源文件模板中配置了八个比特的异常设置的示意图,同时会产生八个比特的使能状态寄存器,通过将异常状态寄存器和使能状态寄存器按位与之后得到八个比特的使能后的异常状态寄存器,之后再将八个比特的使能后的异常状态寄存器自身按位或得到1比特的中断信号输出给CPU,之后CPU再对这三个状态寄存器进行查询得到产生中断的异常原因;RX FIFO和TX FIFO内部的中断原理与此类似。另外该中断模块中还支持多级中断配置、中断全输出或者中断单比特输出。As shown in Figure 7, Figure 7 shows a schematic diagram in which the user configures eight-bit exception settings in the source file template. At the same time, an eight-bit enable status register will be generated. By combining the exception status register and the enable status After the register is bitwise ANDed, an eight-bit enabled exception status register is obtained, and then the eight-bit enabled exception status register itself is bitwise ORed to obtain a 1-bit interrupt signal output to the CPU, and then the CPU These three status registers are queried to obtain the abnormal cause of the interrupt; the interrupt principle inside the RX FIFO and TX FIFO is similar to this. In addition, the interrupt module also supports multi-level interrupt configuration, full interrupt output or single-bit interrupt output.
具体地,图7中示出的第一列8个空格表示对应异常#0到异常#7的8个异常的异常状态寄存器值,第二列则表示使能后的异常状态寄存器的值,第三列是指使能状态寄存器的值,如前,当通用接口寄存器系统出现对应的异常时,第一列的对应的异常状态寄存器会被赋值,例如异常#0产生,则第一列的第一个异常状态寄存器会被赋值为1;第三列的使能状态寄存器的值由CPU指定,即如果选择忽视异常#0,则CPU会在初始化时将此位设置成0,中断模块7在检测到异常#0后,会将异常状态寄存器的值1和使能状态寄存器的值进行逻 辑与运算,假如CPU没有选择忽视该异常#0,则对应的使能状态寄存器的值为1,则1和1相与结果为1,则使能后的异常状态寄存器则为1,中断模块7则向CPU发送中断信号。Specifically, the 8 spaces in the first column shown in Figure 7 represent the exception status register values of the 8 exceptions corresponding to exception #0 to exception #7, and the second column represents the value of the exception status register after being enabled. The three columns refer to the value of the enable status register. As before, when a corresponding exception occurs in the general interface register system, the corresponding exception status register in the first column will be assigned a value. For example, when exception #0 occurs, the first An exception status register will be assigned a value of 1; the value of the enable status register in the third column is specified by the CPU, that is, if you choose to ignore exception #0, the CPU will set this bit to 0 during initialization, and interrupt module 7 will detect After exception #0 is reached, the value 1 of the exception status register and the value of the enable status register will be logically AND operation, if the CPU does not choose to ignore the exception #0, the value of the corresponding enable status register is 1, then the AND result of 1 and 1 is 1, then the enabled exception status register is 1, and the interrupt module 7 sends an interrupt signal to the CPU.
需要说明的是,中断模块7可根据需要进行灵活配置,图7示出的只是8个异常状况的中断,根据功能需要基于上述机制可以灵活配置更多或更深的中断异常个数。It should be noted that the interrupt module 7 can be flexibly configured as needed. Figure 7 shows only 8 interrupts for abnormal conditions. According to functional needs, more or deeper interrupt exceptions can be flexibly configured based on the above mechanism.
在本申请的一些实施例中,缓存模块2还包括时钟复位模块10,时钟复位模块10包括时钟门控模块20,异步复位同步释放模块21,其中:In some embodiments of the present application, the cache module 2 also includes a clock reset module 10. The clock reset module 10 includes a clock gating module 20 and an asynchronous reset and synchronous release module 21, wherein:
时钟门控模块20配置用于对通用寄存器模块中的一个或多个通用寄存器的时钟进行控制;The clock gating module 20 is configured to control the clock of one or more general registers in the general register module;
异步复位同步释放模块21配置用于使通用接口寄存器系统与协议总线异步复位后同步释放。The asynchronous reset synchronous release module 21 is configured to release the general interface register system and the protocol bus synchronously after asynchronous reset.
如图8所示,时钟模块20用来对通用寄存器模块4中的寄存器进行时钟门控功能(时钟门控(Clock-Gating)一直以来都是降低微处理器功耗的重要手段,主要针对寄存器翻转带来的动态功耗,如何更加有效地设计时钟门控对于最大限度地降低功耗,同时保证处理器的性能至关重要),异步复位同步释放模块21异步复位同步释放的功能模块,通过参数的配置选择是否产生上述时钟门控模块20和异步复位同步释放模块21。如果选择生成该模块并且是全功能的话,图1中的自定义寄存器模块是来自于时钟门控模块20门控后的时钟,其他模块的时钟可以来自于时钟模块20门控后的时钟也可以是顶层送进来的时钟;As shown in Figure 8, the clock module 20 is used to perform a clock gating function (Clock-Gating) on the registers in the general register module 4. It has always been an important means to reduce the power consumption of microprocessors, mainly for registers. Dynamic power consumption caused by flipping, how to design clock gating more effectively is crucial to minimize power consumption while ensuring processor performance), the asynchronous reset synchronous release module 21 is a functional module for asynchronous reset synchronous release, through The configuration of parameters selects whether to generate the above-mentioned clock gating module 20 and asynchronous reset synchronous release module 21. If you choose to generate this module and it is fully functional, the custom register module in Figure 1 comes from the clock gated by the clock gating module 20. The clocks of other modules can also come from the clock gated by the clock module 20. It’s the clock sent in from the top;
此外,复位信号是经过异步复位同步释放之后的;如果单独生成时钟门控功能的话,自定义寄存器模块是来自于门控之后的时钟,其他模块的时钟可以来自于门控后的时钟也可以是顶层送进来的时钟;复位信号是从顶层直穿下来的;如果单独生成异步复位同步释放的话,自定义寄存器和其他模块中的时钟是从顶层直穿下来的,复位信号是经过异步复位同步释放的。In addition, the reset signal is released synchronously after an asynchronous reset; if the clock gating function is generated separately, the custom register module comes from the clock after gating, and the clocks of other modules can come from the clock after gating or can be The clock sent in from the top layer; the reset signal is passed directly from the top layer; if the asynchronous reset is generated separately and released synchronously, the clocks in the custom registers and other modules are passed directly from the top layer, and the reset signal is released synchronously through the asynchronous reset. of.
在本申请的一些实施例中,协议桥模块1包括通用协议读写状态机,异步读FIFO,异步指令FIFO,异步写FIFO,缓存模块访问状态机23,其中:In some embodiments of the present application, the protocol bridge module 1 includes a general protocol read and write state machine, an asynchronous read FIFO, an asynchronous instruction FIFO, an asynchronous write FIFO, and a cache module access state machine 23, where:
通用协议读写状态机配置用于解析协议桥模块接收到的协议总线上的指令或指令和数据,将指令发送到异步指令FIFO,以及将数据发送到异步写FIFO或从异步读FIFO读取数据封装成协议总线上的传输数据发送到协议总线上;The general protocol read and write state machine is configured to parse the instructions or instructions and data on the protocol bus received by the protocol bridge module, send the instructions to the asynchronous instruction FIFO, and send the data to the asynchronous write FIFO or read the data from the asynchronous read FIFO Encapsulate the transmission data on the protocol bus and send it to the protocol bus;
缓存模块访问状态机23配置用于从异步指令FIFO中读取指令或从异步指令FIFO和从异步写FIFO中读取指令和数据,并将指令或指令和数据发送到缓存模块2,以及从缓存模块2获取数据发送到异步读FIFO中。 The cache module access state machine 23 is configured to read instructions from the asynchronous instruction FIFO or read instructions and data from the asynchronous instruction FIFO and from the asynchronous write FIFO, and send instructions or instructions and data to the cache module 2, and from the cache Module 2 obtains data and sends it to the asynchronous read FIFO.
在本申请一些实施例中,协议桥模块1主要有两个功能:协议转化和跨时钟域处理。协议转化是将通用协议接口转化为存储SRAM(Static Random-Access Memory,SRAM,静态随机存储器)接口(即通用接口寄存器系统所连接总线的总线协议和通用接口寄存器系统内部的逻辑电路的数据传输接口的内部协议)。协议桥模块1作为总线协议的从机一端,根据统一化的标准协议接收CPU发送的地址,片选信号,字节使能信号,读写数据等信息,再将这些信息内容转化为存储SRAM的协议接口(通用接口寄存器系统内部的逻辑电路的数据传输接口的内部协议接口),方便后面进行地址译码和将数据存入对应的存储地址段中。如图2所示,以异步时钟域为例,在时钟域1和时钟域2的时钟不同的前提下,通过通用协议读写状态机22解析通用协议接口(总线接口)接收到的读写命令,片选信息和读写数据。将写数据放入异步的写FIFO 25中,读写命令,片选信息和地址信息写入指令FIFO中,根据读FIFO 24的空满状态从异步读FIFO 24中读取读数据。最后缓存访问状态机23根据SRAM接口要求和自己的时钟域,从三个FIFO中提取信息。最终完成了从通用协议接口到存储SRAM接口的转化。In some embodiments of this application, the protocol bridge module 1 mainly has two functions: protocol conversion and cross-clock domain processing. Protocol conversion is to convert the general protocol interface into a storage SRAM (Static Random-Access Memory, SRAM, Static Random Memory) interface (that is, the bus protocol of the bus connected to the general interface register system and the data transmission interface of the logic circuit inside the general interface register system internal agreement). As the slave end of the bus protocol, the protocol bridge module 1 receives the address, chip select signal, byte enable signal, read and write data and other information sent by the CPU according to the unified standard protocol, and then converts these information contents into SRAM storage The protocol interface (the internal protocol interface of the data transmission interface of the logic circuit within the general interface register system) facilitates subsequent address decoding and storing data in the corresponding storage address segment. As shown in Figure 2, taking the asynchronous clock domain as an example, under the premise that the clocks of clock domain 1 and clock domain 2 are different, the read and write commands received by the general protocol interface (bus interface) are parsed through the general protocol read and write state machine 22 , chip select information and read and write data. Put the write data into the asynchronous write FIFO 25, write the read and write commands, chip select information and address information into the instruction FIFO, and read the read data from the asynchronous read FIFO 24 according to the empty and full status of the read FIFO 24. Finally, the cache access state machine 23 extracts information from the three FIFOs according to the SRAM interface requirements and its own clock domain. Finally, the transformation from a general protocol interface to a storage SRAM interface was completed.
本申请提出的通用接口寄存器系统支持同步处理,也支持异步跨时钟域处理。同步是指通用协议一端和其他模块即用户定义的功能模块在相同的时钟域中,即图中的时钟域1和时钟域2是同一个时钟域。此时,协议桥为同步桥,所用的三个FIFO为同步FIFO。异步处理是指通用协议一端和其他模块在不同的时钟域中(时钟域1和时钟域2的时钟频率不同),此时协议桥为异步桥,所用的三个FIFO为异步FIFO。异步桥可兼容同步电路。The general interface register system proposed in this application supports synchronous processing and also supports asynchronous cross-clock domain processing. Synchronization means that one end of the general protocol and other modules, that is, user-defined functional modules, are in the same clock domain. That is, clock domain 1 and clock domain 2 in the figure are the same clock domain. At this time, the protocol bridge is a synchronous bridge, and the three FIFOs used are synchronous FIFOs. Asynchronous processing means that one end of the general protocol and other modules are in different clock domains (the clock frequencies of clock domain 1 and clock domain 2 are different). At this time, the protocol bridge is an asynchronous bridge, and the three FIFOs used are asynchronous FIFOs. Asynchronous bridges are compatible with synchronous circuits.
在本申请一些实施例中,协议桥模块具体可以被划分为通用协议读写状态机22,异步读FIFO 24,异步指令FIFO 25,异步写FIFO 26,缓存模块访问状态机23。如图2所示,通用协议读写状态机位于总线协议的时域内,异步读FIFO 24,异步指令FIFO 25,异步写FIFO 26处于总线协议的时域和通用接口寄存器系统的时域之间,缓存访问状态机23位于用接口寄存器系统的时域。在一些情况下由于总线协议规定的时钟和用接口寄存器系统的时钟频率不同,因此,图2中时钟域1和时钟域2在很多情况下并不相同。In some embodiments of this application, the protocol bridge module can be specifically divided into a general protocol read and write state machine 22, an asynchronous read FIFO 24, an asynchronous instruction FIFO 25, an asynchronous write FIFO 26, and a cache module access state machine 23. As shown in Figure 2, the general protocol read and write state machine is located in the time domain of the bus protocol. The asynchronous read FIFO 24, the asynchronous instruction FIFO 25, and the asynchronous write FIFO 26 are between the time domain of the bus protocol and the time domain of the general interface register system. The cache access state machine 23 is located in the time domain using the interface register system. In some cases, because the clock specified by the bus protocol and the clock frequency of the interface register system are different, clock domain 1 and clock domain 2 in Figure 2 are not the same in many cases.
故而,本申请采用异步的FIFO作为连接通用协议读写状态机和缓存访问状态机之间的数据连接结构,以满足本申请所提出的用接口寄存器系统的通用性。Therefore, this application uses asynchronous FIFO as the data connection structure between the universal protocol read-write state machine and the cache access state machine to meet the versatility of the interface register system proposed in this application.
本申请的另一方面还提出一种上述实施方式中的通用接口寄存器系统的快速生成方法,如图9所示,该方法包括:Another aspect of this application also proposes a method for quickly generating the universal interface register system in the above embodiment, as shown in Figure 9. The method includes:
步骤S1、根据对应接口的需求配置功能模块以及寄存器参数;Step S1: Configure functional modules and register parameters according to the requirements of the corresponding interface;
步骤S2、将通用接口寄存器系统的硬件电路设计成模板设计文件; Step S2: Design the hardware circuit of the general interface register system into a template design file;
步骤S3、根据功能模块和寄存器参数以及配置文件中关于上述通用接口寄存器系统中各个模块的配置参数激活模板设计文件中对应的模块并生成最终设计文件。Step S3: Activate the corresponding modules in the template design file and generate the final design file according to the functional module and register parameters and the configuration parameters of each module in the general interface register system in the configuration file.
在本申请的一些实施方式中,根据对应接口的需求配置功能模块以及寄存器参数包括:In some implementations of this application, configuring functional modules and register parameters according to the requirements of the corresponding interface includes:
根据需求配置中接口所连接的总线协议选择对应的通用协议读写状态机逻辑;Select the corresponding general protocol to read and write state machine logic according to the bus protocol connected to the interface in the required configuration;
根据寄存器参数配置通用寄存器模块和自定义寄存器模块中的寄存器的类型及寄存器个数。Configure the type and number of registers in the general register module and custom register module according to the register parameters.
在本申请一些实施例中,本申请提出了如前的通用接口寄存器系统,并将上述系统设计成RTL语言的设计模板,并对上述系统中每一个模块进行标记,同时根据标记设定对应的配置参数,如果需要对应的模块,则将该模块的对应的标记的参数设置为True或Yes。In some embodiments of this application, this application proposes the general interface register system as before, and designs the above system into a design template of RTL language, and marks each module in the above system, and sets the corresponding according to the mark. Configure parameters. If a corresponding module is required, set the parameter of the corresponding tag of the module to True or Yes.
此外,对于通用寄存器模块和自定义寄存器模块,根据上述系统在SOC芯片中的面积确定寄存器模块和自定义寄存器模块的规格,在根据对应需求的规格进行裁剪,例如不需要某些通用寄存器可以直接将对应的寄存器标记位置设置为No,不需要中断模块则可以将对应的配置参数设定为No。In addition, for general register modules and custom register modules, the specifications of the register module and custom register module are determined according to the area of the above system in the SOC chip, and then tailored according to the specifications of the corresponding needs. For example, if certain general registers are not required, they can be directly Set the corresponding register mark position to No. If you do not need the interrupt module, you can set the corresponding configuration parameter to No.
需要说明的是上述系统中,任何模块的有无均可通过配置文件进行配置,寄存器模块中通用寄存器模块和自定义寄存器模块中的寄存器个数及规格需要在配置文件中指定。TxFIFO、RXFIFO、异步FIFO的深度与位宽可根据接口的实际需求指定。It should be noted that in the above system, the presence or absence of any module can be configured through the configuration file. The number and specifications of the registers in the general register module and custom register module in the register module need to be specified in the configuration file. The depth and bit width of TxFIFO, RXFIFO, and asynchronous FIFO can be specified according to the actual needs of the interface.
在本申请的一些实施例中,通过在表格(配置文件)内填写参数来定义寄存器类型及其域,(由于内部的集成已经完成,因此将用户自己的实现的模块与工具生成的寄存器模块进行集成)然后通过调用脚本将表格内的参数抽出来填写进对应的硬件逻辑模板和寄存器列表模板中,在此过程中,脚本会同时检查表格内的参数定义正确与否,如果出现错误就不能正确生成寄存器列表及其相应的寄存器逻辑并且同时会报错,待用户将表格内的错误修改之后,才能通过脚本将表格内的参数抽出来填写进寄存器逻辑模板和寄存器列表模板中,才能得到正确的寄存器接口逻辑和寄存器列表。In some embodiments of this application, the register type and its domain are defined by filling in parameters in the form (configuration file). (Since the internal integration has been completed, the user's own implemented module is combined with the tool-generated register module. Integration) and then call the script to extract the parameters in the table and fill them into the corresponding hardware logic template and register list template. During this process, the script will also check whether the parameters in the table are correctly defined. If an error occurs, it will not be correct. A register list and its corresponding register logic are generated and an error is reported at the same time. After the user corrects the errors in the form, the parameters in the form can be extracted through a script and filled in the register logic template and register list template to obtain the correct register. Interface logic and register list.
其次,内部还可以集成一些通用的模块,这样既增加了模块的可复用性,又避免了写出来的代码逻辑错误的问题,通过配置相应的参数选择是否生成通用模块中的某些。Secondly, some common modules can be integrated internally, which not only increases the reusability of the modules, but also avoids the problem of logical errors in the written code. You can choose whether to generate some of the common modules by configuring the corresponding parameters.
通过本申请提出的一种通用接口寄存器系统,通过协议桥对接多种总线协议并解析总线上的数据,并通过缓存模块中各个模块缓存从总线上解析的数据,实现ASIC芯片或SOC芯片内部逻辑与总线的通用接口。同时将上述系统集成成通用模板,并对通用接口寄存器系统中各个模块进行标记,根据配置文件中对应的标记的参数裁剪通用模板并生成对应的寄存器接口电路设计文件。可在SOC芯片中快速实现各个模块之间的接口电路的设计,只需将SOC 芯片中不同模块所连接的总线类型以及所功能需求中所需要的各种寄存器的类型及个数写入配置文件,便可基于通用模板生成。Through a general interface register system proposed in this application, multiple bus protocols are connected through a protocol bridge and the data on the bus is parsed, and the data parsed from the bus is cached through each module in the cache module to realize the internal logic of the ASIC chip or SOC chip. Universal interface to the bus. At the same time, the above system is integrated into a universal template, and each module in the universal interface register system is marked. The universal template is cut according to the corresponding marked parameters in the configuration file and the corresponding register interface circuit design file is generated. The design of the interface circuit between each module can be quickly realized in the SOC chip, just add the SOC The bus types connected to different modules in the chip and the types and numbers of various registers required for functional requirements are written into the configuration file and can be generated based on the general template.
以上是本申请公开的示例性实施例,但是应当注意,在不背离权利要求限定的本申请一些实施例中公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本申请一些实施例中公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。The above are exemplary embodiments disclosed in the present application, but it should be noted that various changes and modifications can be made without departing from the scope disclosed in some embodiments of the present application as defined by the claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements disclosed in some embodiments of the present application may be described or claimed individually, they may also be understood as plural unless expressly limited to the singular.
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。It will be understood that, as used herein, the singular form "a" and "an" are intended to include the plural form as well, unless the context clearly supports an exception. It will also be understood that as used herein, "and/or" is meant to include any and all possible combinations of one or more of the associated listed items.
上述本申请一些实施例中公开实施例序号仅仅为了描述,不代表实施例的优劣。The embodiment numbers disclosed in some embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage medium can be read-only memory, magnetic disk or optical disk, etc.
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本申请一些实施例中公开的范围(包括权利要求)被限于这些例子;在本申请一些实施例中的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本申请一些实施例中的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本申请一些实施例中的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本申请一些实施例中的保护范围之内。 Those of ordinary skill in the art should understand that the above discussion of any embodiments is only illustrative and is not intended to imply that the scope (including the claims) disclosed in some embodiments of the present application is limited to these examples; in some embodiments of the present application, Under the idea, the above embodiments or technical features in different embodiments can also be combined, and there are many other changes in different aspects of some embodiments of the present application as mentioned above. For the sake of simplicity, they are not provided in details. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of some embodiments of this application shall be included in the protection scope of some embodiments of this application.
Claims (20)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210246442.9A CN114356419B (en) | 2022-03-14 | 2022-03-14 | A general interface register system and rapid generation method |
CN202210246442.9 | 2022-03-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023174086A1 true WO2023174086A1 (en) | 2023-09-21 |
Family
ID=81094986
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/079789 WO2023174086A1 (en) | 2022-03-14 | 2023-03-06 | Universal interface register system and rapid generation method |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114356419B (en) |
WO (1) | WO2023174086A1 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117118828A (en) * | 2023-10-23 | 2023-11-24 | 上海芯联芯智能科技有限公司 | Protocol converter, electronic equipment and configuration method |
CN117435534A (en) * | 2023-11-01 | 2024-01-23 | 上海合芯数字科技有限公司 | Data transmission circuit, method and processor based on peripheral bus |
CN117435251A (en) * | 2023-11-27 | 2024-01-23 | 浙江大学 | Post quantum cryptography algorithm processor and system on chip thereof |
CN118504477A (en) * | 2024-05-29 | 2024-08-16 | 芯耀辉科技有限公司 | Interface signal control method and system based on register |
CN118838644A (en) * | 2024-07-31 | 2024-10-25 | 格兰菲智能科技股份有限公司 | Configuration register set circuit capable of writing operation at random bit |
CN119025386A (en) * | 2024-10-28 | 2024-11-26 | 沐曦集成电路(上海)有限公司 | A universal chip acquisition system |
CN119149471A (en) * | 2024-11-12 | 2024-12-17 | 南京典格通信科技有限公司 | Method and system for accessing register by half-duplex inter-chip SPI |
CN119761279A (en) * | 2025-03-05 | 2025-04-04 | 上海芯联芯智能科技有限公司 | Chip and electronic equipment |
CN119851704A (en) * | 2024-12-13 | 2025-04-18 | 广芯微电子(广州)股份有限公司 | EFlash control system and method based on instruction pre-reading |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114356419B (en) * | 2022-03-14 | 2022-06-07 | 苏州浪潮智能科技有限公司 | A general interface register system and rapid generation method |
CN115114876B (en) * | 2022-07-20 | 2025-07-04 | 山东云海国创云计算装备产业创新中心有限公司 | A method, system, device and storage medium for accessing internal bus |
CN115587058B (en) * | 2022-12-05 | 2023-05-26 | 苏州浪潮智能科技有限公司 | Data processing system, method, equipment and medium |
CN116795454B (en) * | 2023-08-28 | 2023-11-03 | 芯耀辉科技有限公司 | Chip configuration method, device and medium |
CN120415479B (en) * | 2025-07-04 | 2025-09-09 | 深圳飞骧科技股份有限公司 | Radio frequency front end module |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6373848B1 (en) * | 1998-07-28 | 2002-04-16 | International Business Machines Corporation | Architecture for a multi-port adapter with a single media access control (MAC) |
US20040261050A1 (en) * | 2003-06-19 | 2004-12-23 | Lsi Logic Corporation | Designing and testing the interconnection of addressable devices of integrated circuits |
CN102592023A (en) * | 2012-01-06 | 2012-07-18 | 广东新岸线计算机系统芯片有限公司 | Register designing method and register designing device in integrated circuit designing process |
CN104731746A (en) * | 2013-12-20 | 2015-06-24 | 上海华虹集成电路有限责任公司 | Equipment controller device |
CN106257434A (en) * | 2015-06-16 | 2016-12-28 | 深圳市中兴微电子技术有限公司 | A kind of data transmission method based on enhancement mode peripheral interconnection protocol bus and device |
CN106407522A (en) * | 2016-08-31 | 2017-02-15 | 德为显示科技股份有限公司 | FPGA-based logic IP bus interconnection realization device |
US20200387659A1 (en) * | 2019-06-05 | 2020-12-10 | SiFive, Inc. | Point-to-point module connection interface for integrated circuit generation |
CN112559410A (en) * | 2020-12-21 | 2021-03-26 | 苏州长风航空电子有限公司 | FPGA-based LIO bus extension UART peripheral system and method |
CN114356419A (en) * | 2022-03-14 | 2022-04-15 | 苏州浪潮智能科技有限公司 | A general interface register system and rapid generation method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103488600B (en) * | 2013-10-08 | 2016-08-17 | 江苏物联网研究发展中心 | General from machine synchronous serial interface circuit |
DE102020205765A1 (en) * | 2020-05-07 | 2021-11-11 | Robert Bosch Gesellschaft mit beschränkter Haftung | System component and use of a system component |
CN112035389B (en) * | 2020-08-28 | 2022-08-23 | 西安微电子技术研究所 | PLB-AXI bus conversion bridge and working method thereof |
-
2022
- 2022-03-14 CN CN202210246442.9A patent/CN114356419B/en active Active
-
2023
- 2023-03-06 WO PCT/CN2023/079789 patent/WO2023174086A1/en active Application Filing
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6373848B1 (en) * | 1998-07-28 | 2002-04-16 | International Business Machines Corporation | Architecture for a multi-port adapter with a single media access control (MAC) |
US20040261050A1 (en) * | 2003-06-19 | 2004-12-23 | Lsi Logic Corporation | Designing and testing the interconnection of addressable devices of integrated circuits |
CN102592023A (en) * | 2012-01-06 | 2012-07-18 | 广东新岸线计算机系统芯片有限公司 | Register designing method and register designing device in integrated circuit designing process |
CN104731746A (en) * | 2013-12-20 | 2015-06-24 | 上海华虹集成电路有限责任公司 | Equipment controller device |
CN106257434A (en) * | 2015-06-16 | 2016-12-28 | 深圳市中兴微电子技术有限公司 | A kind of data transmission method based on enhancement mode peripheral interconnection protocol bus and device |
CN106407522A (en) * | 2016-08-31 | 2017-02-15 | 德为显示科技股份有限公司 | FPGA-based logic IP bus interconnection realization device |
US20200387659A1 (en) * | 2019-06-05 | 2020-12-10 | SiFive, Inc. | Point-to-point module connection interface for integrated circuit generation |
CN112559410A (en) * | 2020-12-21 | 2021-03-26 | 苏州长风航空电子有限公司 | FPGA-based LIO bus extension UART peripheral system and method |
CN114356419A (en) * | 2022-03-14 | 2022-04-15 | 苏州浪潮智能科技有限公司 | A general interface register system and rapid generation method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117118828A (en) * | 2023-10-23 | 2023-11-24 | 上海芯联芯智能科技有限公司 | Protocol converter, electronic equipment and configuration method |
CN117118828B (en) * | 2023-10-23 | 2024-01-23 | 上海芯联芯智能科技有限公司 | Protocol converter, electronic equipment and configuration method |
CN117435534A (en) * | 2023-11-01 | 2024-01-23 | 上海合芯数字科技有限公司 | Data transmission circuit, method and processor based on peripheral bus |
CN117435251A (en) * | 2023-11-27 | 2024-01-23 | 浙江大学 | Post quantum cryptography algorithm processor and system on chip thereof |
CN118504477A (en) * | 2024-05-29 | 2024-08-16 | 芯耀辉科技有限公司 | Interface signal control method and system based on register |
CN118838644A (en) * | 2024-07-31 | 2024-10-25 | 格兰菲智能科技股份有限公司 | Configuration register set circuit capable of writing operation at random bit |
CN119025386A (en) * | 2024-10-28 | 2024-11-26 | 沐曦集成电路(上海)有限公司 | A universal chip acquisition system |
CN119149471A (en) * | 2024-11-12 | 2024-12-17 | 南京典格通信科技有限公司 | Method and system for accessing register by half-duplex inter-chip SPI |
CN119851704A (en) * | 2024-12-13 | 2025-04-18 | 广芯微电子(广州)股份有限公司 | EFlash control system and method based on instruction pre-reading |
CN119761279A (en) * | 2025-03-05 | 2025-04-04 | 上海芯联芯智能科技有限公司 | Chip and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114356419A (en) | 2022-04-15 |
CN114356419B (en) | 2022-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023174086A1 (en) | Universal interface register system and rapid generation method | |
CN105550119B (en) | A kind of simulator based on JTAG protocol | |
CN108268414B (en) | SD card driver and its control method based on SPI mode | |
CN111651384B (en) | Register reading and writing method, chip, subsystem, register set and terminal | |
CN111143264B (en) | APB bridge for realizing synchronous mode, APB bridge for realizing asynchronous mode and control method thereof | |
CN101770817A (en) | Multi-interface memory verification system based on FPGA | |
WO2021169474A1 (en) | Method for converting avalon bus into axi4 bus | |
US8339869B2 (en) | Semiconductor device and data processor | |
WO2025139858A1 (en) | Multi-source heterogeneous distributed system, memory access method, and storage medium | |
CN204537702U (en) | Low power consumption memories interface circuit | |
CN106933760A (en) | A kind of dma controller and data uploading method based on AXI protocol | |
CN105205025A (en) | Chip interconnection method, chips and device | |
CN201583943U (en) | IP structure of high-performance low-power consumption DMA of audio SOC chip | |
CN117033279A (en) | Time sequence input and output control method | |
CN115599719A (en) | An FPGA-based FIFO interface multi-channel DMA controller | |
CN101286181B (en) | On site programmable gate array on-chip programmable system based on DW8051 core | |
CN118709190A (en) | A TPM chip interface controller and TPM chip | |
CN114968870B (en) | Navigation information processor and method thereof | |
CN218068843U (en) | Bridging circuit structure for converting AXI master port into APB slave port and SOC system | |
CN107870885A (en) | Communication system, device and method | |
CN104317688B (en) | A kind of battery status detection method | |
CN110708252B (en) | A SpaceWire router device with high data bandwidth | |
CN103365804B (en) | A kind of read-write control device for chip BU-65170 | |
CN114721987A (en) | A multi-channel interface circuit based on MCU and FPGA SoC architecture | |
CN208077160U (en) | SD card driver based on SPI mode |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23769592 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 23769592 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 07.03.2025) |