[go: up one dir, main page]

CN118152302B - Dynamic partitioning method and device for data storage area of memory on FPGA (field programmable Gate array) chip - Google Patents

Dynamic partitioning method and device for data storage area of memory on FPGA (field programmable Gate array) chip Download PDF

Info

Publication number
CN118152302B
CN118152302B CN202410590289.0A CN202410590289A CN118152302B CN 118152302 B CN118152302 B CN 118152302B CN 202410590289 A CN202410590289 A CN 202410590289A CN 118152302 B CN118152302 B CN 118152302B
Authority
CN
China
Prior art keywords
area
dynamic
user
division
fpga
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410590289.0A
Other languages
Chinese (zh)
Other versions
CN118152302A (en
Inventor
张亭亭
蔡旭伟
贾弘翊
韦嶔
张红荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XI'AN INTELLIGENCE SILICON TECHNOLOGY Inc
Original Assignee
XI'AN INTELLIGENCE SILICON TECHNOLOGY Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XI'AN INTELLIGENCE SILICON TECHNOLOGY Inc filed Critical XI'AN INTELLIGENCE SILICON TECHNOLOGY Inc
Priority to CN202410590289.0A priority Critical patent/CN118152302B/en
Publication of CN118152302A publication Critical patent/CN118152302A/en
Application granted granted Critical
Publication of CN118152302B publication Critical patent/CN118152302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7867Architectures of general purpose stored program computers comprising a single central processing unit with reconfigurable architecture

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for dynamically dividing a data storage area of an on-chip memory of an FPGA, which relate to the technical field of FPGAs, wherein the on-chip memory is an on-chip nonvolatile memory and comprises the data storage area, and the method comprises the following steps: determining a division mode selected by a user based on the region dynamic division signal; when the division mode selected by the user is dynamic division, acquiring a dynamic demarcation address set by the user; the data storage area is divided into a configuration data area and a user data area according to the dynamic demarcation address. The invention can dynamically divide the configuration data area and the user data area according to the user requirement, so that the user can use the nonvolatile memory on the FPGA chip more flexibly, and the use scene of the FPGA chip is increased.

Description

FPGA片上存储器数据存储区域动态划分方法及装置Method and device for dynamically dividing data storage area of FPGA on-chip memory

技术领域Technical Field

本发明属于FPGA技术领域,具体涉及一种FPGA片上存储器数据存储区域动态划分方法及装置。The present invention belongs to the field of FPGA technology, and in particular relates to a method and a device for dynamically dividing data storage areas of an on-chip memory of an FPGA.

背景技术Background Art

FPGA(Field Programmable Gate Array,现场可编程门阵列)器件大多基于SRAM(Static Random-Access Memory,静态随机存取存储器)结构,掉电后编程信息立即丢失,每次上电时需要将编程信息加载到FPGA片内的配置SRAM中,完成这一配置过程后,FPGA芯片才能按照用户的设计开始工作。Most FPGA (Field Programmable Gate Array) devices are based on SRAM (Static Random-Access Memory) structure. The programming information is lost immediately after power failure. Each time the power is turned on, the programming information needs to be loaded into the configuration SRAM inside the FPGA chip. After completing this configuration process, the FPGA chip can start working according to the user's design.

目前,FPGA的配置方式主要包括:主动配置、被动配置和JTAG(Joint Test ActionGroup,联合测试工作组)配置,其中,主动配置方式需要使用片外非易失性存储器或FPGA片上非易失性存储器来实现。在使用FPGA片上非易失性存储器来进行主动配置时,一般会将片上非易失性存储器划分为多个区域,如功能信息区域、配置数据区域和用户数据区域,通过不同的命令可以对片上非易失性存储器的不同区域进行读、写、擦除等操作。At present, the configuration methods of FPGA mainly include: active configuration, passive configuration and JTAG (Joint Test Action Group) configuration, among which the active configuration method needs to use off-chip non-volatile memory or FPGA on-chip non-volatile memory to implement. When using FPGA on-chip non-volatile memory for active configuration, the on-chip non-volatile memory is generally divided into multiple areas, such as function information area, configuration data area and user data area. Different commands can be used to read, write, erase and other operations on different areas of the on-chip non-volatile memory.

由于用户编程信息的数据量是随用户设计变化的,因此编程信息存储至片上非易失性存储器时所占用的空间也会变化。现有技术中在对片上非易失性存储器的配置数据区域和用户数据区域进行划分时,一种方法是,采用划分为固定区域的方式,即将配置数据区域和用户数据区域划分为固定的区域,此时需要选择容量大于配置数据区域与用户数据区域的容量之和的片上非易失性存储器,若用户使用时不需要在用户数据区域存储数据,则该区域就会被浪费;另一种方法是使片上非易失性存储器的配置数据区域通过占用一部分用户数据区域来实现扩展,但是当出现编程信息较少,而用户数据较多或者用户希望用片上非易失性存储器的全部区域来存放用户数据的情况时,则无法提供足够的空间。Since the amount of user programming information changes with the user's design, the space occupied when the programming information is stored in the on-chip non-volatile memory will also change. In the prior art, when dividing the configuration data area and the user data area of the on-chip non-volatile memory, one method is to use a method of dividing into fixed areas, that is, dividing the configuration data area and the user data area into fixed areas. At this time, it is necessary to select an on-chip non-volatile memory with a capacity greater than the sum of the capacities of the configuration data area and the user data area. If the user does not need to store data in the user data area when using it, the area will be wasted; another method is to expand the configuration data area of the on-chip non-volatile memory by occupying a part of the user data area, but when there is less programming information and more user data or the user wants to use the entire area of the on-chip non-volatile memory to store user data, it is impossible to provide enough space.

发明内容Summary of the invention

为了解决现有技术中存在的上述问题,本发明提供了一种FPGA片上存储器数据存储区域动态划分方法及装置。本发明要解决的技术问题通过以下技术方案实现:In order to solve the above problems existing in the prior art, the present invention provides a method and device for dynamically dividing the data storage area of the on-chip memory of an FPGA. The technical problem to be solved by the present invention is achieved by the following technical solutions:

第一方面,本发明提供一种FPGA片上存储器数据存储区域动态划分方法,所述片上存储器为片上非易失性存储器,包括数据存储区域;In a first aspect, the present invention provides a method for dynamically partitioning a data storage area of an on-chip memory of an FPGA, wherein the on-chip memory is an on-chip non-volatile memory, comprising a data storage area;

所述方法包括:The method comprises:

基于区域动态划分信号确定用户所选的划分方式;Determine the division method selected by the user based on the dynamic area division signal;

当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址;When the partitioning method selected by the user is dynamic partitioning, the dynamic boundary address set by the user is obtained;

根据所述动态分界地址将所述数据存储区域划分为配置数据区域和用户数据区域。The data storage area is divided into a configuration data area and a user data area according to the dynamic boundary address.

在本发明的一个实施例中,所述片上非易失性存储器还包括功能信息区域,所述FPGA包括FPGA配置模块,所述FPGA配置模块包括片上非易失性存储器控制模块;In one embodiment of the present invention, the on-chip non-volatile memory further includes a function information area, the FPGA includes an FPGA configuration module, and the FPGA configuration module includes an on-chip non-volatile memory control module;

基于区域动态划分信号确定用户所选的划分方式的步骤,包括:The step of determining the division method selected by the user based on the area dynamic division signal includes:

待FPGA上电后,利用所述片上非易失性存储器控制模块从所述功能信息区域中读取区域动态划分信号;After the FPGA is powered on, the on-chip non-volatile memory control module is used to read the dynamic area division signal from the functional information area;

根据所述区域动态划分信号,确定用户所选的划分方式。The division method selected by the user is determined according to the area dynamic division signal.

在本发明的一个实施例中,所述划分方式包括动态划分和固定划分;In one embodiment of the present invention, the division method includes dynamic division and fixed division;

根据所述区域动态划分信号,确定用户所选的划分方式的步骤,包括:The step of determining the division method selected by the user according to the area dynamic division signal comprises:

当所述区域动态划分信号为0时,表示用户所选的划分方式为固定划分;When the area dynamic division signal is 0, it indicates that the division method selected by the user is fixed division;

当所述区域动态划分信号为1时,表示用户所选的划分方式为动态划分。When the area dynamic division signal is 1, it indicates that the division method selected by the user is dynamic division.

在本发明的一个实施例中,当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址的步骤,包括:In one embodiment of the present invention, when the division mode selected by the user is dynamic division, the step of obtaining the dynamic boundary address set by the user includes:

利用所述片上非易失性存储器控制模块从所述功能信息区域中读取所述动态分界地址。The dynamic demarcation address is read from the function information area using the on-chip non-volatile memory control module.

在本发明的一个实施例中,根据所述动态分界地址将所述数据存储区域划分为配置数据区域和用户数据区域的步骤,包括:In one embodiment of the present invention, the step of dividing the data storage area into a configuration data area and a user data area according to the dynamic boundary address includes:

将所述片上非易失性存储器中地址小于或等于所述动态分界地址的区域划分为配置数据区域,并将所述片上非易失性存储器中地址大于所述动态分界地址的区域划分为用户数据区域。An area in the on-chip non-volatile memory with an address less than or equal to the dynamic demarcation address is divided into a configuration data area, and an area in the on-chip non-volatile memory with an address greater than the dynamic demarcation address is divided into a user data area.

在本发明的一个实施例中,基于区域动态划分信号确定用户所选的划分方式的步骤之后,还包括:In one embodiment of the present invention, after the step of determining the division method selected by the user based on the dynamic area division signal, the method further includes:

当用户所选的划分方式为固定划分时,将所述片上非易失性存储器中地址在16’h0000~16’h2fff范围内的区域划分为配置数据区域,并将所述片上非易失性存储器中地址在16’h3000~16’h3fff范围内的区域范围为用户数据区域。When the division method selected by the user is fixed division, the area in the address range of 16'h0000~16'h2fff in the on-chip non-volatile memory is divided into a configuration data area, and the area in the address range of 16'h3000~16'h3fff in the on-chip non-volatile memory is divided into a user data area.

第二方面,本发明还提供一种FPGA片上存储器数据存储区域动态划分装置,所述片上存储器为片上非易失性存储器,包括数据存储区域;In a second aspect, the present invention further provides a device for dynamically dividing data storage areas of an on-chip memory of an FPGA, wherein the on-chip memory is an on-chip non-volatile memory, comprising a data storage area;

所述装置包括:The device comprises:

确定模块,用于基于区域动态划分信号确定用户所选的划分方式;A determination module, used to determine the division method selected by the user based on the area dynamic division signal;

获取模块,当用户所选的划分方式为动态划分时,用于获取用户设置的动态分界地址;The acquisition module is used to acquire the dynamic boundary address set by the user when the division mode selected by the user is dynamic division;

划分模块,用于根据所述动态分界地址将所述数据存储区域划分为配置数据区域和用户数据区域。The partitioning module is used to partition the data storage area into a configuration data area and a user data area according to the dynamic boundary address.

与现有技术相比,本发明的有益效果在于:Compared with the prior art, the present invention has the following beneficial effects:

本发明提供一种FPGA片上存储器数据存储区域动态划分方法及装置,在进行划分时,首先基于区域动态划分信号确定用户所选的划分方式,当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址,最后根据动态分界地址将数据存储区域划分为配置数据区域和用户数据区域。本发明可以根据用户需求动态划分配置数据区域与用户数据区域,使用户更加灵活地使用FPGA片上非易失性存储器,增加了FPGA芯片的使用场景。The present invention provides a method and device for dynamically dividing the data storage area of an FPGA on-chip memory. When dividing, firstly, the division method selected by the user is determined based on the regional dynamic division signal. When the division method selected by the user is dynamic division, the dynamic boundary address set by the user is obtained, and finally the data storage area is divided into a configuration data area and a user data area according to the dynamic boundary address. The present invention can dynamically divide the configuration data area and the user data area according to user needs, so that the user can use the FPGA on-chip non-volatile memory more flexibly, and increase the use scenarios of the FPGA chip.

以下将结合附图及实施例对本发明做进一步详细说明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明实施例提供的FPGA片上存储器数据存储区域动态划分方法的一种流程图;1 is a flow chart of a method for dynamically partitioning data storage areas in an FPGA on-chip memory provided by an embodiment of the present invention;

图2是本发明实施例提供的片上非易失性存储器数据存储区域动态划分方式的示意图;2 is a schematic diagram of a method for dynamically dividing data storage areas of an on-chip non-volatile memory provided by an embodiment of the present invention;

图3是本发明实施例提供的片上非易失性存储器数据存储区域固定划分方式的示意图;3 is a schematic diagram of a fixed partitioning method of an on-chip non-volatile memory data storage area provided by an embodiment of the present invention;

图4是本发明实施例提供的FPGA片上存储器数据存储区域动态划分装置的一种结构示意图。FIG. 4 is a schematic diagram of a structure of a device for dynamically dividing data storage areas in an on-chip memory of an FPGA provided by an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面结合具体实施例对本发明做进一步详细的描述,但本发明的实施方式不限于此。The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

图1是本发明实施例提供的FPGA片上存储器数据存储区域动态划分方法的一种流程图。请参见图1,本发明实施例提供一种FPGA片上存储器数据存储区域动态划分方法,片上存储器为片上非易失性存储器,包括数据存储区域;Fig. 1 is a flow chart of a method for dynamically dividing data storage areas of an FPGA on-chip memory provided by an embodiment of the present invention. Referring to Fig. 1, an embodiment of the present invention provides a method for dynamically dividing data storage areas of an FPGA on-chip memory, wherein the on-chip memory is an on-chip non-volatile memory, including a data storage area;

上述方法包括:The above methods include:

S1、基于区域动态划分信号确定用户所选的划分方式;S1. Determine the division method selected by the user based on the dynamic area division signal;

S2、当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址;S2. When the partitioning method selected by the user is dynamic partitioning, obtaining the dynamic boundary address set by the user;

S3、根据动态分界地址将数据存储区域划分为配置数据区域和用户数据区域。S3. Divide the data storage area into a configuration data area and a user data area according to the dynamic boundary address.

应当理解,用户编程信息的数据量是随用户设计变化的,若用户设计时使用的FPGA逻辑资源较少,则编程信息的数据量也会较小,反之若用户设计时使用的FPGA逻辑资源较多或者使用了EBR(Embedded Block RAM,嵌入式块RAM),则编程信息的数据量会较大。因此,编程信息存储至片上非易失性存储器时,所占用的空间也会变化。It should be understood that the amount of user programming information varies with the user design. If the user uses fewer FPGA logic resources during design, the amount of programming information data will also be smaller. On the contrary, if the user uses more FPGA logic resources during design or uses EBR (Embedded Block RAM), the amount of programming information data will be larger. Therefore, when the programming information is stored in the on-chip non-volatile memory, the space occupied will also change.

本实施例中,FPGA片上非易失性存储器包括数据存储区域,数据存储区域进一步包括配置数据区域和用户数据区域,其中,配置数据区域用于存储用户编程信息,用户数据区域用于存储其他用户数据。可选地,用户通过FPGA的配套软件选择片上非易失性存储器中配置数据区域与用户数据区域的划分方式,如若选择动态划分方式,则用户需要同时设置动态分界地址;接着,该软件生成相应的读写命令,将用户设置的划分方式、动态分界地址等信息以区域动态划分信号的形式存储至FPGA片上非易失性存储器。因此,在对FPGA片上非易失性存储器的数据存储区域进行划分时,可以通过区域动态划分信号确定用户所选的划分方式。In this embodiment, the FPGA on-chip non-volatile memory includes a data storage area, and the data storage area further includes a configuration data area and a user data area, wherein the configuration data area is used to store user programming information, and the user data area is used to store other user data. Optionally, the user selects the division method of the configuration data area and the user data area in the on-chip non-volatile memory through the supporting software of the FPGA. If the dynamic division method is selected, the user needs to set the dynamic boundary address at the same time; then, the software generates corresponding read and write commands, and stores the division method, dynamic boundary address and other information set by the user in the form of a regional dynamic division signal to the FPGA on-chip non-volatile memory. Therefore, when dividing the data storage area of the FPGA on-chip non-volatile memory, the division method selected by the user can be determined by the regional dynamic division signal.

需要说明的是,用户编程信息是指用户通过FPGA的配套软件将设计的代码转换成配置比特流文件时,配置比特流文件中包含的信息,利用FPGA相应接口将配置比特流文件中的用户编程信息写入配置SRAM的过程即为“配置”。一般来说,配置方法有多种,其中一种是利用片上非易失性存储器来进行,此时就需要将配置比特流文件中的用户编程信息存储至片上非易失性存储器的配置数据区域。It should be noted that user programming information refers to the information contained in the configuration bitstream file when the user converts the designed code into the configuration bitstream file through the supporting software of the FPGA. The process of writing the user programming information in the configuration bitstream file into the configuration SRAM using the corresponding interface of the FPGA is called "configuration". Generally speaking, there are many configuration methods, one of which is to use the on-chip non-volatile memory. At this time, the user programming information in the configuration bitstream file needs to be stored in the configuration data area of the on-chip non-volatile memory.

可选地,步骤S2~S3中,当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址,从而根据动态分界地址将数据存储区域划分为配置数据区域与用户数据区域这两部分。Optionally, in steps S2 to S3, when the division method selected by the user is dynamic division, a dynamic boundary address set by the user is obtained, so that the data storage area is divided into two parts, a configuration data area and a user data area, according to the dynamic boundary address.

可见,本发明提供的FPGA片上存储器数据存储区域动态划分方法可以根据用户需求动态划分配置数据区域与用户数据区域,使用户更加灵活地使用FPGA片上非易失性存储器,增加了FPGA芯片的使用场景。It can be seen that the method for dynamically dividing the data storage area of the FPGA on-chip memory provided by the present invention can dynamically divide the configuration data area and the user data area according to user needs, allowing users to use the FPGA on-chip non-volatile memory more flexibly and increasing the use scenarios of the FPGA chip.

进一步地,上述片上非易失性存储器还包括功能信息区域,FPGA包括FPGA配置模块,FPGA配置模块包括片上非易失性存储器控制模块;Furthermore, the on-chip non-volatile memory further includes a function information area, the FPGA includes an FPGA configuration module, and the FPGA configuration module includes an on-chip non-volatile memory control module;

步骤S1中,基于区域动态划分信号确定用户所选的划分方式的步骤,包括:In step S1, the step of determining the division method selected by the user based on the area dynamic division signal includes:

S101、待FPGA上电后,利用片上非易失性存储器控制模块从功能信息区域中读取区域动态划分信号;S101, after the FPGA is powered on, using the on-chip non-volatile memory control module to read the dynamic area division signal from the function information area;

S102、根据区域动态划分信号,确定用户所选的划分方式。S102: Determine the division method selected by the user according to the regional dynamic division signal.

本实施例中,片上非易失性存储器还包括功能信息区域,在用户通过FPGA的配套软件设置好划分方式后,该软件生成功能信息区域的读写命令,将用户设置的划分方式等信息以区域动态划分信号的形式,存储至片上非易失性存储器的功能信息区域。In this embodiment, the on-chip non-volatile memory also includes a functional information area. After the user sets the division method through the supporting software of the FPGA, the software generates read and write commands for the functional information area, and stores the division method and other information set by the user in the form of a dynamic regional division signal in the functional information area of the on-chip non-volatile memory.

FPGA上电后,配置过程启动,FPGA配置模块可以利用片上非易失性存储器控制模块从功能信息区域读取区域动态划分信号并进行判断。After the FPGA is powered on, the configuration process starts, and the FPGA configuration module can use the on-chip non-volatile memory control module to read the area dynamic division signal from the functional information area and make a judgment.

图2是本发明实施例提供的片上非易失性存储器数据存储区域动态划分方式的示意图,图3是本发明实施例提供的片上非易失性存储器数据存储区域固定划分方式的示意图。请结合图2-3,本实施例中,划分方式包括动态划分和固定划分;Figure 2 is a schematic diagram of a dynamic partitioning method of an on-chip non-volatile memory data storage area provided by an embodiment of the present invention, and Figure 3 is a schematic diagram of a fixed partitioning method of an on-chip non-volatile memory data storage area provided by an embodiment of the present invention. Please refer to Figures 2-3. In this embodiment, the partitioning method includes dynamic partitioning and fixed partitioning;

根据区域动态划分信号,确定用户所选的划分方式的步骤,包括:The step of dynamically dividing the signal according to the region and determining the division method selected by the user comprises:

当区域动态划分信号为0时,表示用户所选的划分方式为固定划分;When the area dynamic division signal is 0, it means that the division method selected by the user is fixed division;

当区域动态划分信号为1时,表示用户所选的划分方式为动态划分。When the area dynamic division signal is 1, it means that the division method selected by the user is dynamic division.

请继续参见图2,当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址的步骤,包括:Please continue to refer to FIG. 2 . When the division mode selected by the user is dynamic division, the step of obtaining the dynamic boundary address set by the user includes:

利用片上非易失性存储器控制模块从功能信息区域中读取动态分界地址。The dynamic demarcation address is read from the function information area using the on-chip non-volatile memory control module.

进一步地,根据动态分界地址将数据存储区域划分为配置数据区域和用户数据区域的步骤,包括:Further, the step of dividing the data storage area into a configuration data area and a user data area according to the dynamic boundary address includes:

将片上非易失性存储器中地址小于或等于动态分界地址的区域划分为配置数据区域,并将片上非易失性存储器中地址大于动态分界地址的区域划分为用户数据区域。An area in the on-chip nonvolatile memory with an address less than or equal to the dynamic demarcation address is divided into a configuration data area, and an area in the on-chip nonvolatile memory with an address greater than the dynamic demarcation address is divided into a user data area.

具体而言,当判断出用户所选的划分方式为动态划分方式时,将片上非易失性存储器中地址小于或等于动态分界地址的区域划分为配置数据区域,即FPGA配置模块接收到读写配置数据区域的相关命令时,只会对片上非易失性存储器中地址小于或等于该动态分界地址的区域进行读写操作;同时,将片上非易失性存储器中地址大于动态分界地址的区域划分为用户数据区域,即FPGA配置模块接收到读写用户数据区域的相关命令时,仅对片上非易失性存储器中地址大于分界地址的区域进行读写操作。Specifically, when it is determined that the division method selected by the user is a dynamic division method, the area in the on-chip non-volatile memory whose address is less than or equal to the dynamic boundary address is divided into a configuration data area, that is, when the FPGA configuration module receives relevant commands for reading and writing the configuration data area, it will only perform read and write operations on the area in the on-chip non-volatile memory whose address is less than or equal to the dynamic boundary address; at the same time, the area in the on-chip non-volatile memory whose address is greater than the dynamic boundary address is divided into a user data area, that is, when the FPGA configuration module receives relevant commands for reading and writing the user data area, it will only perform read and write operations on the area in the on-chip non-volatile memory whose address is greater than the boundary address.

可选地,基于区域动态划分信号确定用户所选的划分方式的步骤之后,还包括:Optionally, after the step of determining the division method selected by the user based on the dynamic area division signal, the method further includes:

当用户所选的划分方式为固定划分时,将片上非易失性存储器中地址在16’h0000~16’h2fff范围内的区域划分为配置数据区域,并将片上非易失性存储器中地址在16’h3000~16’h3fff范围内的区域划分为用户数据区域。When the partitioning method selected by the user is fixed partitioning, the area in the address range of 16'h0000~16'h2fff in the on-chip non-volatile memory is divided into the configuration data area, and the area in the address range of 16'h3000~16'h3fff in the on-chip non-volatile memory is divided into the user data area.

具体而言,若用户所选的划分方式为固定划分方式时,那么片上非易失性存储器中地址在16’h0000~16’h2fff范围内的区域被划分为配置数据区域,FPGA配置模块接收到读写配置数据区域的相关命令时,只对片上非易失性存储器中地址为16’h0000~16’h2fff的区域进行读写操作,与此同时,片上非易失性存储器中地址在16’h3000~16’h3fff范围内的区域范围被划分为用户数据区域,FPGA配置模块接收到读写用户数据区域的相关命令时,只对片上非易失性存储器中地址为16’h3000~16’h3fff的区域进行读写操作。Specifically, if the division method selected by the user is a fixed division method, then the area in the on-chip non-volatile memory with an address range of 16’h0000~16’h2fff is divided into the configuration data area. When the FPGA configuration module receives the relevant command to read and write the configuration data area, it only performs read and write operations on the area in the on-chip non-volatile memory with an address range of 16’h0000~16’h2fff. At the same time, the area in the on-chip non-volatile memory with an address range of 16’h3000~16’h3fff is divided into the user data area. When the FPGA configuration module receives the relevant command to read and write the user data area, it only performs read and write operations on the area in the on-chip non-volatile memory with an address range of 16’h3000~16’h3fff.

图4是本发明实施例提供的FPGA片上存储器数据存储区域动态划分装置的一种结构示意图。如图4所示,本发明实施例还提供一种FPGA片上存储器数据存储区域动态划分装置,片上存储器为片上非易失性存储器,包括数据存储区域;Fig. 4 is a schematic diagram of a structure of a device for dynamically dividing data storage areas of an FPGA on-chip memory provided by an embodiment of the present invention. As shown in Fig. 4, an embodiment of the present invention further provides a device for dynamically dividing data storage areas of an FPGA on-chip memory, wherein the on-chip memory is an on-chip non-volatile memory, including a data storage area;

上述装置包括:The above device comprises:

确定模块410,用于基于区域动态划分信号确定用户所选的划分方式;A determination module 410, configured to determine a division method selected by a user based on a dynamic area division signal;

获取模块420,当用户所选的划分方式为动态划分时,用于获取用户设置的动态分界地址;The acquisition module 420 is used to acquire the dynamic boundary address set by the user when the division mode selected by the user is dynamic division;

划分模块430,用于根据动态分界地址将数据存储区域划分为配置数据区域和用户数据区域。The partitioning module 430 is used to partition the data storage area into a configuration data area and a user data area according to the dynamic boundary address.

通过上述各实施例可知,本发明的有益效果在于:It can be seen from the above embodiments that the beneficial effects of the present invention are:

本发明提供一种FPGA片上存储器数据存储区域动态划分方法及装置,在进行划分时,首先基于区域动态划分信号确定用户所选的划分方式,当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址,最后根据动态分界地址将数据存储区域划分为配置数据区域和用户数据区域。本发明可以根据用户需求动态划分配置数据区域与用户数据区域,使用户更加灵活地使用FPGA片上非易失性存储器,增加了FPGA芯片的使用场景。The present invention provides a method and device for dynamically dividing the data storage area of an FPGA on-chip memory. When dividing, the division method selected by the user is first determined based on the regional dynamic division signal. When the division method selected by the user is dynamic division, the dynamic boundary address set by the user is obtained, and finally the data storage area is divided into a configuration data area and a user data area according to the dynamic boundary address. The present invention can dynamically divide the configuration data area and the user data area according to user needs, so that the user can use the FPGA on-chip non-volatile memory more flexibly, and increase the use scenarios of the FPGA chip.

在本发明的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。此外,本领域的技术人员可以将本说明书中描述的不同实施例或示例进行接合和组合。In the description of the present invention, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification.

以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims (4)

1.一种FPGA片上存储器数据存储区域动态划分方法,其特征在于,所述片上存储器为片上非易失性存储器,包括数据存储区域;1. A method for dynamically partitioning data storage areas of an on-chip memory of an FPGA, characterized in that the on-chip memory is an on-chip non-volatile memory, comprising a data storage area; 所述方法包括:The method comprises: 基于区域动态划分信号确定用户所选的划分方式;Determine the division method selected by the user based on the dynamic area division signal; 当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址;When the partitioning method selected by the user is dynamic partitioning, the dynamic boundary address set by the user is obtained; 根据所述动态分界地址将所述数据存储区域划分为配置数据区域和用户数据区域;Dividing the data storage area into a configuration data area and a user data area according to the dynamic boundary address; 所述片上非易失性存储器还包括功能信息区域,所述FPGA包括FPGA配置模块,所述FPGA配置模块包括片上非易失性存储器控制模块;The on-chip non-volatile memory further includes a function information area, the FPGA includes an FPGA configuration module, and the FPGA configuration module includes an on-chip non-volatile memory control module; 基于区域动态划分信号确定用户所选的划分方式的步骤,包括:The step of determining the division method selected by the user based on the area dynamic division signal includes: 待FPGA上电后,利用所述片上非易失性存储器控制模块从所述功能信息区域中读取区域动态划分信号;After the FPGA is powered on, the on-chip non-volatile memory control module is used to read the dynamic area division signal from the functional information area; 根据所述区域动态划分信号,确定用户所选的划分方式;Determining the division method selected by the user according to the area dynamic division signal; 其中,所述划分方式包括动态划分和固定划分;Wherein, the division method includes dynamic division and fixed division; 根据所述区域动态划分信号,确定用户所选的划分方式的步骤,包括:The step of determining the division method selected by the user according to the area dynamic division signal comprises: 当所述区域动态划分信号为0时,表示用户所选的划分方式为固定划分;When the area dynamic division signal is 0, it indicates that the division method selected by the user is fixed division; 当所述区域动态划分信号为1时,表示用户所选的划分方式为动态划分;When the area dynamic division signal is 1, it indicates that the division method selected by the user is dynamic division; 当用户所选的划分方式为动态划分时,获取用户设置的动态分界地址的步骤,包括:When the partitioning method selected by the user is dynamic partitioning, the step of obtaining the dynamic boundary address set by the user includes: 利用所述片上非易失性存储器控制模块从所述功能信息区域中读取所述动态分界地址;其中,用户设置的划分方式和所述动态分界地址,以所述区域动态划分信号的形式,通过功能信息区域的读写命令预先存储在FPGA片上非易失性存储器内。The dynamic boundary address is read from the functional information area using the on-chip non-volatile memory control module; wherein the division method set by the user and the dynamic boundary address are pre-stored in the FPGA on-chip non-volatile memory in the form of the dynamic division signal of the area through the read and write commands of the functional information area. 2.根据权利要求1所述的FPGA片上存储器数据存储区域动态划分方法,其特征在于,根据所述动态分界地址将所述数据存储区域划分为配置数据区域和用户数据区域的步骤,包括:2. The method for dynamically dividing the data storage area of the FPGA on-chip memory according to claim 1, characterized in that the step of dividing the data storage area into a configuration data area and a user data area according to the dynamic boundary address comprises: 将所述片上非易失性存储器中地址小于或等于所述动态分界地址的区域划分为配置数据区域,并将所述片上非易失性存储器中地址大于所述动态分界地址的区域划分为用户数据区域。An area in the on-chip non-volatile memory with an address less than or equal to the dynamic demarcation address is divided into a configuration data area, and an area in the on-chip non-volatile memory with an address greater than the dynamic demarcation address is divided into a user data area. 3.根据权利要求1所述的FPGA片上存储器数据存储区域动态划分方法,其特征在于,基于区域动态划分信号确定用户所选的划分方式的步骤之后,还包括:3. The method for dynamically dividing the data storage area of the FPGA on-chip memory according to claim 1, characterized in that after the step of determining the division method selected by the user based on the area dynamic division signal, it also includes: 当用户所选的划分方式为固定划分时,将所述片上非易失性存储器中地址在16’h0000~16’h2fff范围内的区域划分为配置数据区域,并将所述片上非易失性存储器中地址在16’h3000~16’h3fff范围内的区域范围为用户数据区域。When the division method selected by the user is fixed division, the area in the address range of 16'h0000~16'h2fff in the on-chip non-volatile memory is divided into a configuration data area, and the area in the address range of 16'h3000~16'h3fff in the on-chip non-volatile memory is divided into a user data area. 4.一种FPGA片上存储器数据存储区域动态划分装置,其特征在于,所述片上存储器为片上非易失性存储器,包括数据存储区域;4. A device for dynamically dividing data storage areas of an on-chip memory of an FPGA, characterized in that the on-chip memory is an on-chip non-volatile memory, comprising a data storage area; 所述装置包括:The device comprises: 确定模块,用于基于区域动态划分信号确定用户所选的划分方式;A determination module, used to determine the division method selected by the user based on the area dynamic division signal; 获取模块,当用户所选的划分方式为动态划分时,用于获取用户设置的动态分界地址;The acquisition module is used to acquire the dynamic boundary address set by the user when the division mode selected by the user is dynamic division; 划分模块,用于根据所述动态分界地址将所述数据存储区域划分为配置数据区域和用户数据区域;A partitioning module, used for partitioning the data storage area into a configuration data area and a user data area according to the dynamic boundary address; 所述片上非易失性存储器还包括功能信息区域,所述FPGA包括FPGA配置模块,所述FPGA配置模块包括片上非易失性存储器控制模块;The on-chip non-volatile memory further includes a function information area, the FPGA includes an FPGA configuration module, and the FPGA configuration module includes an on-chip non-volatile memory control module; 所述确定模块具体用于:待FPGA上电后,利用所述片上非易失性存储器控制模块从所述功能信息区域中读取区域动态划分信号;根据所述区域动态划分信号,确定用户所选的划分方式;The determination module is specifically used to: after the FPGA is powered on, use the on-chip non-volatile memory control module to read the dynamic area division signal from the functional information area; and determine the division method selected by the user according to the dynamic area division signal; 其中,所述划分方式包括动态划分和固定划分;Wherein, the division method includes dynamic division and fixed division; 根据所述区域动态划分信号,确定用户所选的划分方式的步骤,包括:The step of determining the division method selected by the user according to the area dynamic division signal comprises: 当所述区域动态划分信号为0时,表示用户所选的划分方式为固定划分;When the area dynamic division signal is 0, it indicates that the division method selected by the user is fixed division; 当所述区域动态划分信号为1时,表示用户所选的划分方式为动态划分;When the area dynamic division signal is 1, it indicates that the division method selected by the user is dynamic division; 所述获取模块用于,利用所述片上非易失性存储器控制模块从所述功能信息区域中读取所述动态分界地址;其中,用户设置的划分方式和所述动态分界地址,以所述区域动态划分信号的形式,通过功能信息区域的读写命令预先存储在FPGA片上非易失性存储器内。The acquisition module is used to use the on-chip non-volatile memory control module to read the dynamic boundary address from the functional information area; wherein the division method set by the user and the dynamic boundary address are pre-stored in the FPGA on-chip non-volatile memory in the form of the area dynamic division signal through the read and write commands of the functional information area.
CN202410590289.0A 2024-05-13 2024-05-13 Dynamic partitioning method and device for data storage area of memory on FPGA (field programmable Gate array) chip Active CN118152302B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410590289.0A CN118152302B (en) 2024-05-13 2024-05-13 Dynamic partitioning method and device for data storage area of memory on FPGA (field programmable Gate array) chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410590289.0A CN118152302B (en) 2024-05-13 2024-05-13 Dynamic partitioning method and device for data storage area of memory on FPGA (field programmable Gate array) chip

Publications (2)

Publication Number Publication Date
CN118152302A CN118152302A (en) 2024-06-07
CN118152302B true CN118152302B (en) 2024-09-10

Family

ID=91290642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410590289.0A Active CN118152302B (en) 2024-05-13 2024-05-13 Dynamic partitioning method and device for data storage area of memory on FPGA (field programmable Gate array) chip

Country Status (1)

Country Link
CN (1) CN118152302B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567362A (en) * 2003-06-10 2005-01-19 大唐微电子技术有限公司 IC smart card with dynamic logic sectorization and access right control function and implementing method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103221927A (en) * 2010-11-24 2013-07-24 索尼爱立信移动通讯有限公司 Dynamically configurable embedded flash memory for electronic devices
CN112947996B (en) * 2021-05-14 2021-08-27 南京芯驰半导体科技有限公司 Off-chip nonvolatile memory dynamic loading system and method based on virtual mapping
CN113485947B (en) * 2021-06-15 2024-08-23 翱捷科技股份有限公司 Automatic storage domain division method and device for embedded system
CN114385077A (en) * 2021-12-15 2022-04-22 成都航天通信设备有限责任公司 FPGA signal modulation and demodulation dynamic reconstruction method, device, system and storage medium
CN116521614B (en) * 2023-07-05 2023-09-15 西安智多晶微电子有限公司 FPGA dynamic local reconfiguration method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567362A (en) * 2003-06-10 2005-01-19 大唐微电子技术有限公司 IC smart card with dynamic logic sectorization and access right control function and implementing method thereof

Also Published As

Publication number Publication date
CN118152302A (en) 2024-06-07

Similar Documents

Publication Publication Date Title
US11237765B2 (en) Data writing method and storage device
CN110534140B (en) Memory device, memory system and method of operating the memory device
US8463826B2 (en) Incremental garbage collection for non-volatile memories
TWI386802B (en) Data writing method for flash memory and control circuit and storage system using the same
US8028119B2 (en) Memory module, cache system and address conversion method
US6836434B2 (en) Mode selection in a flash memory device
CN1717662B (en) Memory modules, memory systems and information instruments
JP4059002B2 (en) Memory device
KR100780861B1 (en) Flash memory device and flash memory system including buffer memory
CN103123608A (en) Method and device for rearranging addressable spaces in memory device
CN100456272C (en) Systems and methods for booting with flash memory
US20090150597A1 (en) Data writing method for flash memory and controller using the same
US20100095089A1 (en) Multiprocessor system with multiport memory
CN103559146B (en) A kind of method improving NAND flash controller read or write speed
JPH06290106A (en) Flash memory card with operable/in-use mask register and operable/in-use mode register
WO2011013351A1 (en) Access device and memory controller
US20140293712A1 (en) Memory system and method of operating memory system
US20090235012A1 (en) Using lpddr1 bus as transport layer to communicate to flash
CN112540953A (en) System on chip realized based on FPGA and MCU
JP2007193865A (en) Information recording device and its control method
JP2013016148A (en) Memory controller and nonvolatile storage
CN118152302B (en) Dynamic partitioning method and device for data storage area of memory on FPGA (field programmable Gate array) chip
US10474364B2 (en) Memory control device and method
CN102708923A (en) Semiconductor integrated circuit and control method
JP2007034581A (en) Memory controller, flash memory system and method for controlling flash memory

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant