Initialization circuit and initialization method in FPGA chip

By incorporating an address counter and write enable signal generator into the FPGA chip, the problem of low initialization speed and efficiency of embedded memory is solved, achieving hardware resource-saving and fast initialization writing.

CN117457040BActive Publication Date: 2026-11-24HERCULES MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311498160.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2026-11-24
Estimated Expiration
2043-11-10

AI Technical Summary

Technical Problem

The initialization circuit of embedded memory in existing FPGA chips increases hardware resource overhead, and the initialization write speed and efficiency need to be improved.

Method used

The embedded memory uses a built-in address counter, write enable signal generator, and configuration memory. Initial data and addresses are written to the embedded memory through the data path and input/output module. The read/write logic of the configuration memory is reused for initialization, reducing hardware resource overhead and accelerating the initialization write speed.

Benefits of technology

It improves the initialization write speed and efficiency of embedded memory without increasing hardware resources, reduces the extra bitstream setup time for configuration memory access, and enables writing multiple lines of address in a single bitstream operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117457040B_ABST
    Figure CN117457040B_ABST
Patent Text Reader

Abstract

The application provides an initialization circuit and method in FPGA chip. The initialization circuit comprises: an embedded memory, an address counter built in the embedded memory, a configuration memory, an input and output module of the configuration memory, a data path, N write enable signal generators, the data path is used for receiving data and transmitting to the input port of the input and output module, the configuration memory is used for storing the area of data required by the embedded memory initialization, the area comprises the first area to the Nth area, and the configuration memory further comprises an N+1th area. The embedded memory is used for acting based on the data stored in the first area to the N+1th area and the data output by the address counter and the write enable signal generators. Thus, the initialization write speed and area proportion of the embedded memory EMB can be balanced by using the space of the configuration memory. The additional code stream setting time for accessing the configuration memory is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to one or more embodiments in the field of semiconductor technology, and more particularly to an initialization circuit and initialization method in an FPGA chip. Background Technology

[0002] Currently, with the increasingly widespread application of Field-Programmable Gate Array (FPGA) devices, more and more application design companies are starting to use FPGA devices to implement their application designs. The memory module is a crucial component in an FPGA chip. Implementing configurable functions based on a memory module of a certain size is called embedded memory (EMB). During user operation, the EMB typically needs to be initialized to ensure that user-available data exists within it before the chip begins normal operation.

[0003] After the chip is powered on, the initial value of the embedded memory (EMB) needs to be configured. The usual practice is to store the initial value of the embedded memory (EMB) in non-volatile memory. After power-on, the FPGA reads the initial value of the non-volatile memory area and writes it into the embedded memory (EMB) to complete the initialization.

[0004] However, the commonly used initialization circuits add extra hardware resource overhead, and the initialization write speed and efficiency of embedded memory (EMB) need to be improved. Summary of the Invention

[0005] This invention describes an initialization circuit and initialization method for an FPGA chip, which can solve the above-mentioned technical problems.

[0006] In a first aspect, the present invention provides an initialization circuit in an FPGA chip, comprising: an embedded memory, an address counter built into the embedded memory, a write enable signal generator, a configuration memory, an input / output module for the configuration memory, and a data path.

[0007] The data path is used to receive data and transmit it to the input port of the input / output module, and the data bit width of the input port is a preset bit n.

[0008] The input / output module is used to transmit the data corresponding to the embedded memory in the data received by the data path to the configuration memory for storage via bit lines, where the bit line width is a preset bit n.

[0009] The configuration memory includes a region for storing data transmitted by the input / output module. The data is stored in a first region and a second region of the configuration memory. The first region and the second region correspond one-to-one with the data input terminal and chip select enable / write enable terminal of the embedded memory, respectively.

[0010] The configuration memory further includes a third region for storing the embedded memory flag data and a fourth region for storing the first write enable signal and the second write enable signal.

[0011] The address counter is used to output the initial address to the address input terminal of the embedded memory.

[0012] The write enable signal generator is used to output a write enable signal to the chip select enable / write enable input of the embedded memory.

[0013] The embedded memory is used to perform actions based on the data stored in the first region and the second region, as well as the data output by the address counter and the write enable signal generator.

[0014] The configuration memory may further include a fifth region for storing the starting address of the initial address. The fifth region is connected to the address counter, and the starting address of the initial address is used as the starting address of the embedded memory. Under the action of the address counter, the address is accumulated and output.

[0015] In the first initialization phase, the initial data, chip select command / write enable command, and initial address of the embedded memory are transmitted to the corresponding data input terminal, chip select enable terminal / write enable terminal, and address input terminal of the embedded memory through the data path, the input / output module, the first area, the second area, the address counter, and the write enable signal generator, respectively.

[0016] In the second initialization phase, the embedded memory writes the initial data into multiple memory cells corresponding to the initial address to initialize the embedded memory.

[0017] Compared to the first aspect, the present invention provides an initialization method in an FPGA chip, applied to a data path, an input / output module, a configuration memory, an embedded memory, an address counter built into the embedded memory, and a write enable signal generator; wherein, the input / output module is used to transmit the data received by the data path corresponding to the embedded memory to the configuration memory for storage, the configuration memory storing the data transmitted by the input / output module includes a first region and a second region, the first region and the second region respectively corresponding to the data input terminal and the chip select enable terminal / write enable terminal of the embedded memory; the configuration memory further includes a third region for storing the embedded memory flag bit data and a fourth region for storing the first write enable signal and the second write enable signal; the configuration memory may further include a fifth region for storing the starting address of the initial address, the fifth region being connected to the address counter, the starting address of the initial address being used as the starting address of the embedded memory initial address, and under the action of the address counter, address accumulation and output are performed.

[0018] The method includes:

[0019] The initial address of the embedded memory is transmitted to the address input terminal of the embedded memory through the address counter.

[0020] The chip select command / write enable command of the embedded memory is transmitted to the chip select enable / write enable input terminal of the embedded memory through the data path, the input / output module, and the write enable signal generator.

[0021] The initialization data of the embedded memory is transmitted to the data input terminal of the embedded memory through the data path, the input / output module, and the first area.

[0022] The initial data is written into multiple storage units corresponding to the initialization address through the data path, the input / output module, and the data stored in the first, second, and fourth regions to achieve initialization.

[0023] Secondly, the present invention also provides an initialization circuit in an FPGA chip, comprising: an embedded memory, an address counter built into the embedded memory, a configuration memory, an input / output module of the configuration memory, a data path, and N write enable signal generators, wherein N is the number of rows of a single code stream written to the embedded memory, determined according to the bit line width and word line width of the embedded memory and the remaining storage space of the configuration memory.

[0024] The data path is used to receive data and transmit it to the input port of the input / output module. The data bit width of the input port of the input / output module is any preset bit n.

[0025] The input / output module is used to transfer the data corresponding to the embedded memory in the data to the configuration memory for storage, and the bit line width is any preset bit n.

[0026] The configuration memory is used to store the data required for the initialization of the embedded memory. The regions include the first to the Nth regions, and each region includes initial data, flag bits, a first write enable signal, and a second write enable signal.

[0027] Each of the first to Nth regions includes a write enable signal generator. The inputs of the write enable signal generators are the first enable signal and the second enable signal of each region. The outputs of each write enable signal generator are logically ORed and then input to the clock input port of the address counter.

[0028] The configuration memory also includes an N+1th region for storing the chip select enable / initialization enable signal in the data transmitted by the input / output module.

[0029] The embedded memory is used to operate based on the data stored in the first to N+1 regions, as well as the data output by the address counter and the write enable signal generator.

[0030] In the first initialization phase, the initial data, chip select enable / write enable command, and initial address of the embedded memory are transmitted to the corresponding data input terminal, chip select enable / write enable terminal, and address input terminal of the embedded memory through the data path, the input / output module, and the first to N+1 regions, respectively.

[0031] In the second initialization phase, the embedded memory writes the initial data into multiple memory cells corresponding to the initial address to initialize the N rows of addresses of the embedded memory.

[0032] Corresponding to the second aspect, the present invention also provides an initialization method in an FPGA chip, applied to a data path, an input / output module, a configuration memory, an embedded memory, an address counter built into the embedded memory, and N write enable signal generators, where N is the number of rows written to the embedded memory in a single code stream operation, determined according to the bit line width and word line width of the embedded memory and the remaining storage space of the configuration memory; wherein, the input / output module is used to transmit the data received by the data path to the embedded memory corresponding to the data in the configuration memory for storage; the area of ​​the configuration memory storing the data transmitted by the input / output module includes a first area to an Nth area, each area including initial data, flag bit data, a first write enable signal, and a second write enable signal, and the configuration memory also includes an N+1th area for storing the chip select enable / initialization enable signal transmitted by the input / output module.

[0033] The method includes:

[0034] The initial data of the embedded memory is transmitted to the data input terminal of the embedded memory through the data path, the input / output module, and the initial data of the first region to the Nth region.

[0035] The initial address of the embedded memory is transmitted to the address input terminal of the embedded memory through the data path, the input / output module, and the address counter.

[0036] The chip select enable / write enable of the embedded memory is transmitted to the chip select enable / write enable terminal of the embedded memory through the data path, the input / output module, and the N+1 region.

[0037] The embedded memory writes the initial data into multiple storage units corresponding to the initialization address based on the data stored in the first to N+1 regions to achieve initialization.

[0038] In the circuits and methods provided in the embodiments of this specification, the read / write logic of the configuration memory is reused. The initial data and address of the embedded memory are written into the corresponding configuration register, and then the chip select signal CE and write enable signal WE are written into the configuration register. This completes the writing of one line of initialization data. Since the embedded memory is automatically initialized based on the data, the initialization address of the embedded memory can be selected more flexibly. Furthermore, the space of the configuration memory can be fully utilized to balance the initialization write speed and area ratio of the embedded memory. This reduces the additional bitstream setting time for accessing the configuration memory, enabling the writing of N lines of embedded memory data in a single bitstream operation. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This diagram illustrates the structure of an initialization circuit for an FPGA chip according to an embodiment of the present invention.

[0041] Figure 2 This diagram illustrates the structure of the embedded memory EMB provided in an embodiment of the present invention.

[0042] Figure 3 This diagram illustrates the structure of the address counter provided in an embodiment of the present invention.

[0043] Figure 4 This diagram illustrates the timing of a write operation to a row address of a block RAM provided in an embodiment of the present invention.

[0044] Figure 5 This diagram illustrates the structure of an initialization circuit for another FPGA chip provided in an embodiment of the present invention.

[0045] Figure 6 This diagram illustrates another block RAM structure provided by an embodiment of the present invention.

[0046] Figure 7 This diagram illustrates another address counter provided in an embodiment of the present invention.

[0047] Figure 8 This diagram illustrates the timing process of another address counter provided in an embodiment of the present invention.

[0048] Figure 9 This diagram illustrates the timing of write operations to the Nth row address of a block RAM provided in an embodiment of this application. Detailed Implementation

[0049] The solution provided in this specification will now be described with reference to the accompanying drawings.

[0050] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be described below with reference to the accompanying drawings.

[0051] In the description of the embodiments of this application, the words "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the words "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a specific manner.

[0052] In the description of the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, B existing alone, and A and B existing simultaneously. Furthermore, unless otherwise stated, the term "multiple" means two or more.

[0053] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.

[0054] FPGA, or Field Programmable Gate Array, is a product of further development based on programmable devices such as Programming Array Logic (PAL), Generic Array Logic (GAL), and Complex Programming Logic Device (CPLD). It emerged as a semi-custom circuit in the field of Application Specific Integrated Circuit (ASIC), solving the shortcomings of custom circuits and overcoming the limitation of the limited number of gate circuits in the original programmable devices.

[0055] In FPGA chips, configurable functions are implemented based on a memory module of a certain size, which is called the EMB (embedded memory block). Users typically need to initialize the EMB to ensure that it contains usable data before the chip begins normal operation. EMB initialization is achieved by writing data to it.

[0056] Figure 1 This is a schematic diagram of the initialization circuit of an FPGA chip provided in an embodiment of the present invention. Figure 2This is a schematic diagram of the structure of the embedded memory EMB provided in an embodiment of the present invention, as shown below. Figure 1 and Figure 2 As shown, the FPGA chip includes a configuration memory (CFG memory), an input / output module (CFG MEM I / O), an embedded memory (EMB), a data transmission path (cfgin_global), and a built-in address counter. The data transmission path (cfgin_global) is used to transmit data; the input / output module (CFG MEM I / O) is used to transmit data to the configuration memory. The configuration memory (CFG memory) stores the data transmitted by the input / output module in four regions: a first region, a second region, a third region, and a fourth region. The first region is connected to the data input terminal (di) of the embedded memory (EMB); the second region is connected to the chip select enable / write enable terminal of the embedded memory (EMB); the second enable signals of the third and fourth regions, as well as the initialization enable signal of the second region, are connected to the address counter; the output of the address counter is connected to the address input terminal of the embedded memory; the fourth region is connected to the write enable signal generator, and its output is connected to the chip select enable / write enable terminal (CE / WE) of the embedded memory (EMB). The embedded memory (EMB) operates based on data from the first region, second region, third region, fourth region, address counter, and write enable generator. Specifically, in the first initialization phase, the initial data, chip select command / write enable command, and initial address of the embedded memory EMB are transmitted to the corresponding data input terminal di, chip select enable terminal CE / WE, and address input terminal adr of the embedded memory EMB via the data path (cfgin_global), input / output module (CFG MEM I / O), first region, second region, address counter, and write enable signal generator. In the second initialization phase, the embedded memory EMB writes the initial data to multiple memory cells corresponding to the initial address to initialize the embedded memory EMB.

[0057] In this embodiment, by reusing the configuration memory (CFG memory) of the embedded memory EMB to store data, and reusing unused storage bits to store initialization settings, the embedded memory EMB can complete initialization based on this initial data, eliminating the need for additional hardware data storage and reducing hardware overhead. To accelerate the initialization write speed of the embedded memory EMB, the input port cfgin of the input / output module (CFG MEM I / O) is widened to n bits, and the bit lines bl / blb between the input / output module (CFG MEM I / O) and the configuration memory (CFG memory) are also widened to n bits. The initial address required for initializing the embedded memory EMB is automatically generated internally by the built-in address counter (addr counter), so external configuration only requires providing the corresponding initial data and chip select / write enable command control data.

[0058] It should be understood that the initial address of the embedded memory EMB indicates the location of multiple memory cells in the embedded memory EMB where the initial data needs to be written, and the initial data includes the initial settings of each of the multiple memory cells.

[0059] It should be noted that the data path may receive a large amount of data. Correspondingly, the input / output module (CFG MEMI / O) can select the data corresponding to the embedded memory EMB from the data received by the data path and transfer it to the configuration memory (CFG memory) for storage. For ease of description, the data corresponding to the embedded memory EMB in the data received by the data path will be referred to as the target data below.

[0060] It should be noted that the chip select enable (CE) and write enable (WE) ports can be configured as a single port or separately. The following description uses the chip select enable / write enable ports CE / WE as an example. The first area will be referred to as the data storage area, used to store data; the second area will be referred to as the chip select command / write enable command storage area, used to store commands; the third area will be referred to as the flag storage area, used to store flag data to trigger the internal address counter and achieve pulse waveform triggering; the fourth area will be referred to as the write enable area, used to store the first and second write enable signals. The configuration memory (CFG memory) may also include a fifth area, not shown in the diagram, used to store the starting address of the initial address, thus enabling write operations to a specified initial address.

[0061] like Figure 2 As shown, there can be multiple embedded memory EMBs, and multiple embedded memory EMBs can be arranged in a row. Figure 1 Four embedded memory EMBs are shown arranged in a row. Figure 2 The block memory area (block RAM) is shown. (Example) Figure 2 and Figure 1 As shown, four embedded memory EMBs arranged in a row can form a block memory (block RAM).

[0062] In one feasible implementation, the embedded memory (EMB) is equipped with a data selector (mux) for selecting whether the signal source for the data input terminal (di) is the initial circuitry or the circuitry for normal user functions. The data storage area of ​​the configuration memory can also be used to store configuration data for the normal user circuitry functions of the embedded memory (EMB). The initial circuitry structure of the embedded configuration memory when the data selector (mux) selects the initial circuitry as the signal source is the initial circuitry is described below.

[0063] For example, such as Figure 2 As shown, a data selector mux is set inside the embedded memory EMB. When the initialization enable cfg_init_en is 1, it indicates that the embedded memory EMB has entered the initialization working mode. Then the port signal selects the data input from cfg_*. This data includes: initial address init_adr, initial data cfg_di, and chip select enable / write enable cfg_ce / cfg_we. This refers to the signals output by the configuration memory (CFG memory), address counter, and write enable generator (WE generator). For example: di[M:0] (signal indicating the initial data transmission in the data storage area), adr[N:0] (signal indicating the initial address transmission from the address counter), CE / WE (signal indicating the chip select / write enable signal transmitted from the chip select command / write enable command storage area); [M:0] indicates the number of data lines. Assuming each embedded memory EMB has 18 data lines, four embedded memory EMBs have a total of 72 data lines, so [M:0] represents 72 data lines. Correspondingly, [N:0] indicates the number of address lines. For example, if each embedded memory EMB has 9 address lines, then N can be 35, and [N:0] represents 36 address lines. When cfg_init_en is selected as 0, it indicates entering the normal user function mode, and all port signals are input from fp_*, i.e., the signals input to the circuitry in the normal user function mode.

[0064] In one feasible implementation, the initial data of the embedded memory EMB is written into the data storage area of ​​the configuration memory (CFG memory) and then transmitted to the data input port di of the embedded memory EMB; the offset address of the initial address of the embedded memory EMB is written into the offset address storage area of ​​the initial address of the configuration memory (CFG memory) and then transmitted to the address input port adr of the embedded memory EMB after passing through the address counter; the chip select command / write command of the embedded memory EMB is written into the chip select command / write enable command storage area of ​​the configuration memory (CFG memory) and then transmitted to the chip select enable / write enable terminal CE / WE of the embedded memory EMB after passing through the write enable generator.

[0065] In one embodiment, initial data is transmitted via a data transmission channel, through the input / output module (CFG MEMI / O), to the corresponding storage space in the configuration memory (CFG memory). Chip select enable / write enable is transmitted via the data transmission channel, through the input / output module, to the corresponding storage space in the configuration memory.

[0066] In one embodiment, to accelerate the initialization write speed of the embedded memory EMB, the input port cfgin of the configuration memory input / output module (CFG MEM I / O) and the bit lines bl / blb of the configuration memory (CFG memory) are widened to n bits.

[0067] In one embodiment, the embedded memory EMB automatically generates the address required to initialize the embedded memory EMB by using a built-in address counter. In this way, external configuration only requires providing the corresponding write data and chip select enable / write enable control data.

[0068] Figure 3 This document shows a schematic diagram of the structure of an address counter provided in an embodiment of this application, as shown below. Figure 3As shown, the flag data in the third region of the configuration memory (CFG memory) and the second write enable in the fourth region are logically XORed to output the clock signal init_adr_clk of the address counter. This clock signal and the initialization enable cfg_init_en serve as the inputs to the address counter, outputting the initial address adr. This initial address adr is the input to the address input terminal adr of the embedded memory EMB. In some embodiments, the initial address adr can be any address within the block RAM address range. By using the address counter, space in the configuration memory is saved, link resources occupied by address data transmission are reduced, and the initialization speed is accelerated. The configuration memory only needs to store the flag data, and the rising and falling edges are triggered by the second write enable signal and the flag data. In another embodiment, the configuration memory stores the flag data and the starting address of the initial address, and the rising and falling edges are triggered by the second write enable signal and the flag data, thus specifying the initial address.

[0069] It is understood that the method of triggering the internal address counter is not limited to the one mentioned above: the waveform triggering of the pulse is achieved by XORing the init_WE1 in the fourth region of the configuration memory (CFG memory) and the flag bit init_adr_id in the third region. In this way, code execution time and external memory space can be reduced. Any method of writing flag bits using the configuration memory (CFG memory) is within the scope of protection of this invention.

[0070] In one embodiment, a third write enable signal cfg_we is generated by a write enable signal generator and transmitted to the chip select enable / write enable pin of the embedded memory EMB. The first write enable init_WE0 and the second write enable init_WE1 are the inputs of the write enable signal generator, and the output of the write enable signal generator is the third write enable cfg_we.

[0071] Figure 4 This diagram illustrates the timing of a write operation to a row address of a block RAM according to an embodiment of the present invention. Figure 4 As shown, the input / output modules (CFG MEM I / O) of the configuration memory (CFG memory) operate under the cclk clock. cfg_WE0 and cfg_WE1 shown in the figure are equivalent to... Figure 1 The init_WE0 and init_WE1 in the example.

[0072] At time t1a, the input / output module (CFG MEM I / O) of the configuration memory (CFG memory) receives the high-level cwrite signal and cshift signal in sequence.

[0073] When the chip select enable / initialization enable signal (cfg_init_en / cfg_CE) becomes high, a memory block of the embedded memory EMB is selected and the initialization data writing begins.

[0074] The data storage area in the configuration memory (CFG memory) transmits the di[M:0] signal to the data input port di of the embedded memory EMB.

[0075] Understandably, when the initialization enable signal (cfg_init_en) is low, the configuration memory enters the normal user function circuit mode. The data input port of the embedded memory EMB receives the fp_di signal from the multiplexer, and the di[M:0] signal is used to transmit normal user function data.

[0076] At time t2a, the input / output module (CFG MEM I / O) sequentially receives the high-level write enable signal cwrite and the shift signal cshift.

[0077] The first write enable signal cfg_WE0 becomes active high. When the rising edge of the next clock cycle arrives, the second write enable signal cfg_WE1 becomes active high. The write enable signal generator (WE generator) receives the first write enable signal cfg_WE0 and the second write enable signal cfg_WE1, causing the third write enable signal cfg_WE to become active high. After the address counter (addr counter) receives the high level init_adr_clk, under the action of the high level initialization enable cfg_init_en, it transmits the 0th address data to the address input terminal adr of the embedded memory EMB.

[0078] At time t3a, the third write enable signal cfg_we becomes active high. After receiving the high-level init_adr_clk, the address counter transmits the first address data to the address input terminal adr of the embedded memory EMB under the action of the high-level initialization enable cfg_init_en.

[0079] like Figure 1 As shown, in one possible implementation, data is transmitted to the data input terminal cfgin of the input / output module of the configuration memory via the data path cfgin_global.

[0080] In one embodiment, the FPGA chip further includes: a first selector, connected to the data input terminal of the input / output module and the data path cfgin_global, used to select the data input of the input / output module during the initialization phase, so that the input / output module transmits the data corresponding to the embedded memory EMB in the data received by the data path cfgin_global to the configuration memory for storage, while skipping the data input of other configuration memory input / output modules.

[0081] The first selector G1 can be set on the line connecting the data input terminal cfgin and the data path cfgin_global of the input / output module.

[0082] It should be noted that the other configuration memory is used to store configuration data of other devices besides the embedded memory EMB. The input / output modules of the other configuration memory are used to implement the configuration logic of the other configuration memory. Through the first selector G1, it can be ensured that only the input / output modules of the configuration memory required for the initialization of the embedded memory EMB are accessed, and there is no need to perform data writing operations on the input / output modules of the other configuration memory, thereby greatly improving the efficiency of data writing.

[0083] In practical applications, during the initialization of the embedded memory EMB, after the first selector G1 is activated, the data path cfgin_global transmits data to the data input terminal cfgin of the input / output module. The input / output module then transmits the target data from the data to the configuration memory for storage via the bit lines bl / blb. When configuration data writing operations are required to other configuration memories, the first selector G1 is deactivated, allowing the input / output modules of the configuration memory to be configured together with those of other configuration memories. It should be noted that the cfgin_block signal is used to determine whether to activate the input / output modules of the configuration memory. For example, a high-level emb_seam_init_en signal and the cfgin_block signal activate the first selector G1, while a low-level emb_seam_init_en signal and the cfgin_block signal deactivate the first selector G1.

[0084] In one possible embodiment, the FPGA chip further includes a configuration memory address decoder CFG MEMDEC. The configuration memory address signal cfgmem_addr[X:0] transmits the address of the configuration accessor to the configuration memory decoder CFG MEM DEC. The decoder CFG MEM DEC selects several memory cells in the configuration memory corresponding to the address signal cfgmem_addr[X:0]. Here, [X:0] represents the number of address lines; for example, if the configuration memory CFG memory has 10 word lines, then X can be 9.

[0085] The input port cfgin[Y:0] of the configuration memory input / output module represents the number of configuration memory bit lines. For example, if the configuration memory (CFG memory) has 10 bit lines, then Y can be 9.

[0086] In one embodiment, the bit lines of the configuration memory (CFG memory) can be widened to n bits to accelerate the initialization write speed of the embedded memory.

[0087] The input signal cfgin[Y:0] of the configuration memory's input / output module is input to the configuration memory via bit line bl / blb. According to the address decoding of the address decoder CFG MEM DEC, the input signal cfgin[Y:0] of the configuration memory's input / output module is written to the corresponding address. When the data path cfgin_global signal is initial data, after decoding by the address decoder CFG MEM DEC, this initial data is transmitted via bit line bl / blb to the storage space of the configuration memory corresponding to the address through the configuration memory's input / output module.

[0088] In one possible implementation, the input port cfgin of the configuration memory's input / output module is also extended to n bits, and the bit line bl / blb between the configuration memory's input / output module and the configuration register is also widened to n bits, thereby accelerating the write speed of the embedded memory EMB.

[0089] The above describes the circuit structure of this embodiment of the invention, using the example of writing one line of address to the embedded memory (EMB) at a time. The above implementation does not include a fifth region in the configuration memory (CFG memory), i.e., the region storing the starting address of the initial address. In another implementation, a fifth region can be added to achieve an address generation method that specifies the starting address of the initial address.

[0090] Furthermore, to fully utilize the space of the configuration memory to balance the embedded memory EMB initialization write speed and area ratio, and to reduce the additional bitstream setup time for accessing the configuration memory, this invention provides an initialization circuit for an FPGA chip.

[0091] In the initialization mode, the embedded memory EMB of this circuit is written with initialization data by the configuration memory (CFG memory). Let the embedded memory EMB module be 2 in the initialization write state. m (bit line width) * n (word line width), while the remaining bits Ncfg of the configuration memory (CFG memory) > (2 N If *n)+Nadr+Ncontrol, then the maximum efficiency is that N rows of embedded memory (EMB) data can be written in one bitstream operation. Where 2 N *n represents the storage space occupied by the storage cells of the embedded memory EMB in the Nth row address, Nadr represents the storage space occupied by the flag bit data of the first to Nth regions, and Ncontrol represents the storage space occupied by the first and second write enable signals of the first to Nth regions.

[0092] Figure 5 This diagram illustrates the structure of an initialization circuit for another FPGA chip provided in an embodiment of the present invention, as shown below. Figure 5 As shown, taking N=2 as an example:

[0093] In one possible implementation, the bitstream operation required to write N rows of initialization data from the configuration memory CFG to the embedded memory EMB is one operation.

[0094] Figure 6 This diagram illustrates another block RAM structure provided by an embodiment of the present invention. Figure 7 This diagram illustrates another address counter provided by an embodiment of the present invention. Figure 5 , Figure 6 and Figure 7 As shown, continue writing initialization data to the remaining address space of the configuration memory (CFG memory). Each set of initialization data includes: flag bits (initial

[0095] The initialization data consists of _adr_id_x), first write enable (init_WEx_0), second write enable (init_WEx_1), and initial data (init data), where x represents an integer from 0 to 3. All sets of initialization data share the chip select enable (CE) / initialization enable (init_en).

[0096] After writing multiple sets of initialization data to the configuration memory (CFG memory), the multiple sets of initialization data are written to the corresponding ports of the embedded memory (EMB) at once.

[0097] The built-in address counter enables each set of initialization data under the control of the initialization enable signal cfg_init_en and the second write enable signal init_WEx_1 for the first to fourth regions, where x is an integer from 0 to 3. The initialization address of the embedded memory EMB is output to its address input terminal adr[N:0].

[0098] The initialization data cfg_di, which is written to the configuration memory (CFG memory), is written to the initialization data port di[M:0] of the embedded memory EMB under the control of the initialization enable signal cfg_init_en.

[0099] The write enable signals from the first to fourth regions, output by the write enable signal generators (WE generators) of the first to fourth regions, are used to perform a logical OR operation on the first to fourth write enable signals to obtain the enable signal init_we. This init_we is then used to output the chip select enable / write enable of the embedded memory EMB to its chip select enable / write enable input terminal CE / WE. The structure of each write enable signal generator (WE generator) and... Figure 2 The write enable signal generator shown is the same and is built into the embedded memory EMB.

[0100] The address counter's inputs are the second write enable (init_WE1_0) and flag (init_adr_id0) for the first region, the second write enable (init_WE1_1) and flag (init_adr_id1) for the second region, the second write enable (init_WE1_2) and flag (init_adr_id2) for the third region, and the second write enable (init_WE1_3) and flag (init_adr_id3) for the fourth region. A logical XOR operation is performed on the second write enable and flag for each region, and the resulting outputs Y0, Y2, Y1, and Y3 are logically ORed and input to the clock signal terminal (clock) of the N-bit counter. The other input to the N-bit counter is rstn, whose signal source is the initialization enable (cfg_init_en). Finally, the address counter's output is adr[N-1,0]. Y0-Y3 represent the write enable signals output from the first to the fourth region, respectively.

[0101] It should be noted that the method of triggering the internal address counter is not limited to the one mentioned above: using the flag bits init_adr_id0 to init_adr_id3 stored in the first to fourth regions of the configuration memory (CFG memory) as flag bits to realize the waveform triggering of the pulse. Any method of writing flag bits using the configuration memory (CFG memory) is within the scope of protection of this invention.

[0102] Figure 8 This diagram illustrates the timing process of another address counter provided in an embodiment of the present invention, as shown below. Figure 8 As shown:

[0103] At time t1b, the input / output module (CFG MEM I / O) sequentially receives the high-level cwrite and cshift signals. The chip select signal cfg_ce and the initialization circuit signal cfg_init_en both go high, selecting a memory block in the embedded memory and starting the initialization configuration process.

[0104] The initial data of the first region in the configuration memory (CFG memory) is transferred to the data input port di of the configuration memory.

[0105] At time t2b, the high level of the first write enable signal init_WE0_0 and the low level of the second write enable signal init_WE1_0 in the first region of the configuration memory (CFG memory) enter the first write enable signal generator of the first region, outputting the write enable signal init_WE0 of the first region as high. When the write enable signal of any region is high, the third write enable signal init_we is active high, and the initial data init_di0 of the first region of the configuration memory (CFG memory) is written to the 0th address of the embedded memory EMB.

[0106] At time t3b, the high level of the first write enable signal init_WE0_1 and the low level of the second write enable signal init_WE1_1 in the second region of the configuration memory (CFG memory) enter the second write enable signal generator of the second region, outputting the write enable signal init_WE1 of the second region as high. The third write enable signal init_we is active high, writing the initial data init_di1 of the second region of the configuration memory (CFG memory) to the first address of the embedded memory EMB.

[0107] The timeframes t4b and t5b are similar, so I won't go into too much detail here.

[0108] Figure 9 This illustration shows a timing diagram of a write operation to the Nth row address of a block RAM provided in an embodiment of this application, as follows: Figure 9 As shown:

[0109] Between time t1c and t7c, the input / output module (CFG MEM I / O) sequentially receives the high-level cwrite and cshift signals. The chip select signal cfg_ce and the initialization circuit signal cfg_init_en both go high, selecting a memory block in the embedded memory EMB and initiating the initialization configuration process.

[0110] The initial address cfg_di is output for the data storage area of ​​the configuration register (CFG memory).

[0111] At time t8c, the first write enable cfg_WE0 of the first region becomes high, so the third write enable cfg_WE also becomes high, and preparation begins to write the data at address 0.

[0112] At time t9c, the clock signal init_adr_clk of the address counter becomes active high and is transmitted to the clock input of the address counter. The active high control signal cfg_ce is transmitted to the multiplexer Mux, which causes the configuration memory to transmit the 0th address data to the address input di of the embedded memory EMB through the address counter.

[0113] At time t10c, the third write enable cfg_WE also becomes active high, preparing to write the first address data. The clock signal init_adr_clk of the address counter becomes active high and is transmitted to the clock input of the address counter. The active high control signal cfg_ce is transmitted to the multiplexer mux, causing the configuration memory (CFGmemory) to transmit the first address data to the address input di of the embedded memory EMB through the address counter.

[0114] It should be noted that, under the control of the high-level chip select enable / initialization enable cfg_CE / cfg_init_en, a single bitstream operation will sequentially write the initial data of the first to Nth regions into several memory cells corresponding to the adr in the embedded memory EMB.

[0115] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figure 1 or Figure 5 The method described.

[0116] According to another embodiment, a computing device is also provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements a combination... Figure 1 or Figure 5 The methods described herein. Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.

[0117] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. An initialization circuit in an FPGA chip, characterized by, include: Embedded memory, address counter built into the embedded memory, write enable signal generator, configuration memory, input / output module of configuration memory, data path; The data path is used to receive data and transmit it to the input port of the input / output module, and the data bit width of the input port is a preset bit n; The input / output module is used to transmit the data corresponding to the embedded memory in the data received by the data path to the configuration memory for storage via bit lines, where the bit line width is a preset bit n; The configuration memory includes a region for storing data transmitted by the input / output module. The data is stored in a first region and a second region of the configuration memory. The first region and the second region correspond one-to-one with the data input terminal and chip select enable / write enable terminal of the embedded memory, respectively. The configuration memory further includes a third region for storing the embedded memory flag data and a fourth region for storing the first write enable signal and the second write enable signal; The address counter is used to output the initial address to the address input terminal of the embedded memory; The write enable signal generator is used to output a write enable signal to the chip select enable / write enable input of the embedded memory; The embedded memory is used to perform actions based on the data stored in the first region and the second region, as well as the data output by the address counter and the write enable signal generator. In the first initialization phase, the initial data, chip select command / write enable command, and initial address of the embedded memory are transmitted to the corresponding data input terminal, chip select enable terminal / write enable terminal, and address input terminal of the embedded memory through the data path, the input / output module, the first area, the second area, the address counter, and the write enable signal generator, respectively. In the second initialization phase, the embedded memory writes the initial data into multiple memory cells corresponding to the initial address to initialize the embedded memory.

2. The initialization circuit of claim 1, wherein, The initial address of the embedded memory is generated by the address counter, and the address counter is triggered by writing a flag bit into the configuration memory. The flag bit includes at least one of the following: the second write enable signal and the flag bit data.

3. The initialization circuit of claim 1, wherein, The data in the fourth region of the configuration memory is output through the write enable signal generator, the input of which is the first write enable signal and the second write enable signal.

4. An initialization circuit in an FPGA chip, characterized by include: An embedded memory, an address counter built into the embedded memory, a configuration memory, an input / output module for the configuration memory, a data path, and N write enable signal generators, where N is the number of rows of a single code stream written to the embedded memory, determined based on the bit line width and word line width of the embedded memory and the remaining storage space of the configuration memory. The data path is used to receive data and transmit it to the input port of the input / output module. The data bit width of the input port of the input / output module is any preset bit n. The input / output module is used to transfer the data corresponding to the embedded memory in the data to the configuration memory for storage, and the bit line width is any preset bit n; The configuration memory is used to store the data required for the initialization of the embedded memory. The regions include the first to the Nth regions. Each region includes initial data, flag data, a first write enable signal, and a second write enable signal. Each of the first to Nth regions includes a write enable signal generator. The inputs of the write enable signal generators are the first enable signal and the second enable signal of each region. The outputs of each write enable signal generator are logically ORed and then input to the clock input port of the address counter. The configuration memory further includes an N+1th region for storing the chip select enable / initialization enable signal in the data transmitted by the input / output module; The embedded memory is used to operate based on the data stored in the first to N+1 regions, as well as the data output by the address counter and the write enable signal generator; In the first initialization phase, the initial data, chip select enable / write enable command, and initial address of the embedded memory are transmitted to the corresponding data input terminal, chip select enable / write enable terminal, and address input terminal of the embedded memory through the data path, the input / output module, and the first to N+1 regions, respectively. In the second initialization phase, the embedded memory writes the initial data into multiple memory cells corresponding to the initial address to initialize the N rows of addresses of the embedded memory.

5. The initialization circuit according to claim 4, characterized in that, The N is determined according to the bit line width and the word line width of the embedded memory and the remaining storage space of the configuration memory, and includes that the remaining storage space of the configuration memory is greater than the offset address of the starting address of the first to Nth region, the first and second enable signals of the first to Nth region, and The initial data occupies the sum of the storage spaces, and n is the word line width of the embedded memory. Then, the data of N rows of addresses can be written into the embedded memory by one code stream operation to complete initialization.

6. The initialization circuit of claim 4, wherein, The clock input port signal of the address counter is obtained by performing a logical XOR operation on the second enable signal and flag bit data of the first to Nth regions respectively, and then performing a logical OR operation on its output.

7. The initialization circuit of claim 4, wherein, A single bitstream operation writes data to the embedded memory, including writing initial data to the embedded memory at N rows of addresses.

8. The initialization circuit of claim 4, wherein, The initial address of the embedded memory is generated by the address counter, and the address counter is triggered by writing a flag bit into the configuration memory. The flag bit includes at least one of the following: flag bit data of the first region to the Nth region.

9. An initialization method in an FPGA chip using the initialization circuit in the FPGA chip according to any one of claims 1 to 3, characterized by, The method is applied to a data path, an input / output module, a configuration memory, and an embedded memory, including an address counter and a write enable signal generator built into the embedded memory. The input / output module transmits data received from the data path to the embedded memory, corresponding to the data in the configuration memory. The configuration memory stores the data transmitted by the input / output module in two regions: a first region and a second region, which correspond one-to-one with the data input terminal and chip select enable / write enable terminal of the embedded memory, respectively. The configuration memory also includes a third region for storing the embedded memory's flag bit data and a fourth region for storing the first and second write enable signals. The method includes: The initial address of the embedded memory is transmitted to the address input terminal of the embedded memory through the address counter; The chip select command / write enable command of the embedded memory is transmitted to the chip select enable / write enable input terminal of the embedded memory through the data path, the input / output module, and the write enable signal generator. The initialization data of the embedded memory is transmitted to the data input terminal of the embedded memory through the data path, the input / output module, and the first area. Initialization is achieved by writing initial data into multiple storage units corresponding to the initialization address through the data path, the input / output module, and the data stored in the first, second, and fourth regions.

10. A method of initializing in an FPGA chip using the initialization circuit in an FPGA chip according to any one of claims 4-8, characterized by, This system is applied to a data path, input / output module, configuration memory, embedded memory, an address counter built into the embedded memory, and N write enable signal generators, where N is the number of rows written to the embedded memory in a single code stream operation, determined based on the bit line width and word line width of the embedded memory and the remaining storage space of the configuration memory. The input / output module transmits data from the data path received to the embedded memory to the configuration memory for storage. The configuration memory stores data transmitted by the input / output module in areas from the first area to the Nth area, each area including initial data, flag data, a first write enable signal, and a second write enable signal. The configuration memory also includes an (N+1)th area for storing chip select enable / initialization enable signals transmitted by the input / output module. The method includes: The initial data of the embedded memory is transmitted to the data input terminal of the embedded memory through the data path, the input / output module, and the initial data of the first region to the Nth region. The initial address of the embedded memory is transmitted to the address input terminal of the embedded memory through the data path, the input / output module, and the address counter. The chip select enable / write enable of the embedded memory is transmitted to the chip select enable / write enable terminal of the embedded memory through the data path, the input / output module, and the N+1 region. The embedded memory writes the initial data into multiple storage units corresponding to the initialization address based on the data stored in the first to N+1 regions to achieve initialization.

Citation Information

Patent Citations

  • Programmable logic device provided with on-chip user nonvolatile memory

    CN104716954A

  • Screening and testing method of FPGA embedded multiplier

    CN109445365A