FPGA (Field Programmable Gate Array) and RAM (Random Access Memory) operation method, system, equipment and medium

By introducing a serial interface and RAM control center into the FPGA to parse and execute target instructions, the problem of the FPGA's inability to flexibly operate the RAM is solved, and flexible control of the internal RAM of the FPGA is achieved, improving functionality and operational flexibility.

CN118708535APending Publication Date: 2024-09-27SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410939310.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

FPGA can only specify the initialization file when synthesizing the RAM. After downloading, the RAM cannot be flexibly operated, resulting in limited functions.

Method used

Design an FPGA that includes a serial interface and a RAM control center. It receives target instructions through the serial interface, parses and executes operations on the target RAM, and realizes flexible control of the internal RAM of the FPGA.

Benefits of technology

The operational flexibility of the RAM in the FPGA is improved, allowing the external control terminal to initialize, read and write the RAM according to needs, thereby enhancing the functionality and flexibility of the FPGA.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708535A
    Figure CN118708535A
Patent Text Reader

Abstract

The invention discloses an FPGA (Field Programmable Gate Array) and RAM (Random Access Memory) operation method, system, equipment and medium, and relates to the technical field of chips, the FPGA comprises a serial interface which is used for being connected with a control end outside the FPGA and receiving a target instruction transmitted by the control end, and the target instruction is used for operating a target RAM; the RAM control center is connected with the serial interface and is used for determining a target RAM in each RAM of the FPGA and operating the target RAM according to the target instruction; and each RAM is connected with the RAM control center. In the application, the control end outside the FPGA can send the target instruction to the RAM control center through the serial interface, so that the RAM control center can operate the target RAM according to the target instruction, the RAM in the FPGA is operated according to the requirement of the control end, and the flexibility of operating the RAM in the FPGA is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip technology, and more specifically, to an FPGA and RAM operation method, system, device, and medium. Background Art

[0002] Currently, RAM (Random Access Memory) can be set in FPGA (Field-Programmable Gate Array) to cooperate with FPGA to perform corresponding functions. For example, RAM can cooperate with FPGA to verify the chip.

[0003] However, FPGA can only specify the initialization file during RAM synthesis. After the RAM is downloaded to the FPGA, the RAM cannot be operated, resulting in limited FPGA functions.

[0004] In summary, how to flexibly operate the RAM inside the FPGA is a problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] The purpose of this application is to provide an FPGA, which can solve the technical problem of how to flexibly operate the RAM inside the FPGA to a certain extent. This application also provides a RAM operation method, system, electronic device and computer readable storage medium.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] An FPGA, comprising:

[0008] A serial interface, used to connect to a control terminal outside the FPGA and receive a target instruction transmitted by the control terminal, wherein the target instruction is used to operate a target RAM;

[0009] A RAM control center connected to the serial interface, used to determine the target RAM among the various RAMs of the FPGA, and operate the target RAM according to the target instruction;

[0010] Each RAM is connected to the RAM control center.

[0011] In an exemplary embodiment, the RAM control center includes:

[0012] A frame data parsing module connected to the serial interface, used for receiving the target instruction, parsing the target instruction, and obtaining a register instruction and / or a write data frame;

[0013] A register reading and writing module connected to the frame data parsing module, used for writing the register instruction into a register group;

[0014] The register group connected to the register read / write module is used to determine the target RAM according to the register instruction, and operate the target RAM according to the register instruction through the bus control module connected to the target RAM;

[0015] A data transmission control interface connected to the register group, used for transmitting data;

[0016] Each bus control module connected to the data transmission control interface is used to connect to the corresponding RAM interface;

[0017] A write RAM data cache connected to the frame data parsing module, used for caching the write data frame;

[0018] Wherein, the write RAM data cache is connected to the data transmission control interface.

[0019] In an exemplary embodiment, the RAM control center further includes:

[0020] A read RAM data cache connected to the data transfer control interface, used to cache data read from the RAM;

[0021] A frame data synthesis module connected to the register group, the read RAM data cache and the serial interface respectively, is used to obtain register data from the register group, obtain read data from the read RAM data cache, frame the register data and the read data to obtain response data, and transmit the response data to the control end through the serial interface.

[0022] In an exemplary embodiment, the register set includes:

[0023] A status register, used to record the status information of the bus control module and the status information of the RAM interface;

[0024] The control register is used to manage the bus control module and control the read and write operations of the RAM interface.

[0025] In an exemplary embodiment, the RAM control center further includes:

[0026] The address space conversion module connected between the control register and the data transmission control interface is used for converting between the user-defined address space and the RAM interface address space.

[0027] In an exemplary embodiment, the bus control module is connected to the RAM original design access bus, and the bus control module is used to bypass the RAM original design access bus, or connect the RAM original design access bus to the corresponding RAM interface;

[0028] The RAM is originally designed to access the bus and is used by the FPGA to operate the RAM.

[0029] A RAM operation method, applied to any of the above RAM control centers, comprising:

[0030] Obtaining a target instruction, wherein the target instruction is used by a control terminal outside the FPGA to operate a target RAM;

[0031] Determining the target RAM among the RAMs of the FPGA;

[0032] The target RAM is operated according to the target instruction.

[0033] A RAM operating system, applied to any of the above-mentioned RAM control centers, comprising:

[0034] A first acquisition module, used for acquiring a target instruction, wherein the target instruction is used for a control terminal outside the FPGA to operate a target RAM;

[0035] A first determination module, configured to determine the target RAM among the RAMs of the FPGA;

[0036] The first processing module is used to operate the target RAM according to the target instruction.

[0037] An electronic device, comprising:

[0038] Memory for storing computer programs;

[0039] A processor is used to implement the steps of the RAM operation method described above when executing the computer program.

[0040] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the RAM operation method described above are implemented.

[0041] The present application provides an FPGA, including a serial interface for connecting to a control terminal outside the FPGA, receiving a target instruction transmitted by the control terminal, the target instruction being used to operate a target RAM; a RAM control center connected to the serial interface, for determining a target RAM in each RAM of the FPGA, and operating the target RAM according to the target instruction; and each RAM connected to the RAM control center. In the present application, the control terminal outside the FPGA can send the target instruction to the RAM control center through the serial interface, so that the RAM control center can operate the target RAM according to the target instruction, thereby realizing the operation of the RAM in the FPGA according to the needs of the control terminal, and improving the flexibility of operating the RAM in the FPGA. The RAM operation method, system, electronic device and computer-readable storage medium provided by the present application also solve the corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 A schematic diagram of the structure of an FPGA provided in an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of the structure of the RAM control center;

[0045] Figure 3 This is a schematic diagram of address space conversion;

[0046] Figure 4 This is a schematic diagram of the arrangement format of the data display area;

[0047] Figure 5 Flowchart for FPGA prototype verification using the FPGA of this application;

[0048] Figure 6 A flowchart of a RAM operation method provided in an embodiment of the present application;

[0049] Figure 7 A schematic diagram of the structure of a RAM operating system provided in an embodiment of the present application;

[0050] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0051] Fig. 9Another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0053] See also Figure 1 , Figure 1 A schematic diagram of the structure of an FPGA provided in an embodiment of the present application, wherein RAM Control Hub (RCH) represents a RAM control center and a PC (Personal Computer) is a control terminal.

[0054] An FPGA provided in an embodiment of the present application may include:

[0055] A serial interface is used to connect to a control terminal outside the FPGA and receive target instructions transmitted by the control terminal, and the target instructions are used to operate the target RAM;

[0056] A RAM control center connected to the serial interface is used to determine a target RAM among various RAMs of the FPGA and operate the target RAM according to a target instruction;

[0057] Each RAM is connected to the RAM control center.

[0058] It should be noted that the control end refers to the end that controls the FPGA. The type and structure of the control end can be flexibly determined according to the application scenario. For example, in addition to being able to Figure 1 In addition to the PC in the FPGA, it can also be a server, a mobile phone, etc. The target RAM refers to the RAM in the FPGA that needs to be operated. In addition, the number of RAMs connected to the RAM control center in the FPGA can be flexibly set according to actual needs, and this application does not make specific restrictions here.

[0059] It should also be noted that the type of target instruction can be determined according to business needs. For example, the target instruction can be an initialization instruction, in which case the RAM control center needs to perform initialization operations on the target RAM. Another example is that the target instruction can also be a read-write instruction, in which case the RAM control center needs to perform read-write operations on the target RAM, etc. In addition, when the target instruction is transmitted through a serial interface, it needs to be encapsulated according to the protocol of the serial interface, and the serial port driver is called to transmit the encapsulated instruction.

[0060] In actual applications, the structure of the RAM control center can be flexibly determined according to business needs. Figure 2 , for example, the RAM control center may include:

[0061] A frame data parsing module connected to the serial interface, used for receiving a target instruction, parsing the target instruction, and obtaining a register instruction and / or a write data frame;

[0062] A register reading and writing module connected to the frame data parsing module is used to write register instructions into the register group;

[0063] A register group connected to the register read / write module is used to determine the target RAM according to the register instruction, and a bus control module connected to the target RAM operates the target RAM according to the register instruction;

[0064] A data transmission control interface connected to the register group, used for transmitting data;

[0065] Each bus control module connected to the data transmission control interface is used to connect to the corresponding RAM interface;

[0066] A write RAM data cache connected to the frame data parsing module, used for caching write data frames;

[0067] Wherein, the write RAM data cache is connected to the data transmission control interface.

[0068] From this description, it can be seen that the RAM control center in the present application includes a frame data parsing module for parsing the target instruction. In this way, the control end can flexibly apply the instruction to transmit the target instruction to the FPGA, thereby improving the control flexibility of the control end over the FPGA, and the frame data parsing module can also distinguish between register instructions and write data frames. In this way, the register instruction can be applied to the target RAM through the register group later, and the write data frame can be written to the target RAM through the data transmission control interface, so as to achieve the distinction between instructions and write data frames, so that the corresponding operation can be accurately performed on the target RAM. In this process, the write data frame can also be cached through the write RAM data cache to process the write data frame at an appropriate processing time, thereby improving the processing flexibility of the write data frame when avoiding the disordered transmission of the write data frame in the RAM control center; in addition, in the RAM control center of the present application, each RAM is connected to a bus control module, so that the register group can transmit instructions to the bus control module corresponding to the RAM to be operated through the data transmission control interface, so as to accurately operate the corresponding RAM through the bus control module, so that even if multiple RAMs are set in the FPGA, the RAM control center can accurately operate the corresponding RAM.

[0069] It should be noted that the target instructions and register instructions in the present application can be constructed based on tcl (Tool Command Language) instructions. For example, the structure of the target instruction can be: [control instruction][operation object][operation type][register address][write operation data], wherein the operation object is the RAM control center, the operation type can be read or write or initialization, the register address can be the address of the target register in the register group, and the write operation data is used to store the data required to be written during the write operation; for another example, the structure of the register instruction can be: [control instruction][operation object][operation type][starting address][data size][read data file / write data file], wherein the operation object is RAM, the operation type can be initialization or read or write, the starting address can be the starting position of the RAM data to be accessed in the user configuration management address space, the data size can be the size of the required access data, the unit can be bytes, the read data file can save the data read back from the RAM, and the write data file can be the data that needs to be updated to the RAM.

[0070] From this description, it can be seen that the target instructions and register instructions in the present application can be constructed based on tcl instructions. Since the syntax rules of tcl instructions are simple, dynamic domain definition can be performed, and they are not restricted by the platform, the control end and RAM control center of the present application can flexibly and quickly generate tcl instructions as needed, and the control end can also adaptively operate the RAM in the FPGA through tcl instructions, thereby improving the convenience of the control end in managing the RAM in the FPGA; in addition, the tcl instruction code is compact and easy to maintain. When applying tcl instructions, it can also be adaptively expanded according to C, C++ or Java, etc., so that the control end can adaptively modify the tcl instructions according to the operating requirements of the RAM, and the control end can expand the operating requirements of the RAM.

[0071] In specific application scenarios, the RAM control center of this application may also include:

[0072] A read RAM data cache connected to the data transfer control interface, used to cache data read from the RAM;

[0073] The frame data synthesis module is connected to the register group, the read RAM data cache and the serial interface respectively, and is used to obtain register data from the register group, obtain read data from the read RAM data cache, frame the register data and the read data, obtain response data, and transmit the response data to the control end through the serial interface.

[0074] In this way, with the help of the read RAM data cache, the frame data synthesis module and the serial interface, the RAM control center can transmit the register data and / or the read data in the RAM required by the control end to the control end, so as to improve the control end's understanding of the RAM control center. It should be noted that after obtaining the response data, the control end can also display the response data on its own for the user to read, etc.

[0075] In a specific application scenario, the register group of this application may include:

[0076] Status register, used to record the status information of the bus control module and the status information of the RAM interface;

[0077] The control register is used to manage the bus control module, such as resetting, opening, closing, etc. of the bus control module, and controlling the read and write operations of the RAM interface. During this process, the status information recorded in the status register reflects the status of the bus control module and the RAM interface. Since the bus control module and the RAM interface will affect the operation of the RAM, the control register can also manage the bus control module according to the status information recorded in the status register and specific register instructions, and control the read and write operations of the RAM interface. For example, when the status information recorded in the status register is normal, the bus control module is managed according to the register instructions, and the read and write operations of the RAM interface are controlled.

[0078] It should be noted that whether the register group sends register data to the frame data synthesis module and whether the read RAM data cache sends read data to the frame data synthesis module can be determined according to the target instruction. For example, when the control end needs to obtain the status of the bus control module or the RAM interface, it can send a corresponding request through the target instruction, and the frame data parsing module parses the corresponding register instruction. The register read-write module sends the register instruction to the register group. The control register in the register group reads the corresponding data from the status register as register data according to the register instruction, and sends the register data to the frame data synthesis module. The frame data synthesis module frames the register data to obtain response data, and transmits the response data to the control end through the serial interface. In this way, the control end obtains the required status data.

[0079] Correspondingly, when the control end needs to read the RAM, it can send a corresponding request through the target instruction, the frame data parsing module parses the corresponding register instruction, the register read-write module sends the register instruction to the register group, the control register in the register group sends the register instruction to the bus control module corresponding to the RAM, the bus control module sends the register instruction to the RAM, the RAM returns the response read data to the bus control module, the bus control module then stores the read data into the read RAM data cache, the read RAM data cache sends the read data to the frame data synthesis module, the frame data synthesis module frames the read data to obtain the response data, and transmits the response data to the control end through the serial interface, so that the control end obtains the required read data. When the control end needs to obtain the read data and status data at the same time, it only needs to combine the two processes, which will not be repeated.

[0080] In specific application scenarios, in order to facilitate users to control the RAM in the FPGA, the control end will automatically provide an address space for the RAM in the FPGA. Therefore, the target instructions generated by the control end may be based on the user-defined address space settings, and the RAM in the FPGA has its own address space. Therefore, it is necessary to convert the user-defined address space and the RAM interface address space. In order to achieve this function, the RAM control center must also include: an address space conversion module connected between the control register and the data transmission control interface, which is used to convert the user-defined address space and the RAM interface address space.

[0081] It should be noted that the address space conversion module manages the managed RAM according to the user-defined address space, such as Figure 3 As shown, the user can configure the RAM to any position in the management address space, for example, the address can be arranged in sequence, such as RAM1 occupies 00000000h~00000FFFh in the user configuration management address space, RAM3 occupies 00001000h~00020FFFh in the user configuration management address space, etc. On this basis, CFG_RAM can also be described in the configuration file of the RAM control center to indicate the position PATH of the RAM in the design hierarchy structure, the starting position ADDR_START of the RAM in the user configuration management address space, the required space size of the RAM, DATA_WIDTH and SIZE (need to be consistent with the size of the RAM itself, in bytes), so that the address space conversion module can convert between the user-defined address space and the RAM interface address space, where the content of CFG_RAM can be as follows:

[0082] CFG_RAM{

[0083] PATH=hw_top.soc_top.lmu0.ram0_131072x32

[0084] ADDR_START=0x00001000

[0085] DATA_WIDTH=4

[0086] SIZE=524288

[0087] }

[0088] It should also be noted that when the control end displays the RAM data in the FPGA, it is convenient for users to view it. In the display area, the data can be arranged in order from high to low according to the user management configuration space address, or the read data file or write data file in the RCH control module section can be opened for display, which is convenient for users to view. The data display area arrangement format can be as follows Figure 4 As shown, the number of bytes displayed in each line can be set by the user, such as the default 8-byte display.

[0089] In specific application scenarios, the FPGA itself needs to control the RAM. In order to coordinate the control of the RAM by the control end and the FPGA, a bus control module can also be set to connect to the RAM original design access bus, and the bus control module is used to bypass the RAM original design access bus, or connect the RAM original design access bus to the corresponding RAM interface; wherein, the RAM original design access bus is used by the FPGA to operate the RAM. In other words, when the control end needs to operate the RAM in the FPGA, the RAM original design access bus can be bypassed through the bus control module, so that the FPGA cannot use the RAM original design access bus to operate the RAM. When the control end does not operate the RAM in the FPGA, the RAM original design access bus can be connected to the corresponding RAM interface through the bus control module, so that the FPGA can use the RAM original design access bus to operate the RAM. It should be noted that since the bus control module corresponds to the RAM one-to-one, and the bus control module corresponds to the RAM original design access bus one-to-one, the control end or FPGA can accurately manage the operation rights of each RAM.

[0090] The present application provides an FPGA, including a serial interface, which is used to connect to a control end outside the FPGA and receive a target instruction transmitted by the control end, the target instruction being used to operate a target RAM; a RAM control center connected to the serial interface, which is used to determine a target RAM in each RAM of the FPGA and operate the target RAM according to the target instruction; and each RAM connected to the RAM control center. In the present application, the control end outside the FPGA can send the target instruction to the RAM control center through the serial interface, so that the RAM control center can operate the target RAM according to the target instruction, thereby realizing the operation of the RAM in the FPGA according to the needs of the control end and improving the flexibility of operating the RAM in the FPGA.

[0091] It should be noted that the application scenario of the FPGA of this application can be flexibly determined as needed. For example, the FPGA of this application can be used in chip verification, where chip verification is one of the steps in the development of ASIC (Application Specific Integrated Circuit) related projects. In chip development, chip verification can not only ensure the functional correctness and reliability of the chip, but also provide key feedback and opinions for the design or implementation process, helping engineers to better iterate and optimize. FPGA prototype verification is an effective chip verification technology that can help designers quickly and accurately verify whether the function and performance of the chip meet the design requirements. By porting the RTL (register transfer level) to the FPGA and simulating and testing it, the designer can verify the function and performance of the chip to ensure that it meets the design requirements. FPGA prototype verification can provide a verification platform for software designers. In the chip development process, it is common practice to develop software and chips at the same time because this can speed up the time to market of the product. In addition, FPGA prototype verification can also evaluate the chip function and performance before IC tape-out.

[0092] Based on the structure of the FPGA of the present application, when the FPGA of the present application is used for FPGA prototype verification, the following can be done: Figure 5 As shown, the following steps are included:

[0093] During the FPGA design phase, you need to add an RCH module to the project to connect to the RAM resources that need to be accessed and tested in the design;

[0094] Comprehensively implement FPGA engineering according to chip verification requirements and generate bitstream configuration files;

[0095] Download the configuration file to the FPGA through the hardware management window of the integrated development environment and the JTAG debugger;

[0096] In the command line window of the development environment, load the RAM Operation Center through the tcl command;

[0097] In the command line window of the development environment, the status information of the FPGA's RCH module is accessed through tcl instructions and data read and write operations are performed on the RAM module, and then related functional verification and testing are performed. For example, RAM is accessed through tcl instructions to perform initialization, read operations, and write operations, and the read-back RAM data is displayed and viewed in the integrated development environment.

[0098] The functions of the RCH module may refer to the corresponding description in the above embodiments.

[0099] See also Figure 6 , Figure 6 A flowchart of a RAM operation method provided in an embodiment of the present application.

[0100] A RAM operation method provided in an embodiment of the present application is applied to a RAM control center and may include the following steps:

[0101] Step S101: Obtain a target instruction, where the target instruction is used by a control terminal outside the FPGA to operate a target RAM.

[0102] Step S102: Determine the target RAM among the RAMs of the FPGA.

[0103] Step S103: operating the target RAM according to the target instruction.

[0104] The corresponding description of the RAM operation method applied to the RAM control center provided in the embodiments of the present application can be referred to the above embodiments, which will not be repeated here.

[0105] See also Figure 7 , Figure 7 A schematic diagram of the structure of a RAM operating system provided in an embodiment of the present application.

[0106] A RAM operating system provided in an embodiment of the present application is applied to a RAM control center and may include:

[0107] A first acquisition module 101 is used to acquire a target instruction, where the target instruction is used by a control terminal outside the FPGA to operate a target RAM;

[0108] A first determination module 102 is used to determine a target RAM among various RAMs of the FPGA;

[0109] The first processing module 103 is used to operate the target RAM according to the target instruction.

[0110] The corresponding description of the RAM operating system applied to the RAM control center provided in the embodiments of the present application can be found in the above embodiments and will not be repeated here.

[0111] The present application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of a RAM operation method provided in an embodiment of the present application. Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0112] A fan speed processing device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented:

[0113] Get the target instruction, which is used by the control end outside the FPGA to operate the target RAM;

[0114] Determine the target RAM among the various RAMs of the FPGA;

[0115] The target RAM is operated according to the target instruction.

[0116] See also Fig. 9 , another electronic device provided in the embodiment of the present application may also include: an input port 203 connected to the processor 202, for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, for realizing communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (Mobile High-Definition Link, MHL), Universal Serial Bus (Universal Serial Bus, USB), High-Definition Multimedia Interface (High-DefinitionMultimedia Interface, HDMI), wireless connection: wireless fidelity technology (WIreless Fidelity, WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.

[0117] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0118] Get the target instruction, which is used by the control end outside the FPGA to operate the target RAM;

[0119] Determine the target RAM among the various RAMs of the FPGA;

[0120] The target RAM is operated according to the target instruction.

[0121] The computer-readable storage medium involved in this application includes random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.

[0122] A computer program product provided in an embodiment of the present application includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented:

[0123] Get the target instruction, which is used by the control end outside the FPGA to operate the target RAM;

[0124] Determine the target RAM among the various RAMs of the FPGA;

[0125] The target RAM is operated according to the target instruction.

[0126] For the description of the relevant parts of a RAM operation method, system, electronic device, and computer-readable storage medium provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in an FPGA provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0127] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0128] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An FPGA, It is characterized in that include: A serial interface, used to connect to a control terminal outside the FPGA and receive a target instruction transmitted by the control terminal, wherein the target instruction is used to operate a target RAM; A RAM control center connected to the serial interface, used to determine the target RAM among the various RAMs of the FPGA, and operate the target RAM according to the target instruction; Each RAM is connected to the RAM control center.

2. The FPGA according to claim 1, It is characterized in that The RAM control center includes: A frame data parsing module connected to the serial interface, used for receiving the target instruction, parsing the target instruction, and obtaining a register instruction and / or a write data frame; A register reading and writing module connected to the frame data parsing module, used for writing the register instruction into a register group; The register group connected to the register read / write module is used to determine the target RAM according to the register instruction, and operate the target RAM according to the register instruction through the bus control module connected to the target RAM; A data transmission control interface connected to the register group, used for transmitting data; Each bus control module connected to the data transmission control interface is used to connect to the corresponding RAM interface; A write RAM data cache connected to the frame data parsing module, used for caching the write data frame; Wherein, the write RAM data cache is connected to the data transmission control interface.

3. The FPGA according to claim 2, It is characterized in that The RAM control center also includes: A read RAM data cache connected to the data transfer control interface, used to cache data read from the RAM; A frame data synthesis module connected to the register group, the read RAM data cache and the serial interface respectively, is used to obtain register data from the register group, obtain read data from the read RAM data cache, frame the register data and the read data to obtain response data, and transmit the response data to the control end through the serial interface.

4. The FPGA according to claim 2 or 3, It is characterized in that The register set includes: A status register, used to record the status information of the bus control module and the status information of the RAM interface; The control register is used to manage the bus control module and control the read and write operations of the RAM interface.

5. The FPGA according to claim 4, It is characterized in that The RAM control center also includes: The address space conversion module connected between the control register and the data transmission control interface is used for converting between the user-defined address space and the RAM interface address space.

6. The FPGA according to claim 4, It is characterized in that The bus control module is connected to the RAM original design access bus, and the bus control module is used to bypass the RAM original design access bus, or connect the RAM original design access bus to the corresponding RAM interface; The RAM is originally designed to access the bus and is used by the FPGA to operate the RAM.

7. A RAM operation method, It is characterized in that The RAM control center as claimed in any one of claims 1 to 6 comprises: Obtaining a target instruction, wherein the target instruction is used by a control terminal outside the FPGA to operate a target RAM; Determining the target RAM among the RAMs of the FPGA; The target RAM is operated according to the target instruction.

8. A RAM operating system, It is characterized in that The RAM control center as claimed in any one of claims 1 to 6 comprises: A first acquisition module, used for acquiring a target instruction, wherein the target instruction is used for a control terminal outside the FPGA to operate a target RAM; A first determination module, configured to determine the target RAM among the RAMs of the FPGA; The first processing module is used to operate the target RAM according to the target instruction.

9. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the RAM operation method as claimed in claim 7 when executing the computer program.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the RAM operation method according to claim 7 are implemented.