[go: up one dir, main page]

CN118841053A - FPGA system based on PSRAM particles and control method and equipment thereof - Google Patents

FPGA system based on PSRAM particles and control method and equipment thereof Download PDF

Info

Publication number
CN118841053A
CN118841053A CN202411312364.3A CN202411312364A CN118841053A CN 118841053 A CN118841053 A CN 118841053A CN 202411312364 A CN202411312364 A CN 202411312364A CN 118841053 A CN118841053 A CN 118841053A
Authority
CN
China
Prior art keywords
psram
module
delay
lut
read
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.)
Granted
Application number
CN202411312364.3A
Other languages
Chinese (zh)
Other versions
CN118841053B (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.)
Guangdong Jiangxin Chuang Technology Co ltd
Original Assignee
Guangdong Jiangxin Chuang Technology Co ltd
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 Guangdong Jiangxin Chuang Technology Co ltd filed Critical Guangdong Jiangxin Chuang Technology Co ltd
Priority to CN202411312364.3A priority Critical patent/CN118841053B/en
Publication of CN118841053A publication Critical patent/CN118841053A/en
Application granted granted Critical
Publication of CN118841053B publication Critical patent/CN118841053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C11/00Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
    • G11C11/21Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements
    • G11C11/34Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices
    • G11C11/40Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors
    • G11C11/41Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors forming static cells with positive feedback, i.e. cells not needing refreshing or charge regeneration, e.g. bistable multivibrator or Schmitt trigger
    • G11C11/413Auxiliary circuits, e.g. for addressing, decoding, driving, writing, sensing, timing or power reduction
    • G11C11/417Auxiliary circuits, e.g. for addressing, decoding, driving, writing, sensing, timing or power reduction for memory cells of the field-effect type
    • G11C11/419Read-write [R-W] circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4027Coupling between buses using bus bridges
    • G06F13/4031Coupling between buses using bus bridges with arbitration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Dram (AREA)

Abstract

本申请公开了一种基于PSRAM颗粒的FPGA系统及其控制方法、设备,涉及集成电路技术领域。FPGA系统包括:PSRAM控制器,包括:内部总线模块、与内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块;单颗粒通道模块包括:IO接口模块、依次连接在内部总线模块与IO接口模块之间的写数据通道和LUT输出延时模块、依次连接在内部总线模块与IO接口模块之间的读数据通道和LUT采样延时模块;至少两个PSRAM颗粒,每个PSRAM颗粒对应地与一个IO接口模块通信连接;能够在FPGA系统中实现具有一定的通用性的延时功能,能实现相互独立的多路通信,从而减少数据拥塞,提高数据处理效率和带宽利用率。

The present application discloses an FPGA system based on PSRAM particles and its control method and equipment, which relate to the field of integrated circuit technology. The FPGA system includes: a PSRAM controller, including: an internal bus module, an automatic training module connected to the internal bus module, and at least two single-particle channel modules; the single-particle channel module includes: an IO interface module, a write data channel and a LUT output delay module connected in sequence between the internal bus module and the IO interface module, and a read data channel and a LUT sampling delay module connected in sequence between the internal bus module and the IO interface module; at least two PSRAM particles, each PSRAM particle correspondingly connected to an IO interface module; it can realize a delay function with certain versatility in the FPGA system, and can realize mutually independent multi-channel communication, thereby reducing data congestion and improving data processing efficiency and bandwidth utilization.

Description

基于PSRAM颗粒的FPGA系统及其控制方法、设备FPGA system based on PSRAM particles and its control method and device

技术领域Technical Field

本申请涉及集成电路技术领域,尤其是一种基于PSRAM颗粒的FPGA系统及其控制方法、设备。The present application relates to the field of integrated circuit technology, and in particular to a PSRAM particle-based FPGA system and a control method and device thereof.

背景技术Background Art

目前,随着集成电路的发展,一方面现场可编程门阵列(Field-ProgrammableGate Array,FPGA)作为专用集成电路领域中的一种半定制电路,因其可重构、逻辑资源丰富、输入输出接口灵活等特点被广泛应用于各种领域。另一方面PSRAM(Pseudo staticrandom access memory,伪静态随机存储器),因其高数据传输速率,同样在很多领域中得到广泛应用。基于FPGA的特点和PSRAM的特点,二者的结合可广泛应用于图像视频时序控制系统、工业控制系统等多个领域。在ASIC芯片设计中,PSRAM控制器可以使用模拟工程师设计延迟锁相环(Delay-locked Loop,DLL)对输入采样信号及时钟进行延时,从而实现多相位采样的效果。在FPGA中存在部分类似DLL原语逻辑资源,以xilinx为例,存在IDELAY以及IDDR等原语逻辑资源,使用这些资源能够部分实现DLL功能。但并不是所有选型FPGA芯片都有合适的延时资源可以使用,使用原语逻辑资源实现延时功能的具有一定的局限性。此外,在多PSRAM颗粒的FPGA系统中,多个PSRAM颗粒返回数据不同时,数据不同步,容易造成数据拥塞,且PSRAM控制器需要等待不同数量的时钟周期才接收到数据,导致带宽利用率不高。At present, with the development of integrated circuits, on the one hand, Field-Programmable Gate Array (FPGA), as a semi-custom circuit in the field of application-specific integrated circuits, is widely used in various fields due to its reconfigurable, rich logic resources, and flexible input and output interfaces. On the other hand, PSRAM (Pseudo static random access memory) is also widely used in many fields due to its high data transmission rate. Based on the characteristics of FPGA and PSRAM, the combination of the two can be widely used in many fields such as image video timing control systems and industrial control systems. In ASIC chip design, the PSRAM controller can use the delay-locked loop (DLL) designed by analog engineers to delay the input sampling signal and clock, thereby achieving the effect of multi-phase sampling. There are some DLL-like primitive logic resources in FPGA. Taking Xilinx as an example, there are primitive logic resources such as IDELAY and IDDR. Using these resources can partially realize the DLL function. However, not all selected FPGA chips have suitable delay resources to use. Using primitive logic resources to realize the delay function has certain limitations. In addition, in an FPGA system with multiple PSRAM particles, when multiple PSRAM particles return different data, the data is not synchronized, which easily causes data congestion, and the PSRAM controller needs to wait for different numbers of clock cycles to receive data, resulting in low bandwidth utilization.

发明内容Summary of the invention

本申请旨在至少解决现有技术中存在的技术问题之一。为此,本申请提出一种基于PSRAM颗粒的FPGA系统及其控制方法、设备,能够基于LUT查找表在FPGA系统中实现具有一定的通用性的延时功能,能在PSRAM控制器和多个PSRAM颗粒之间实现相互独立的多路通信,从而减少数据拥塞,提高数据处理效率和带宽利用率。The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes an FPGA system based on PSRAM particles and a control method and device thereof, which can realize a delay function with certain versatility in the FPGA system based on a LUT lookup table, and can realize independent multi-channel communication between a PSRAM controller and multiple PSRAM particles, thereby reducing data congestion and improving data processing efficiency and bandwidth utilization.

第一方面,本申请实施例提供了一种基于PSRAM颗粒的FPGA系统,包括:In a first aspect, an embodiment of the present application provides an FPGA system based on PSRAM particles, including:

PSRAM控制器,包括:内部总线模块、与所述内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块;The PSRAM controller comprises: an internal bus module, an automatic training module communicatively connected to the internal bus module, and at least two single-grain channel modules;

所述单颗粒通道模块包括:IO接口模块、依次连接在所述内部总线模块与所述IO接口模块之间的写数据通道和LUT输出延时模块、依次连接在所述内部总线模块与所述IO接口模块之间的读数据通道和LUT采样延时模块;The single particle channel module includes: an IO interface module, a write data channel and a LUT output delay module connected in sequence between the internal bus module and the IO interface module, and a read data channel and a LUT sampling delay module connected in sequence between the internal bus module and the IO interface module;

至少两个PSRAM颗粒,每个所述PSRAM颗粒对应地与一个所述IO接口模块通信连接;所述PSRAM颗粒与所述单颗粒通道模块的数量相等;At least two PSRAM particles, each of which is correspondingly connected to one of the IO interface modules for communication; the number of the PSRAM particles is equal to the number of the single-particle channel modules;

所述PSRAM控制器用于:The PSRAM controller is used to:

启动所述自动训练模块进行相位粗调处理和相位细调处理,确定目标采样相位;相位训练完成后,通过所述内部总线模块响应于接收的数据读写请求,从所述数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址;对所述数据读写请求进行读写仲裁,确定对所述待访问的PSRAM颗粒进行的操作的类型;所述操作的类型包括:读操作和写操作;根据所述操作的类型,通过对应的所述单颗粒通道模块的延时处理,以所述目标采样相位对所述PSRAM目标地址所指示的所述PSRAM颗粒进行操作;所述延时处理包括:所述LUT输出延时模块在所述写操作中进行的输出延时处理,所述LUT采样延时模块在所述读操作中进行的采样延时处理。The automatic training module is started to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase; after the phase training is completed, the internal bus module responds to the received data read and write request, and determines the PSRAM target address of at least one PSRAM particle to be accessed from the data read and write request; the data read and write request is subjected to read and write arbitration to determine the type of operation performed on the PSRAM particle to be accessed; the type of operation includes: read operation and write operation; according to the type of operation, the PSRAM particle indicated by the PSRAM target address is operated with the target sampling phase through the delay processing of the corresponding single-particle channel module; the delay processing includes: the output delay processing performed by the LUT output delay module in the write operation, and the sampling delay processing performed by the LUT sampling delay module in the read operation.

第二方面,本申请实施例提供了一种基于PSRAM颗粒的FPGA系统的控制方法,应用于如第一方面实施例任一项所述的基于PSRAM颗粒的FPGA系统;所述FPGA系统包括:PSRAM控制器,包括:内部总线模块、与所述内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块;所述单颗粒通道模块包括:IO接口模块、LUT输出延时模块、LUT采样延时模块;至少两个PSRAM颗粒;In a second aspect, an embodiment of the present application provides a control method for an FPGA system based on PSRAM particles, which is applied to an FPGA system based on PSRAM particles as described in any one of the embodiments of the first aspect; the FPGA system comprises: a PSRAM controller, comprising: an internal bus module, an automatic training module communicatively connected to the internal bus module, and at least two single-particle channel modules; the single-particle channel module comprises: an IO interface module, a LUT output delay module, and a LUT sampling delay module; at least two PSRAM particles;

所述控制方法包括:The control method comprises:

启动所述自动训练模块进行相位粗调处理和相位细调处理,确定目标采样相位;Starting the automatic training module to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase;

相位训练完成后,通过所述内部总线模块响应于接收的数据读写请求,从所述数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址;After the phase training is completed, the internal bus module responds to the received data read and write request and determines the PSRAM target address of at least one PSRAM particle to be accessed from the data read and write request;

对所述数据读写请求进行读写仲裁,确定对所述待访问的PSRAM颗粒进行的操作的类型;所述操作的类型包括:读操作和写操作;Performing read and write arbitration on the data read and write request to determine the type of operation to be performed on the PSRAM particle to be accessed; the type of operation includes: a read operation and a write operation;

根据所述操作的类型,通过对应的所述单颗粒通道模块的延时处理,以所述目标采样相位对所述PSRAM目标地址所指示的所述PSRAM颗粒进行操作;所述延时处理包括:所述LUT输出延时模块在所述写操作中进行的输出延时处理,所述LUT采样延时模块在所述读操作中进行的采样延时处理。According to the type of the operation, the PSRAM particle indicated by the PSRAM target address is operated with the target sampling phase through the delay processing of the corresponding single-particle channel module; the delay processing includes: the output delay processing performed by the LUT output delay module in the write operation, and the sampling delay processing performed by the LUT sampling delay module in the read operation.

第三方面,本申请实施例提供了一种电子设备,其特征在于,包括如第一方面实施例任一项所述的基于PSRAM颗粒的FPGA系统。In a third aspect, an embodiment of the present application provides an electronic device, characterized in that it includes an FPGA system based on PSRAM particles as described in any one of the embodiments of the first aspect.

本申请实施例包括:基于PSRAM颗粒的FPGA系统包括:PSRAM控制器和至少两个PSRAM颗粒,PSRAM控制器包括:内部总线模块、与内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块;单颗粒通道模块包括:IO接口模块、依次连接在内部总线模块与IO接口模块之间的写数据通道和LUT输出延时模块、依次连接在内部总线模块与IO接口模块之间的读数据通道和LUT采样延时模块;每个PSRAM颗粒对应地与一个IO接口模块通信连接;PSRAM颗粒与单颗粒通道模块的数量相等;不使用FPGA芯片的DLL或者DELAY逻辑资源,而是基于LUT查找表构建LUT输出延时模块和LUT采样延时模块,在FPGA系统中实现延时功能,具有一定的通用性;在PFGA系统工作的过程中,利用PSRAM控制器,首先,启动自动训练模块进行相位粗调处理和相位细调处理,确定目标采样相位;接着,相位训练完成后,通过内部总线模块响应于接收的数据读写请求,从数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址;而后,对数据读写请求进行读写仲裁,确定对待访问的PSRAM颗粒进行的操作的类型;操作的类型包括:读操作和写操作;最后,根据操作的类型,通过对应的单颗粒通道模块的延时处理,以目标采样相位对PSRAM目标地址所指示的PSRAM颗粒进行操作;延时处理包括:LUT输出延时模块在写操作中进行的输出延时处理,LUT采样延时模块在读操作中进行的采样延时处理。通过设置单颗粒通道模块在PSRAM控制器和多个PSRAM颗粒之间实现相互独立的多路通信,减少了数据拥塞,提高了数据处理效率和带宽利用率。即是说,本申请实施例能够基于LUT查找表在FPGA系统中实现具有一定的通用性的延时功能,能在PSRAM控制器和多个PSRAM颗粒之间实现相互独立的多路通信,从而减少数据拥塞,提高数据处理效率和带宽利用率。The embodiment of the present application includes: an FPGA system based on PSRAM particles includes: a PSRAM controller and at least two PSRAM particles, the PSRAM controller includes: an internal bus module, an automatic training module connected to the internal bus module, and at least two single-particle channel modules; the single-particle channel module includes: an IO interface module, a write data channel and a LUT output delay module connected in sequence between the internal bus module and the IO interface module, and a read data channel and a LUT sampling delay module connected in sequence between the internal bus module and the IO interface module; each PSRAM particle is correspondingly connected to an IO interface module for communication; the number of PSRAM particles is equal to that of the single-particle channel modules; the DLL or DELAY logic resources of the FPGA chip are not used, but the LUT output delay module and the LUT sampling delay module are constructed based on the LUT lookup table to realize the delay function in the FPGA system, which has It has certain versatility; in the process of PFGA system operation, using PSRAM controller, first, start the automatic training module to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase; then, after the phase training is completed, the internal bus module responds to the received data read and write request, and determines the PSRAM target address of at least one PSRAM particle to be accessed from the data read and write request; then, read and write arbitration is performed on the data read and write request to determine the type of operation to be performed on the PSRAM particle to be accessed; the type of operation includes: read operation and write operation; finally, according to the type of operation, the PSRAM particle indicated by the PSRAM target address is operated with the target sampling phase through the delay processing of the corresponding single-particle channel module; the delay processing includes: output delay processing performed by the LUT output delay module in the write operation, and sampling delay processing performed by the LUT sampling delay module in the read operation. By setting the single-particle channel module, independent multi-channel communication is realized between the PSRAM controller and multiple PSRAM particles, which reduces data congestion and improves data processing efficiency and bandwidth utilization. That is to say, the embodiment of the present application can implement a delay function with a certain degree of universality in the FPGA system based on the LUT lookup table, and can realize independent multi-channel communication between the PSRAM controller and multiple PSRAM particles, thereby reducing data congestion and improving data processing efficiency and bandwidth utilization.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请一个实施例提供的基于PSRAM颗粒的FPGA系统的结构示意图;FIG1 is a schematic diagram of the structure of an FPGA system based on PSRAM particles provided by an embodiment of the present application;

图2是本申请一个实施例提供的基于PSRAM颗粒的FPGA系统的整体结构示意图;FIG2 is a schematic diagram of the overall structure of an FPGA system based on PSRAM particles provided by an embodiment of the present application;

图3是本申请一个实施例提供的多个单颗粒通道模块的具体结构示意图;FIG3 is a schematic diagram of the specific structure of multiple single particle channel modules provided by one embodiment of the present application;

图4是本申请一个实施例提供的LUT输出延时模块的具体结构示意图;FIG4 is a schematic diagram of the specific structure of a LUT output delay module provided by an embodiment of the present application;

图5是本申请一个实施例提供的LUT采样延时模块的具体结构示意图;FIG5 is a schematic diagram of the specific structure of a LUT sampling delay module provided by an embodiment of the present application;

图6是本申请一个实施例提供的基于PSRAM颗粒的FPGA系统的控制方法的步骤流程示意图。FIG. 6 is a flowchart showing the steps of a control method for an FPGA system based on PSRAM particles provided in one embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

需要理解的是,在本申请的描述中,涉及到方位描述,例如上、下、前、后、左、右等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。It should be understood that in the description of the present application, the orientation descriptions, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

需要说明的是,在本申请的描述中虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于流程图中的顺序执行所示出或描述的步骤。在本申请的描述中,若干的含义是一个或者多个,多个的含义是两个及两个以上。描述到“第一”、“第二”只是用于区分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。It should be noted that although a logical order is shown in the flowchart in the description of the present application, in some cases, the steps shown or described may be performed in an order different from that in the flowchart. In the description of the present application, a number of means one or more, and a plurality of means two or more. The description of "first" and "second" is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

首先,对本申请中涉及的若干名词进行解释:First, some terms used in this application are explained:

PSRAM:是指伪静态随机存取存储器,全称为Pseudostatic Random AccessMemory。PSRAM是一种结合了SRAM(静态随机存取存储器)接口协议和DRAM(动态随机存取存储器)架构的存储器。PSRAM: refers to pseudo-static random access memory, the full name is Pseudostatic Random Access Memory. PSRAM is a memory that combines the SRAM (static random access memory) interface protocol and the DRAM (dynamic random access memory) architecture.

IDDR:IDDR(Input Double Data Rate)是一种在FPGA设计中使用的原语,主要用于高速数据通信接口。IDDR能够将单比特的双沿采样输入转换为双比特的单沿采样输出。IDDR: IDDR (Input Double Data Rate) is a primitive used in FPGA design, mainly used for high-speed data communication interfaces. IDDR can convert a single-bit double-edge sampled input into a double-bit single-edge sampled output.

CPU:全称为中央处理器(Central Processing Unit),是计算机硬件的核心部件之一。CPU: The full name is Central Processing Unit, which is one of the core components of computer hardware.

DMA:全称为Direct Memory Access,即直接内存访问,是一种计算机系统中的数据传输方式。DMA: The full name is Direct Memory Access, which is a data transmission method in a computer system.

本申请公开了一种基于PSRAM颗粒的FPGA系统及其控制方法、设备。FPGA系统,包括:PSRAM控制器,包括:内部总线模块、与内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块;单颗粒通道模块包括:IO接口模块、依次连接在内部总线模块与IO接口模块之间的写数据通道和LUT输出延时模块、依次连接在内部总线模块与IO接口模块之间的读数据通道和LUT采样延时模块;至少两个PSRAM颗粒,每个PSRAM颗粒对应地与一个IO接口模块通信连接;能够在FPGA系统中实现具有一定的通用性的延时功能,能实现相互独立的多路通信,从而减少数据拥塞,提高数据处理效率和带宽利用率。The present application discloses an FPGA system based on PSRAM particles and its control method and equipment. The FPGA system includes: a PSRAM controller, including: an internal bus module, an automatic training module connected to the internal bus module, and at least two single-particle channel modules; the single-particle channel module includes: an IO interface module, a write data channel and a LUT output delay module connected in sequence between the internal bus module and the IO interface module, and a read data channel and a LUT sampling delay module connected in sequence between the internal bus module and the IO interface module; at least two PSRAM particles, each PSRAM particle correspondingly connected to an IO interface module; a delay function with certain versatility can be realized in the FPGA system, and independent multi-channel communication can be realized, thereby reducing data congestion and improving data processing efficiency and bandwidth utilization.

下面结合附图,对本申请实施例作进一步阐述。The embodiments of the present application are further described below in conjunction with the accompanying drawings.

如图1所示,一种基于PSRAM颗粒的FPGA系统,包括:PSRAM控制器、至少两个PSRAM颗粒。As shown in FIG. 1 , a PSRAM particle-based FPGA system includes: a PSRAM controller and at least two PSRAM particles.

其中,PSRAM控制器,包括:内部总线模块、与内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块。The PSRAM controller includes: an internal bus module, an automatic training module connected to the internal bus module for communication, and at least two single-grain channel modules.

单颗粒通道模块包括:IO接口模块、依次连接在内部总线模块与IO接口模块之间的写数据通道和LUT输出延时模块、依次连接在内部总线模块与IO接口模块之间的读数据通道和LUT采样延时模块。The single-particle channel module includes: an IO interface module, a write data channel and a LUT output delay module sequentially connected between the internal bus module and the IO interface module, and a read data channel and a LUT sampling delay module sequentially connected between the internal bus module and the IO interface module.

至少两个PSRAM颗粒,每个PSRAM颗粒对应地与一个IO接口模块通信连接;PSRAM颗粒与单颗粒通道模块的数量相等。At least two PSRAM particles, each PSRAM particle is correspondingly connected to an IO interface module for communication; the number of PSRAM particles is equal to the number of single-particle channel modules.

其中,自动训练模块用于:进行相位训练,即进行相位粗调处理和相位细调处理,确定用于读写的目标采样相位。The automatic training module is used to perform phase training, that is, to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase for reading and writing.

内部总线模块用于:响应于接收数据读写请求,通过单颗粒通道模块单独地访问PSRAM颗粒,有利于减少数据拥堵,提高了FPGA系统的数据处理效率和带宽利用率。The internal bus module is used to: in response to receiving a data read and write request, access the PSRAM particles individually through the single-particle channel module, which is conducive to reducing data congestion and improving the data processing efficiency and bandwidth utilization of the FPGA system.

PSRAM控制器用于:启动自动训练模块进行相位粗调处理和相位细调处理,确定目标采样相位;相位训练完成后,通过内部总线模块响应于接收的数据读写请求,从数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址;对数据读写请求进行读写仲裁,确定对待访问的PSRAM颗粒进行的操作的类型;操作的类型包括:读操作和写操作;根据操作的类型,通过对应的单颗粒通道模块的延时处理,以目标采样相位对PSRAM目标地址所指示的PSRAM颗粒进行操作;延时处理包括:LUT输出延时模块在写操作中进行的输出延时处理,LUT采样延时模块在读操作中进行的采样延时处理。The PSRAM controller is used to: start the automatic training module to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase; after the phase training is completed, respond to the received data read and write request through the internal bus module, and determine the PSRAM target address of at least one PSRAM particle to be accessed from the data read and write request; perform read and write arbitration on the data read and write request to determine the type of operation to be performed on the PSRAM particle to be accessed; the types of operations include: read operation and write operation; according to the type of operation, the PSRAM particle indicated by the PSRAM target address is operated with the target sampling phase through the delay processing of the corresponding single-particle channel module; the delay processing includes: output delay processing performed by the LUT output delay module in the write operation, and sampling delay processing performed by the LUT sampling delay module in the read operation.

根据本申请第一方面实施例提供的基于PSRAM颗粒的FPGA系统,不使用FPGA芯片的DLL或者DELAY逻辑资源,而是基于LUT查找表构建LUT输出延时模块和LUT采样延时模块,在FPGA系统中实现延时功能,具有一定的通用性;通过设置单颗粒通道模块在PSRAM控制器和多个PSRAM颗粒之间实现相互独立的多路通信,减少了数据拥塞,提高了数据处理效率和带宽利用率。According to the PSRAM particle-based FPGA system provided by the embodiment of the first aspect of the present application, the DLL or DELAY logic resources of the FPGA chip are not used, but the LUT output delay module and the LUT sampling delay module are constructed based on the LUT lookup table to realize the delay function in the FPGA system, which has a certain versatility; by setting a single-particle channel module, independent multi-channel communication is realized between the PSRAM controller and multiple PSRAM particles, thereby reducing data congestion and improving data processing efficiency and bandwidth utilization.

如图2所示,根据本申请的一些实施例,FPGA系统还包括:标准总线接口;PSRAM控制器还包括:总线转换模块和寄存器配置模块;标准总线接口的一端与外部设备连接;标准总线接口的另一端通过APB总线与寄存器配置模块通信连接、通过AXI总线与总线转换模块通信连接;总线转换模块与内部总线模块连接。As shown in Figure 2, according to some embodiments of the present application, the FPGA system also includes: a standard bus interface; the PSRAM controller also includes: a bus conversion module and a register configuration module; one end of the standard bus interface is connected to an external device; the other end of the standard bus interface is communicated with the register configuration module through the APB bus and is communicated with the bus conversion module through the AXI bus; the bus conversion module is connected to the internal bus module.

具体地,标准总线接口所连接的外部设备包括但不限于有:CPU和DMA设备。Specifically, the external devices connected to the standard bus interface include but are not limited to: a CPU and a DMA device.

可以理解的是,本申请将整个基于PSRAM颗粒的FPGA系统封装为一个标准总线接口,即AXI总线和APB总线。然后外围直接配合CPU+其他需要访问外部存储的空间的验证IP即可搭建一个完整的FPGA平台。It is understandable that the present application encapsulates the entire PSRAM particle-based FPGA system into a standard bus interface, namely the AXI bus and the APB bus. Then the peripherals directly cooperate with the CPU + other verification IPs that need to access the external storage space to build a complete FPGA platform.

具体地,总线转换模块用于:接收CPU发出的初始化配置指令,并通过APB总线将控制器初始化指令发送至寄存器配置模块,以使寄存器配置模块响应于初始化配置指令对PSRAM控制器完成初始化处理。总线转换模块用于:接收外部设备发出的数据读写请求,并通过AXI总线将数据读写请求发送至内部总线模块,以使内部总线模块响应于数据读写请求,访问PSRAM颗粒。Specifically, the bus conversion module is used to: receive the initialization configuration instruction issued by the CPU, and send the controller initialization instruction to the register configuration module through the APB bus, so that the register configuration module completes the initialization processing of the PSRAM controller in response to the initialization configuration instruction. The bus conversion module is used to: receive the data read and write request issued by the external device, and send the data read and write request to the internal bus module through the AXI bus, so that the internal bus module responds to the data read and write request and accesses the PSRAM particles.

具体地,寄存器配置模块用于对PSRAM控制器进行初始化配置,为后续PSRAM控制器的正常工作奠定基础。Specifically, the register configuration module is used to initialize and configure the PSRAM controller, laying a foundation for the subsequent normal operation of the PSRAM controller.

如图2所示,根据本申请的一些实施例,内部总线模块包括:多个读写控制器,每个读写控制器与一个单颗粒通道模块通信连接;多个存储单元,每个存储单元与一个读写控制器通信连接。As shown in FIG. 2 , according to some embodiments of the present application, the internal bus module includes: a plurality of read-write controllers, each of which is communicatively connected to a single-grain channel module; and a plurality of storage units, each of which is communicatively connected to a read-write controller.

其中,存储单元用于缓存待写入PSRAM颗粒的待写数据和从PSRAM颗粒读取的回读数据;读写控制器用于响应于接收的数据读写请求,根据PSRAM目标地址将待写数据拆分后存储至存储单元,以待写入至对应的PSRAM颗粒中;以及根据PSRAM目标地址将回读数据进行采样、拼接重组后存储至存储单元,恢复成正常数据。Among them, the storage unit is used to cache the data to be written to the PSRAM particles and the read-back data read from the PSRAM particles; the read-write controller is used to respond to the received data read and write requests, split the data to be written according to the PSRAM target address and store it in the storage unit, waiting to be written to the corresponding PSRAM particles; and sample, splice and reorganize the read-back data according to the PSRAM target address and store it in the storage unit to restore it to normal data.

可以理解的是,内部BUS模块包括多个读写控制器,能对AXI总线进行转换,转换为多个独立访问的读写控制。在读取PSRAM颗粒的数据时,由于PSRAM颗粒的自刷新,不同的PSRAM颗粒从接收到读写控制器发出的读数请求、到返回读取的数据的时间长短不一样;对于读写控制器而言,经过不同的时钟周期数后,才接收到不同的PSRAM颗粒返回的数据。因此,本申请实施例在内部总线模块中设置存储单元,读写控制器根据待访问的PSRAM颗粒的PSRAM目标地址,在写操作中将数据进行拆分并送入存储单元中,或者在读操作中将回读数据拼接并送入存储单元中,当一个PSRAM颗粒的数据返回较慢时,不会影响对另一个PSRAM颗粒的访问。通过对多PSRAM颗粒实现独立的数据读写,能够减少因为PSRAM颗粒返回数据不同步而导致的时钟周期的浪费,从而能够达到提升带宽利用率的目的。It is understandable that the internal BUS module includes multiple read-write controllers that can convert the AXI bus into multiple independently accessible read-write controls. When reading the data of the PSRAM particles, due to the self-refresh of the PSRAM particles, different PSRAM particles have different lengths of time from receiving the reading request issued by the read-write controller to returning the read data; for the read-write controller, after different numbers of clock cycles, the data returned by different PSRAM particles are received. Therefore, the embodiment of the present application sets a storage unit in the internal bus module, and the read-write controller splits the data in the write operation and sends it to the storage unit according to the PSRAM target address of the PSRAM particle to be accessed, or splices the read-back data and sends it to the storage unit in the read operation. When the data of one PSRAM particle returns slowly, it will not affect the access to another PSRAM particle. By realizing independent data reading and writing for multiple PSRAM particles, the waste of clock cycles caused by the asynchronous return of data by PSRAM particles can be reduced, thereby achieving the purpose of improving bandwidth utilization.

如图2所示,在一些实施例中,每个PSRAM颗粒通过控制线和数据线与IO接口模块连接。其中,控制线用于传输控制双PSRAM颗粒的CS信号(片选信号)、CLK信号(时钟信号)、CLKN信号(时钟反相信号)、RSTN信号(复位信号)。数据线用于传输双PSRAM颗粒的DQ信号、DQS信号、DM信号。As shown in FIG2 , in some embodiments, each PSRAM particle is connected to the IO interface module via a control line and a data line. The control line is used to transmit the CS signal (chip select signal), CLK signal (clock signal), CLKN signal (clock inversion signal), and RSTN signal (reset signal) for controlling the dual PSRAM particles. The data line is used to transmit the DQ signal, DQS signal, and DM signal of the dual PSRAM particles.

如图3所示,单颗粒通道模块还包括:写命令通道。写命令通道用于接收写命令信号以及写命令信号对应的地址信号,且响应于其所接收的写命令信号,产生该写命令信号对应的写使能信号,将写使能信号发送至PSRAM颗粒。As shown in Figure 3, the single-particle channel module also includes: a write command channel. The write command channel is used to receive a write command signal and an address signal corresponding to the write command signal, and in response to the received write command signal, generates a write enable signal corresponding to the write command signal, and sends the write enable signal to the PSRAM particle.

进一步地,对本申请实施例提供的LUT输出延时模块和LUT采样延时模块进行进一步说明。Furthermore, the LUT output delay module and the LUT sampling delay module provided in the embodiments of the present application are further described.

如图4所示,图4是本申请一个实施例提供的LUT输出延时模块的具体结构示意图;根据本申请的一些实施例,LUT输出延时模块包括:第一触发器、数据延时单元、时钟延时单元。其中,第一D触发器的输出端与IO接口模块连接;数据延时单元的DQ输入端与写数据通道连接,数据延时单元的输出端与第一D触发器的D端连接;时钟延时单元,时钟延时单元的DQS输入端与写数据通道连接,时钟延时单元的输出端与第一D触发器的CLK端连接。As shown in Figure 4, Figure 4 is a specific structural diagram of the LUT output delay module provided by an embodiment of the present application; according to some embodiments of the present application, the LUT output delay module includes: a first trigger, a data delay unit, and a clock delay unit. Among them, the output end of the first D trigger is connected to the IO interface module; the DQ input end of the data delay unit is connected to the write data channel, and the output end of the data delay unit is connected to the D end of the first D trigger; the clock delay unit, the DQS input end of the clock delay unit is connected to the write data channel, and the output end of the clock delay unit is connected to the CLK end of the first D trigger.

根据本申请的一些实施例,数据延时单元,包括:第一多路选择器和N级LUT延时结构;其中,第一多路选择器的输出端连接至D触发器的D端;N级LUT延时结构,包括:N-1个LUT查找表,每个LUT查找表的输入端、最后一个LUT查找表的输出端都连接至第一多路选择器的输入端。According to some embodiments of the present application, a data delay unit includes: a first multiplexer and an N-stage LUT delay structure; wherein the output end of the first multiplexer is connected to the D end of the D flip-flop; the N-stage LUT delay structure includes: N-1 LUT lookup tables, the input end of each LUT lookup table and the output end of the last LUT lookup table are connected to the input end of the first multiplexer.

可以理解的是,数据延时单元中,单个LUT查找表的LUT单位延时是固定、相同的,数据延时单元所能达到的最大固定延时时长由N级LUT延时结构确定,其中,N为自然数。假设每一个LUT查找表的延时为t,则数据延时单元的最大固定延时时长为:Nt。可以理解的是,通过选通数据延时单元的第一多路选择器,可以调节延时档位,确定数据延时单元的固定延时。例如,0档延时对应的固定延时为0,1档延时对应的固定延时为t,2档延时对应固定延时为2t,以此类推。It is understandable that in the data delay unit, the LUT unit delay of a single LUT lookup table is fixed and the same, and the maximum fixed delay length that the data delay unit can achieve is determined by the N-level LUT delay structure, where N is a natural number. Assuming that the delay of each LUT lookup table is t, the maximum fixed delay length of the data delay unit is: Nt. It is understandable that by selecting the first multiplexer of the data delay unit, the delay gear can be adjusted to determine the fixed delay of the data delay unit. For example, the fixed delay corresponding to the 0-gear delay is 0, the fixed delay corresponding to the 1-gear delay is t, the fixed delay corresponding to the 2-gear delay is 2t, and so on.

根据本申请的一些实施例,时钟延时单元,包括:第二多路选择器和M级LUT时钟延时结构;其中,第二多路选择器的输出端连接至D触发器的CLK端;M级LUT时钟延时结构,包括:M-1个LUT查找表,每个LUT查找表的输入端、最后一个LUT查找表的输出端都连接至第二多路选择器的输入端。According to some embodiments of the present application, the clock delay unit includes: a second multiplexer and an M-level LUT clock delay structure; wherein the output end of the second multiplexer is connected to the CLK end of the D flip-flop; the M-level LUT clock delay structure includes: M-1 LUT lookup tables, and the input end of each LUT lookup table and the output end of the last LUT lookup table are connected to the input end of the second multiplexer.

可以理解的是,时钟延时单元中,单个LUT查找表的LUT单位延时是固定的,时钟延时单元所能达到的最大固定延时时长由M级LUT延时结构确定,其中,M为自然数。假设每一个LUT查找表的延时为t,则时钟延时单元的最大固定延时时长为:Mt。可以理解的是,通过选通时钟延时单元的第二多路选择器,可以调节延时档位,确定时钟延时单元的固定延时。例如,0档延时对应的固定延时为0,1档延时对应的固定延时为t,2档延时对应固定延时为2t,以此类推。It is understandable that in the clock delay unit, the LUT unit delay of a single LUT lookup table is fixed, and the maximum fixed delay length that the clock delay unit can achieve is determined by the M-level LUT delay structure, where M is a natural number. Assuming that the delay of each LUT lookup table is t, the maximum fixed delay length of the clock delay unit is: Mt. It is understandable that by selecting the second multiplexer of the clock delay unit, the delay gear can be adjusted to determine the fixed delay of the clock delay unit. For example, the fixed delay corresponding to the 0-gear delay is 0, the fixed delay corresponding to the 1-gear delay is t, the fixed delay corresponding to the 2-gear delay is 2t, and so on.

基于此结构,可以在相位训练阶段,在自动训练模块完成相位粗调处理之后,可以在相位细调处理中,通过调节N级LUT延时结构、M级LUT延时结构,细调相位确定最佳写相位;从而能够在写数据的过程中,实现延时功能,以最佳写相位向PSRAM颗粒写入数据。Based on this structure, in the phase training stage, after the automatic training module completes the coarse phase adjustment processing, the phase can be fine-tuned to determine the optimal write phase by adjusting the N-level LUT delay structure and the M-level LUT delay structure in the phase fine adjustment processing; thereby, the delay function can be realized in the process of writing data, and data can be written to the PSRAM particles with the optimal write phase.

本申请实施例在不使用FPGA芯片的DLL或者DELAY逻辑资源的情况下,基于LUT查找表构建LUT输出延时模块,在FPGA控制器的写操作中实现延时功能,具有一定的通用性。The embodiment of the present application constructs a LUT output delay module based on the LUT lookup table without using the DLL or DELAY logic resources of the FPGA chip, and implements the delay function in the write operation of the FPGA controller, which has a certain degree of versatility.

如图5所示,图5是本申请一个实施例提供的LUT采样延时模块的具体结构示意图;根据本申请的一些实施例,LUT采样延时模块包括:第二D触发器、数据延时单元、时钟延时单元。其中,第二D触发器的输出端与读数据通道连接;数据延时单元,数据延时单元的DQ输入端与IO接口模块连接,数据延时单元的输出端与第二D触发器的D端连接;时钟延时单元的DQS输入端与IO接口模块连接,时钟延时单元的输出端与第二D触发器的CLK端连接。As shown in Figure 5, Figure 5 is a specific structural diagram of a LUT sampling delay module provided by an embodiment of the present application; according to some embodiments of the present application, the LUT sampling delay module includes: a second D flip-flop, a data delay unit, and a clock delay unit. Among them, the output end of the second D flip-flop is connected to the read data channel; the data delay unit, the DQ input end of the data delay unit is connected to the IO interface module, and the output end of the data delay unit is connected to the D end of the second D flip-flop; the DQS input end of the clock delay unit is connected to the IO interface module, and the output end of the clock delay unit is connected to the CLK end of the second D flip-flop.

根据本申请的一些实施例,数据延时单元,包括:第一多路选择器和N级LUT延时结构;其中,第一多路选择器的输出端连接至D触发器的D端;N级LUT延时结构,包括:N-1个LUT查找表,每个LUT查找表的输入端、最后一个LUT查找表的输出端都连接至第一多路选择器的输入端。According to some embodiments of the present application, a data delay unit includes: a first multiplexer and an N-stage LUT delay structure; wherein the output end of the first multiplexer is connected to the D end of the D flip-flop; the N-stage LUT delay structure includes: N-1 LUT lookup tables, the input end of each LUT lookup table and the output end of the last LUT lookup table are connected to the input end of the first multiplexer.

根据本申请的一些实施例,时钟延时单元,包括:第二多路选择器和M级LUT时钟延时结构;其中,第二多路选择器的输出端连接至D触发器的CLK端;M级LUT时钟延时结构,包括:M-1个LUT查找表,每个LUT查找表的输入端、最后一个LUT查找表的输出端都连接至第二多路选择器的输入端。According to some embodiments of the present application, the clock delay unit includes: a second multiplexer and an M-level LUT clock delay structure; wherein the output end of the second multiplexer is connected to the CLK end of the D flip-flop; the M-level LUT clock delay structure includes: M-1 LUT lookup tables, and the input end of each LUT lookup table and the output end of the last LUT lookup table are connected to the input end of the second multiplexer.

可以理解的是,LUT采样延时模块中的数据延时单元、时钟延时单元,与LUT输出延时模块中的数据延时单元、时钟延时单元结构相同,功能相同,在此不再赘述LUT采样延时模块中的数据延时单元、时钟延时单元的具体结构以及相应的功能。It can be understood that the data delay unit and the clock delay unit in the LUT sampling delay module have the same structure and function as the data delay unit and the clock delay unit in the LUT output delay module, and the specific structure and corresponding functions of the data delay unit and the clock delay unit in the LUT sampling delay module are not repeated here.

基于此结构,可以在相位训练阶段,在自动训练模块完成相位粗调处理之后,可以在相位细调处理中,通过调节N级LUT延时结构、M级LUT延时结构,细调相位确定最佳读相位;从而能够在写数据的过程中,实现延时功能,以最佳读相位从PSRAM颗粒采样数据。Based on this structure, in the phase training stage, after the automatic training module completes the coarse phase adjustment processing, the phase can be fine-tuned to determine the optimal read phase by adjusting the N-level LUT delay structure and the M-level LUT delay structure in the phase fine adjustment processing; thereby, the delay function can be realized in the process of writing data, and data can be sampled from the PSRAM particles with the optimal read phase.

本申请实施例在不使用FPGA芯片的DLL或者DELAY逻辑资源的情况下,基于LUT查找表构建LUT采样延时模块,在FPGA控制器的读操作中实现延时功能,具有一定的通用性。The embodiment of the present application constructs a LUT sampling delay module based on a LUT lookup table without using the DLL or DELAY logic resources of the FPGA chip, and implements a delay function in the read operation of the FPGA controller, which has a certain degree of versatility.

可以理解的是,以输入采样为例,如果使用FPGA内部现成的资源IDELAY+IDDR原语的方式,数据需要在IDDR中进行数据拼接,并且需要一个更快的高倍时钟去采样,这样会导致PSRAM控制器接口频率不能太高。而本申请实施例使用纯LUT方式,利用LUT查找表的固定延时对DQS信号进行延时,从而达到当前周期即锁存数据的目的。本申请采用纯LUT方式实现延时功能的方式与IDELAY+IDDR的方式相比,能够节省至少2至3个cycle,从而提高数据处理效率和带宽利用率。并且,对于内部并不存在IDELAY及IDDR等延时采样资源的部分FPGA芯片,可以通过本申请实施例提供的基于纯LUT方式实现的延时功能。因此,本申请实施例提供的延时功能具有通用性。It is understandable that, taking input sampling as an example, if the IDELAY+IDDR primitive method of the ready-made resources inside the FPGA is used, the data needs to be spliced in the IDDR, and a faster high-multiple clock is required for sampling, which will cause the PSRAM controller interface frequency to not be too high. The embodiment of the present application uses a pure LUT method, and uses the fixed delay of the LUT lookup table to delay the DQS signal, so as to achieve the purpose of latching data in the current cycle. Compared with the IDELAY+IDDR method, the method of implementing the delay function using a pure LUT method in the present application can save at least 2 to 3 cycles, thereby improving data processing efficiency and bandwidth utilization. In addition, for some FPGA chips that do not have delayed sampling resources such as IDELAY and IDDR inside, the delay function based on the pure LUT method provided by the embodiment of the present application can be implemented. Therefore, the delay function provided by the embodiment of the present application is universal.

可以理解的是,由于DQ信号与DQS信号从PSRAM颗粒发出时为对齐状态,因此,需要将DQS信号延时,令DQS信号的边沿与DQ数据的正中心对齐,进行采样(即中心采样),因此,需要设置合理的LUT级数以及设置每一级的延时值。由于FPGA中LUT位置固定,需要指定每个LUT在FPGA的位置,并且不能被优化,需要在FPGA布局布线工具约束每一个LUT的物理位置,从而实现每一个LUT查找表的LUT单位延时基本相同,从而达到每一级延时相当的目的,从而实现中心采样。It is understandable that since the DQ signal and the DQS signal are aligned when they are sent from the PSRAM particles, the DQS signal needs to be delayed so that the edge of the DQS signal is aligned with the center of the DQ data for sampling (i.e., center sampling). Therefore, it is necessary to set a reasonable number of LUT levels and set the delay value of each level. Since the position of the LUT in the FPGA is fixed, the position of each LUT in the FPGA needs to be specified and cannot be optimized. The physical position of each LUT needs to be constrained in the FPGA layout and routing tool so that the LUT unit delay of each LUT lookup table is basically the same, thereby achieving the purpose of equivalent delay at each level and realizing center sampling.

可以理解的是,因为FPGA芯片工艺制造不同,导致单位LUT延时也有不同,因此,本申请对数据延时单元中单个LUT查找表的延时的取值不做具体的限制。It is understandable that due to different manufacturing processes of FPGA chips, the unit LUT delay is also different. Therefore, this application does not make specific restrictions on the delay value of a single LUT lookup table in the data delay unit.

需要说明的是,本申请实施例中,N级LUT延时结构的级数(即N)、M级LUT时钟延时结构的级数(即M)均可以根据实际的PSRAM工作频率和LUT单位延时确定;这里指的级数是指连接到多路选择器的信号数量。例如,PSRAM颗粒的PSRAM工作频率为100M(周期10ns),则PSRAM工作频率的半周期就是5ns。在数据采样时,基于DQS信号采样DQ信号,当DQS信号的边沿与DQ信号的中心对齐,则读写控制器在该时刻采样数据,实现中心采样。因此,需要通过M级LUT延时结构将DQS信号延时2.5ns。假设LUT单位延时为0.5ns,因此需要2.5/0.5=5个LUT查找表。因此,这种情况下,最少需要6级延时采样才能满足中心采样条件。在设置M级LUT延时结构中,需要利用到5个LUT查找表以实现6级延时结构。It should be noted that in the embodiment of the present application, the number of levels (ie, N) of the N-level LUT delay structure and the number of levels (ie, M) of the M-level LUT clock delay structure can be determined according to the actual PSRAM operating frequency and the LUT unit delay; the number of levels referred to here refers to the number of signals connected to the multiplexer. For example, if the PSRAM operating frequency of the PSRAM particle is 100M (cycle 10ns), then the half cycle of the PSRAM operating frequency is 5ns. When sampling data, the DQ signal is sampled based on the DQS signal. When the edge of the DQS signal is aligned with the center of the DQ signal, the read-write controller samples the data at this moment to achieve center sampling. Therefore, it is necessary to delay the DQS signal by 2.5ns through the M-level LUT delay structure. Assuming that the LUT unit delay is 0.5ns, 2.5/0.5=5 LUT lookup tables are required. Therefore, in this case, at least 6 levels of delay sampling are required to meet the center sampling condition. In setting the M-level LUT delay structure, 5 LUT lookup tables are required to achieve a 6-level delay structure.

本申请实施例通过利用LUT延时结构,在当前周期即实现数据的采样与锁存,从而节省采样的时钟周期数,降低单次数据读取的总时钟周期数,从而提高带宽利用率。The embodiment of the present application utilizes the LUT delay structure to implement data sampling and latching in the current cycle, thereby saving the number of sampling clock cycles and reducing the total number of clock cycles for a single data read, thereby improving bandwidth utilization.

本领域技术人员可以理解的是,图中示出的系统结构并不构成对本申请实施例的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art will appreciate that the system structure shown in the figure does not constitute a limitation on the embodiments of the present application, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

以上所描述的系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

本领域技术人员可以理解的是,本申请实施例描述的系统架构以及应用场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着系统架构的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。Those skilled in the art will appreciate that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.

基于上述系统结构,下面提出本申请的基于PSRAM颗粒的FPGA系统的控制方法的各个实施例。Based on the above system structure, various embodiments of the control method of the FPGA system based on PSRAM particles of the present application are proposed below.

第二方面,如图6所示,该基于PSRAM颗粒的FPGA系统的控制方法能够应用于如图1所示的基于PSRAM颗粒的FPGA系统中,FPGA系统包括:PSRAM控制器,包括:内部总线模块、与内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块;单颗粒通道模块包括:IO接口模块、LUT输出延时模块、LUT采样延时模块;至少两个PSRAM颗粒。该控制方法可以包括但不限于有步骤S110至步骤S140。In the second aspect, as shown in FIG6 , the control method of the FPGA system based on PSRAM particles can be applied to the FPGA system based on PSRAM particles as shown in FIG1 , wherein the FPGA system includes: a PSRAM controller, including: an internal bus module, an automatic training module connected to the internal bus module, and at least two single-particle channel modules; the single-particle channel module includes: an IO interface module, a LUT output delay module, and a LUT sampling delay module; and at least two PSRAM particles. The control method may include but is not limited to steps S110 to S140.

步骤S110:启动自动训练模块进行相位粗调处理和相位细调处理,确定目标采样相位。Step S110: start the automatic training module to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase.

步骤S120:相位训练完成后,通过内部总线模块响应于接收的数据读写请求,从数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址。Step S120: After the phase training is completed, the internal bus module responds to the received data read/write request and determines the PSRAM target address of at least one PSRAM particle to be accessed from the data read/write request.

步骤S130:对数据读写请求进行读写仲裁,确定对待访问的PSRAM颗粒进行的操作的类型;操作的类型包括:读操作和写操作。Step S130: performing read/write arbitration on the data read/write request to determine the type of operation to be performed on the PSRAM particle to be accessed; the types of operation include: read operation and write operation.

步骤S140:根据操作的类型,通过对应的单颗粒通道模块的延时处理,以目标采样相位对PSRAM目标地址所指示的PSRAM颗粒进行操作;延时处理包括:LUT输出延时模块在写操作中进行的输出延时处理,LUT采样延时模块在读操作中进行的采样延时处理。Step S140: According to the type of operation, the PSRAM particle indicated by the PSRAM target address is operated with the target sampling phase through the delay processing of the corresponding single-particle channel module; the delay processing includes: the output delay processing performed by the LUT output delay module in the write operation, and the sampling delay processing performed by the LUT sampling delay module in the read operation.

通过步骤S110至步骤S140,在PFGA系统工作的过程中,利用PSRAM控制器,首先,启动自动训练模块进行相位粗调处理和相位细调处理,确定目标采样相位;接着,相位训练完成后,通过内部总线模块响应于接收的数据读写请求,从数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址;而后,对数据读写请求进行读写仲裁,确定对待访问的PSRAM颗粒进行的操作的类型;操作的类型包括:读操作和写操作;最后,根据操作的类型,通过对应的单颗粒通道模块的延时处理,以目标采样相位对PSRAM目标地址所指示的PSRAM颗粒进行操作;延时处理包括:LUT输出延时模块在写操作中进行的输出延时处理,LUT采样延时模块在读操作中进行的采样延时处理。通过设置单颗粒通道模块在PSRAM控制器和多个PSRAM颗粒之间实现相互独立的多路通信,减少了数据拥塞,提高了数据处理效率和带宽利用率。因此,本申请实施例能够基于LUT查找表在FPGA系统中实现具有一定的通用性的延时功能,能在PSRAM控制器和多个PSRAM颗粒之间实现相互独立的多路通信,从而减少数据拥塞,提高数据处理效率和带宽利用率。Through step S110 to step S140, during the operation of the PFGA system, the PSRAM controller is used to first start the automatic training module to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase; then, after the phase training is completed, the internal bus module responds to the received data read and write request, and determines the PSRAM target address of at least one PSRAM particle to be accessed from the data read and write request; then, the data read and write request is read and written arbitration is performed to determine the type of operation to be performed on the PSRAM particle to be accessed; the type of operation includes: read operation and write operation; finally, according to the type of operation, the PSRAM particle indicated by the PSRAM target address is operated with the target sampling phase through the delay processing of the corresponding single-particle channel module; the delay processing includes: output delay processing performed by the LUT output delay module in the write operation, and sampling delay processing performed by the LUT sampling delay module in the read operation. By setting the single-particle channel module, independent multi-channel communication is realized between the PSRAM controller and multiple PSRAM particles, which reduces data congestion and improves data processing efficiency and bandwidth utilization. Therefore, the embodiment of the present application can implement a delay function with a certain degree of universality in the FPGA system based on the LUT lookup table, and can realize independent multi-channel communication between the PSRAM controller and multiple PSRAM particles, thereby reducing data congestion and improving data processing efficiency and bandwidth utilization.

具体地,在步骤S110之前,控制方法还包括:令寄存器配置模块接收CPU通过APB总线发送的初始化配置指令,并响应于初始化配置指令对PSRAM控制器完成初始化处理。Specifically, before step S110, the control method further includes: enabling the register configuration module to receive an initialization configuration instruction sent by the CPU through the APB bus, and completing initialization processing on the PSRAM controller in response to the initialization configuration instruction.

具体地,进一步说明步骤S110,步骤S110包括:根据PSRAM协议格式,启动自动训练模块首先进行读相位粗调处理;读相位粗调处理包括:通过二分法,快速地粗调PSRAM读相位,而后控制自动训练模块和LUT采样延时模块,继续进行LUT相位细调处理,确定最佳读相位;自动训练模块在完成最佳读相位的确认后,继续进行训练;进行写相位粗调处理;写相位粗调处理包括:通过二分法,快速地粗调PSRAM写相位,然后再控制自动训练模块和LUT输出延时模块,继续进行LUT相位细调处理,确定最佳写相位;得到最佳读相位和最佳写相位后,发起完成中断,结束相位训练。Specifically, step S110 is further described, and step S110 includes: according to the PSRAM protocol format, starting the automatic training module to first perform a read phase coarse adjustment process; the read phase coarse adjustment process includes: through the binary method, quickly coarsely adjust the PSRAM read phase, and then control the automatic training module and the LUT sampling delay module to continue the LUT phase fine adjustment process to determine the optimal read phase; after the automatic training module completes the confirmation of the optimal read phase, the training continues; perform a write phase coarse adjustment process; the write phase coarse adjustment process includes: through the binary method, quickly coarsely adjust the PSRAM write phase, and then control the automatic training module and the LUT output delay module to continue the LUT phase fine adjustment process to determine the optimal write phase; after obtaining the optimal read phase and the optimal write phase, initiate a completion interrupt to end the phase training.

具体地,快速定位相位时先进行粗调,先将DQ信号全部固定相同相位,然后改变DQS相位,基于不同的相位进行数据读写比较测试,当读写数据一致,则初步确定DQS的相位;在选择的DQS相位的基础上,然后再细调DQ信号的LUT相位,基于不同的LUT相位进行数据读写比较测试,当读写数据一致,确定最佳数据采样相位。通过这样的先粗调、后细调的方式可以确定最佳读相位、最佳写相位。Specifically, when quickly locating the phase, first perform a coarse adjustment, first fix all DQ signals to the same phase, then change the DQS phase, perform data read and write comparison tests based on different phases, and preliminarily determine the DQS phase when the read and write data are consistent; then fine-tune the LUT phase of the DQ signal based on the selected DQS phase, perform data read and write comparison tests based on different LUT phases, and determine the optimal data sampling phase when the read and write data are consistent. The optimal read phase and the optimal write phase can be determined by this method of first coarse adjustment and then fine adjustment.

可以理解的是,在相位训练过程中,利用二分法进行相位粗调指的是:根据DQS信号输入端和DQ信号输入端的所有LUT级进行遍历,通过二分法进行快速定位,首先利用一个测试相位进行数据读写比较测试,判断候选相位是否可行,如果不可行,则取测试相位的一半继续进行数据读写比较测试,以初步确定相位,进一步地逐档位地调节LUT采样延时模块、LUT输出延时模块进行数据读写比较测试,直至确定最佳读相位和最佳写相位。或者也可以直接进行从0相位开始的逐一遍历。It can be understood that in the phase training process, the use of binary division for phase coarse adjustment means: traversing all LUT levels of the DQS signal input terminal and the DQ signal input terminal, quickly positioning by binary division, first using a test phase to perform data read and write comparison test to determine whether the candidate phase is feasible, if not feasible, then taking half of the test phase to continue the data read and write comparison test to preliminarily determine the phase, and further adjusting the LUT sampling delay module and the LUT output delay module gear by gear to perform data read and write comparison test until the optimal read phase and the optimal write phase are determined. Or you can directly traverse one by one starting from phase 0.

具体地,进一步说明步骤S120,步骤S120包括:相位训练完成后,总线转换模块接收到外部设备通过AXI总线发起数据读写请求,并将数据读写请求发送至内部总线模块;内部总线模块响应于接收的数据读写请求,从数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址。Specifically, step S120 is further explained, and step S120 includes: after the phase training is completed, the bus conversion module receives a data read and write request initiated by an external device through the AXI bus, and sends the data read and write request to the internal bus module; the internal bus module responds to the received data read and write request, and determines the PSRAM target address of at least one PSRAM particle to be accessed from the data read and write request.

具体地,进一步说明步骤S130。可以理解的是,AXI总线具有读写并行功能。但对PSRAM颗粒进行的一次操作只能是读操作或者写操作。如此需要通过内部总线模块的读写控制器对来自AXI的数据读写请求进行仲裁,判断当读写数据同时到来时,确定先执行读操作还是写操作。如此,通过步骤S130确定了对待访问的PSRAM颗粒将执行的操作的类型,以便于确定利用到单颗粒通道模块中的写数据通道或是读数据通道。Specifically, step S130 is further described. It can be understood that the AXI bus has a read-write parallel function. However, an operation performed on a PSRAM particle can only be a read operation or a write operation. In this way, it is necessary to arbitrate the data read and write requests from the AXI through the read-write controller of the internal bus module, and determine whether to perform a read operation or a write operation first when the read and write data arrive at the same time. In this way, the type of operation to be performed on the PSRAM particle to be accessed is determined through step S130, so as to determine whether to use the write data channel or the read data channel in the single-particle channel module.

根据本申请的一些实施例,进一步说明步骤S140,目标采样相位包括:最佳读相位和最佳写相位;步骤S140:根据操作的类型,通过对应的单颗粒通道模块的延时处理,以目标采样相位对PSRAM目标地址所指示的PSRAM颗粒进行操作,包括但不限于有步骤S141至步骤S142。According to some embodiments of the present application, step S140 is further described, and the target sampling phase includes: an optimal read phase and an optimal write phase; step S140: according to the type of operation, through the delay processing of the corresponding single-grain channel module, the PSRAM grain indicated by the PSRAM target address is operated with the target sampling phase, including but not limited to steps S141 to S142.

步骤S141:当操作的类型为写操作,内部总线模块根据PSRAM目标地址向对应的单颗粒通道模块发送第一数据传输信号,第一数据传输信号经过写数据通道的传输、LUT输出延时模块的延时处理后,第一数据传输信号中的待写数据以最佳写相位被写入PSRAM目标地址指示的PSRAM颗粒;Step S141: When the operation type is a write operation, the internal bus module sends a first data transmission signal to the corresponding single-grain channel module according to the PSRAM target address. After the first data transmission signal is transmitted by the write data channel and delayed by the LUT output delay module, the data to be written in the first data transmission signal is written into the PSRAM grain indicated by the PSRAM target address at the optimal write phase.

步骤S142:当操作的类型为读操作,内部总线模块向PSRAM目标地址发送读请求,以使PSRAM目标地址所指示的PSRAM颗粒响应于读请求,向对应的单颗粒通道模块返回第二数据传输信号,第二数据传输信号经过LUT采样延时模块的延时处理、读数据通道的传输后,第二数据传输信号中的待读数据以最佳读相位被内部总线模块读取。Step S142: When the operation type is a read operation, the internal bus module sends a read request to the PSRAM target address, so that the PSRAM particle indicated by the PSRAM target address responds to the read request and returns a second data transmission signal to the corresponding single-particle channel module. After the second data transmission signal is delayed by the LUT sampling delay module and transmitted by the read data channel, the data to be read in the second data transmission signal is read by the internal bus module at the optimal read phase.

具体地,在写入数据的过程中,读写控制器还根据PSRAM目标地址将待写数据拆分后存储至存储单元,以待写入至对应的PSRAM颗粒中。Specifically, during the process of writing data, the read-write controller also splits the data to be written according to the PSRAM target address and stores it in the storage unit to be written into the corresponding PSRAM particles.

具体地,在读取数据的过程中,读写控制器还根据PSRAM目标地址将回读数据进行采样、拼接重组后存储至存储单元,恢复成正常数据。Specifically, in the process of reading data, the read-write controller also samples the read-back data according to the PSRAM target address, and stores it in the storage unit after splicing and reorganization, thereby restoring it to normal data.

通过步骤S141至步骤S142,内部总线模块的读写控制器能够基于仲裁所确定的操作的类型,通过对应的单颗粒通道模块访问PSRAM目标地址所指示的PSRAM颗粒,实现独立的数据读写控制。Through step S141 to step S142, the read/write controller of the internal bus module can access the PSRAM particle indicated by the PSRAM target address through the corresponding single-particle channel module based on the type of operation determined by arbitration, thereby achieving independent data read/write control.

第三方面,本申请实施例提供了一种电子设备,包括第一方面实施例提供的基于PSRAM颗粒的FPGA系统;能够基于LUT查找表在FPGA系统中实现具有一定的通用性的延时功能,能在PSRAM控制器和多个PSRAM颗粒之间实现相互独立的多路通信,从而减少数据拥塞,提高数据处理效率和带宽利用率。In the third aspect, an embodiment of the present application provides an electronic device, including an FPGA system based on PSRAM particles provided in the embodiment of the first aspect; it is capable of implementing a delay function with a certain degree of universality in the FPGA system based on a LUT lookup table, and can realize independent multi-channel communication between a PSRAM controller and multiple PSRAM particles, thereby reducing data congestion and improving data processing efficiency and bandwidth utilization.

综上,本申请实施例具有以下多个方面的有益效果:一是,提出了基于PSRAM的FPGA原型验证系统,给FPGA验证系统提供低成本但更高的带宽;二是,使用LUT延时结构,在当前周期中心采样数据并锁存往后传递,降低数据采样时钟周期数的消耗。三是,该FPGA系统不使用FPGA芯片的DLL或者DELAY逻辑资源,实现通用性的延时功能;四是,将多PSRAM颗粒的读写控制器独立,消除了由于PSRAM颗粒自刷新导致双PSRAM数据返回不同步的影响,提高系统带宽利用率。In summary, the embodiments of the present application have the following beneficial effects: First, a PSRAM-based FPGA prototype verification system is proposed, which provides the FPGA verification system with low cost but higher bandwidth; second, a LUT delay structure is used to sample data at the center of the current cycle and latch it for later transmission, thereby reducing the consumption of the number of data sampling clock cycles. Third, the FPGA system does not use the DLL or DELAY logic resources of the FPGA chip to achieve a universal delay function; fourth, the read and write controllers of multiple PSRAM particles are independent, eliminating the impact of asynchronous return of dual PSRAM data due to PSRAM particle self-refresh, thereby improving system bandwidth utilization.

以上是对本申请的较佳实施进行了具体说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请精神的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请所限定的范围内。The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the present application. These equivalent deformations or substitutions are all included in the scope defined by the present application.

Claims (10)

1.一种基于PSRAM颗粒的FPGA系统,其特征在于,包括:1. A PSRAM particle-based FPGA system, comprising: PSRAM控制器,包括:内部总线模块、与所述内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块;The PSRAM controller comprises: an internal bus module, an automatic training module communicatively connected to the internal bus module, and at least two single-grain channel modules; 所述单颗粒通道模块包括:IO接口模块、依次连接在所述内部总线模块与所述IO接口模块之间的写数据通道和LUT输出延时模块、依次连接在所述内部总线模块与所述IO接口模块之间的读数据通道和LUT采样延时模块;The single particle channel module includes: an IO interface module, a write data channel and a LUT output delay module connected in sequence between the internal bus module and the IO interface module, and a read data channel and a LUT sampling delay module connected in sequence between the internal bus module and the IO interface module; 至少两个PSRAM颗粒,每个所述PSRAM颗粒对应地与一个所述IO接口模块通信连接;所述PSRAM颗粒与所述单颗粒通道模块的数量相等;At least two PSRAM particles, each of which is correspondingly connected to one of the IO interface modules for communication; the number of the PSRAM particles is equal to the number of the single-particle channel modules; 所述PSRAM控制器用于:The PSRAM controller is used to: 启动所述自动训练模块进行相位粗调处理和相位细调处理,确定目标采样相位;相位训练完成后,通过所述内部总线模块响应于接收的数据读写请求,从所述数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址;对所述数据读写请求进行读写仲裁,确定对所述待访问的PSRAM颗粒进行的操作的类型;所述操作的类型包括:读操作和写操作;根据所述操作的类型,通过对应的所述单颗粒通道模块的延时处理,以所述目标采样相位对所述PSRAM目标地址所指示的所述PSRAM颗粒进行操作;所述延时处理包括:所述LUT输出延时模块在所述写操作中进行的输出延时处理,所述LUT采样延时模块在所述读操作中进行的采样延时处理。The automatic training module is started to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase; after the phase training is completed, the internal bus module responds to the received data read and write request, and determines the PSRAM target address of at least one PSRAM particle to be accessed from the data read and write request; the data read and write request is subjected to read and write arbitration to determine the type of operation performed on the PSRAM particle to be accessed; the type of operation includes: read operation and write operation; according to the type of operation, the PSRAM particle indicated by the PSRAM target address is operated with the target sampling phase through the delay processing of the corresponding single-particle channel module; the delay processing includes: the output delay processing performed by the LUT output delay module in the write operation, and the sampling delay processing performed by the LUT sampling delay module in the read operation. 2.根据权利要求1所述的基于PSRAM颗粒的FPGA系统,其特征在于,所述LUT输出延时模块包括:2. The FPGA system based on PSRAM particles according to claim 1, characterized in that the LUT output delay module comprises: 第一D触发器,所述第一D触发器的输出端与所述IO接口模块连接;A first D flip-flop, wherein an output end of the first D flip-flop is connected to the IO interface module; 数据延时单元,所述数据延时单元的DQ输入端与所述写数据通道连接,所述数据延时单元的输出端与所述第一D触发器的D端连接;A data delay unit, wherein a DQ input end of the data delay unit is connected to the write data channel, and an output end of the data delay unit is connected to a D end of the first D flip-flop; 时钟延时单元,所述时钟延时单元的DQS输入端与所述写数据通道连接,所述时钟延时单元的输出端与所述第一D触发器的CLK端连接。A clock delay unit, wherein a DQS input end of the clock delay unit is connected to the write data channel, and an output end of the clock delay unit is connected to a CLK end of the first D flip-flop. 3.根据权利要求1所述的基于PSRAM颗粒的FPGA系统,其特征在于,所述LUT采样延时模块包括:3. The FPGA system based on PSRAM particles according to claim 1, characterized in that the LUT sampling delay module comprises: 第二D触发器,所述第二D触发器的输出端与所述读数据通道连接;A second D flip-flop, wherein an output terminal of the second D flip-flop is connected to the read data channel; 数据延时单元,所述数据延时单元的DQ输入端与所述IO接口模块连接,所述数据延时单元的输出端与所述第二D触发器的D端连接;A data delay unit, wherein a DQ input end of the data delay unit is connected to the IO interface module, and an output end of the data delay unit is connected to a D end of the second D flip-flop; 时钟延时单元,所述时钟延时单元的DQS输入端与所述IO接口模块连接,所述时钟延时单元的输出端与所述第二D触发器的CLK端连接。A clock delay unit, wherein a DQS input end of the clock delay unit is connected to the IO interface module, and an output end of the clock delay unit is connected to a CLK end of the second D flip-flop. 4.根据权利要求2或3任一项所述的基于PSRAM颗粒的FPGA系统,其特征在于,所述数据延时单元,包括:4. The FPGA system based on PSRAM particles according to any one of claims 2 or 3, characterized in that the data delay unit comprises: 第一多路选择器,所述第一多路选择器的输出端连接至D触发器的D端;A first multiplexer, wherein an output terminal of the first multiplexer is connected to a D terminal of a D flip-flop; N级LUT延时结构,包括:N-1个LUT查找表,每个LUT查找表的输入端、最后一个所述LUT查找表的输出端都连接至所述第一多路选择器的输入端。The N-stage LUT delay structure includes: N-1 LUT lookup tables, the input end of each LUT lookup table and the output end of the last LUT lookup table are connected to the input end of the first multiplexer. 5.根据权利要求2或3任一项所述的基于PSRAM颗粒的FPGA系统,其特征在于,所述时钟延时单元,包括:5. The FPGA system based on PSRAM particles according to any one of claims 2 or 3, characterized in that the clock delay unit comprises: 第二多路选择器,所述第二多路选择器的输出端连接至D触发器的CLK端;A second multiplexer, wherein an output terminal of the second multiplexer is connected to a CLK terminal of the D flip-flop; M级LUT时钟延时结构,包括:M-1个LUT查找表,每个LUT查找表的输入端、最后一个所述LUT查找表的输出端都连接至所述第二多路选择器的输入端。The M-level LUT clock delay structure includes: M-1 LUT lookup tables, the input end of each LUT lookup table and the output end of the last LUT lookup table are connected to the input end of the second multiplexer. 6.根据权利要求1所述的基于PSRAM颗粒的FPGA系统,其特征在于,所述内部总线模块包括:6. The FPGA system based on PSRAM particles according to claim 1, characterized in that the internal bus module comprises: 多个读写控制器,每个所述读写控制器与一个所述单颗粒通道模块通信连接;A plurality of read-write controllers, each of which is communicatively connected to one of the single-particle channel modules; 多个存储单元,每个所述存储单元与一个所述读写控制器通信连接。A plurality of storage units, each of the storage units is communicatively connected to one of the read-write controllers. 7.根据权利要求1所述的基于PSRAM颗粒的FPGA系统,其特征在于,所述FPGA系统还包括:标准总线接口;所述PSRAM控制器还包括:总线转换模块和寄存器配置模块;7. The FPGA system based on PSRAM particles according to claim 1, characterized in that the FPGA system further comprises: a standard bus interface; the PSRAM controller further comprises: a bus conversion module and a register configuration module; 所述标准总线接口的一端与外部设备连接;所述标准总线接口的另一端通过APB总线与所述寄存器配置模块通信连接、通过AXI总线与所述总线转换模块通信连接;所述总线转换模块与所述内部总线模块连接。One end of the standard bus interface is connected to an external device; the other end of the standard bus interface is connected to the register configuration module via an APB bus and to the bus conversion module via an AXI bus; the bus conversion module is connected to the internal bus module. 8.一种基于PSRAM颗粒的FPGA系统的控制方法,其特征在于,应用于如权利要求1至7任一项所述的基于PSRAM颗粒的FPGA系统;所述FPGA系统包括:PSRAM控制器,包括:内部总线模块、与所述内部总线模块通信连接的自动训练模块、至少两个单颗粒通道模块;所述单颗粒通道模块包括:IO接口模块、LUT输出延时模块、LUT采样延时模块;至少两个PSRAM颗粒;8. A control method for an FPGA system based on PSRAM particles, characterized in that it is applied to the FPGA system based on PSRAM particles as described in any one of claims 1 to 7; the FPGA system comprises: a PSRAM controller, comprising: an internal bus module, an automatic training module communicatively connected to the internal bus module, and at least two single-particle channel modules; the single-particle channel module comprises: an IO interface module, a LUT output delay module, and a LUT sampling delay module; at least two PSRAM particles; 所述控制方法包括:The control method comprises: 启动所述自动训练模块进行相位粗调处理和相位细调处理,确定目标采样相位;Starting the automatic training module to perform phase coarse adjustment processing and phase fine adjustment processing to determine the target sampling phase; 相位训练完成后,通过所述内部总线模块响应于接收的数据读写请求,从所述数据读写请求中确定至少一个待访问的PSRAM颗粒的PSRAM目标地址;After the phase training is completed, the internal bus module responds to the received data read and write request and determines the PSRAM target address of at least one PSRAM particle to be accessed from the data read and write request; 对所述数据读写请求进行读写仲裁,确定对所述待访问的PSRAM颗粒进行的操作的类型;所述操作的类型包括:读操作和写操作;Performing read and write arbitration on the data read and write request to determine the type of operation to be performed on the PSRAM particle to be accessed; the type of operation includes: a read operation and a write operation; 根据所述操作的类型,通过对应的所述单颗粒通道模块的延时处理,以所述目标采样相位对所述PSRAM目标地址所指示的所述PSRAM颗粒进行操作;所述延时处理包括:所述LUT输出延时模块在所述写操作中进行的输出延时处理,所述LUT采样延时模块在所述读操作中进行的采样延时处理。According to the type of the operation, the PSRAM particle indicated by the PSRAM target address is operated with the target sampling phase through the delay processing of the corresponding single-particle channel module; the delay processing includes: the output delay processing performed by the LUT output delay module in the write operation, and the sampling delay processing performed by the LUT sampling delay module in the read operation. 9.根据权利要求8所述的基于PSRAM颗粒的FPGA系统的控制方法,其特征在于,所述目标采样相位包括:最佳读相位和最佳写相位;所述根据所述操作的类型,通过对应的所述单颗粒通道模块的延时处理,以所述目标采样相位对所述PSRAM目标地址所指示的所述PSRAM颗粒进行操作,包括:9. The control method of the FPGA system based on PSRAM particles according to claim 8, characterized in that the target sampling phase includes: an optimal read phase and an optimal write phase; according to the type of the operation, the delay processing of the corresponding single-particle channel module is performed to operate the PSRAM particle indicated by the PSRAM target address with the target sampling phase, comprising: 当所述操作的类型为写操作,所述内部总线模块根据所述PSRAM目标地址向对应的所述单颗粒通道模块发送第一数据传输信号,所述第一数据传输信号经过所述写数据通道的传输、所述LUT输出延时模块的延时处理后,所述第一数据传输信号中的待写数据以所述最佳写相位被写入所述PSRAM目标地址指示的所述PSRAM颗粒;When the type of the operation is a write operation, the internal bus module sends a first data transmission signal to the corresponding single-grain channel module according to the PSRAM target address, and after the first data transmission signal is transmitted by the write data channel and delayed by the LUT output delay module, the data to be written in the first data transmission signal is written into the PSRAM grain indicated by the PSRAM target address at the optimal write phase; 当所述操作的类型为读操作,所述内部总线模块向所述PSRAM目标地址发送读请求,以使所述PSRAM目标地址所指示的PSRAM颗粒响应于所述读请求,向所述对应的所述单颗粒通道模块返回第二数据传输信号,所述第二数据传输信号经过所述LUT采样延时模块的延时处理、所述读数据通道的传输后,所述第二数据传输信号中的待读数据以所述最佳读相位被所述内部总线模块读取。When the type of operation is a read operation, the internal bus module sends a read request to the PSRAM target address, so that the PSRAM particle indicated by the PSRAM target address responds to the read request and returns a second data transmission signal to the corresponding single-particle channel module. After the second data transmission signal is delayed by the LUT sampling delay module and transmitted by the read data channel, the data to be read in the second data transmission signal is read by the internal bus module at the optimal read phase. 10.一种电子设备,其特征在于,包括如权利要求1至7任一项所述的基于PSRAM颗粒的FPGA系统。10. An electronic device, characterized by comprising the FPGA system based on PSRAM particles as claimed in any one of claims 1 to 7.
CN202411312364.3A 2024-09-20 2024-09-20 FPGA system based on PSRAM particles and its control method and device Active CN118841053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411312364.3A CN118841053B (en) 2024-09-20 2024-09-20 FPGA system based on PSRAM particles and its control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411312364.3A CN118841053B (en) 2024-09-20 2024-09-20 FPGA system based on PSRAM particles and its control method and device

Publications (2)

Publication Number Publication Date
CN118841053A true CN118841053A (en) 2024-10-25
CN118841053B CN118841053B (en) 2024-12-10

Family

ID=93149763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411312364.3A Active CN118841053B (en) 2024-09-20 2024-09-20 FPGA system based on PSRAM particles and its control method and device

Country Status (1)

Country Link
CN (1) CN118841053B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN206211976U (en) * 2016-11-23 2017-05-31 成都信息工程大学 A kind of digital DLL controls circuit of SECO
CA3030723A1 (en) * 2019-01-21 2020-07-21 Mitchell B. Miller A system and method for bidirectionally based electrical information storage, processing and communication
CN116705101A (en) * 2023-05-23 2023-09-05 广东匠芯创科技有限公司 Data processing method of multi-PSRAM (particle random Access memory) particle chip, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN206211976U (en) * 2016-11-23 2017-05-31 成都信息工程大学 A kind of digital DLL controls circuit of SECO
CA3030723A1 (en) * 2019-01-21 2020-07-21 Mitchell B. Miller A system and method for bidirectionally based electrical information storage, processing and communication
CN113424260A (en) * 2019-01-21 2021-09-21 米切尔·米勒 System and method for bidirectional storage, processing and transmission of electrical information
CN116705101A (en) * 2023-05-23 2023-09-05 广东匠芯创科技有限公司 Data processing method of multi-PSRAM (particle random Access memory) particle chip, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN118841053B (en) 2024-12-10

Similar Documents

Publication Publication Date Title
CN113553277A (en) High-throughput and low-delay PHY (physical layer) interface circuit device of DDR5SDRAM (synchronous dynamic random access memory)
US9411538B2 (en) Memory systems and methods for controlling the timing of receiving read data
US6532525B1 (en) Method and apparatus for accessing memory
US7133991B2 (en) Method and system for capturing and bypassing memory transactions in a hub-based memory system
KR100909805B1 (en) Multiport memory device
KR20110089321A (en) Method and system for improving serial port memory communication latency and reliability
CN109313918B (en) Memory component with input/output data rate alignment
JP2007525766A (en) Collision detection in multiport memory systems
US7349285B2 (en) Dual port memory unit using a single port memory core
CN112988647A (en) TileLink bus-to-AXI 4 bus conversion system and method
CN117312210B (en) Method for expanding performance of RISC-V processor
US20040064660A1 (en) Multiplexed bus with multiple timing signals
CN116107923B (en) BRAM-based many-to-many high-speed memory access architecture and memory access system
CN108897696B (en) Large-capacity FIFO controller based on DDRx memory
US6324122B1 (en) RAM synchronized with a signal
CN118841053A (en) FPGA system based on PSRAM particles and control method and equipment thereof
WO2023283886A1 (en) Register array circuit and method for accessing register array
CN112463668B (en) A multi-channel high-speed data access structure based on STT-MRAM
CN114741331A (en) Data caching device, system and data processing method
JP2944280B2 (en) Interface circuit
US6766403B2 (en) CPU system with high-speed peripheral LSI circuit
CN114840458B (en) Read-write module, system on chip and electronic equipment
JP4114749B2 (en) MEMORY CONTROL DEVICE AND ELECTRONIC DEVICE
CN118503162A (en) SRAM controller, electronic device and SRAM control method
Ganesh et al. High-Performance ASIC Design for Pipelined DDR2 SDRAM Controllers

Legal Events

Date Code Title Description
PB01 Publication
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