FPGA prototype verification method and device, storage medium and electronic equipment
In the FPGA prototype verification of the lidar chip, the bridge module is used for inter-board cascading and frame extraction processing, which solves the problem of cross-board transmission rate limitation, improves the verification efficiency and effect, and realizes efficient cross-board point cloud frame data Balance of board transfer and chip handling.
Patent Information
- Application Number
- CN202310379323.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
During the FPGA prototype verification process of the lidar chip, the cross-board transmission rate was limited, resulting in reduced processing performance and the inability to fully verify the chip function.
Through the bridge module, the first FPGA board and the second FPGA board to be verified are cascaded between boards, the point cloud frame data is acquired and extracted, and only the extracted data is transmitted to the second FPGA board for prototype verification and balance Point cloud transmission bandwidth and chip processing bandwidth.
It improves the efficiency and effect of FPGA prototype verification, ensures that the second FPGA board can meet the amount of data required for prototype verification, and avoids down-frequency operation problems caused by low cross-board transmission efficiency.
Smart Images

Figure CN118734756A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of laser radar technology, and in particular to an FPGA prototype verification method, device, storage medium and electronic device based on a laser radar chip. Background Art
[0002] LiDAR is a radar system that emits laser beams to detect target characteristics such as position and speed. Its working principle is to first emit a detection laser beam to the target, and then compare the received signal reflected from the target with the transmitted signal. After appropriate processing, relevant information about the target can be obtained, such as target distance, direction, altitude, speed, attitude, and even shape parameters. Summary of the invention
[0003] The embodiment of the present application provides a FPGA prototype verification method, device, storage medium and electronic device based on a laser radar chip, and the technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides an FPGA prototype verification method based on a laser radar chip, the method comprising:
[0005] The first FPGA board is cascaded with the second FPGA board to be verified through a bridge module;
[0006] Acquire at least one frame of first point cloud frame data generated by the first FPGA board, and perform frame extraction processing on the at least one frame of first point cloud frame data to obtain at least one frame of second point cloud frame data;
[0007] The second point cloud frame data is transmitted across boards to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data.
[0008] In a second aspect, an embodiment of the present application provides an FPGA prototype verification device based on a laser radar chip, the device comprising:
[0009] An inter-board cascade module, used for inter-board cascading the first FPGA board and the second FPGA board to be verified through a bridge module;
[0010] A data acquisition module, used for acquiring at least one frame of first point cloud frame data generated by the first FPGA board, and performing frame extraction processing on the at least one frame of first point cloud frame data to obtain at least one frame of second point cloud frame data;
[0011] A data transmission module is used to transmit the second point cloud frame data across boards to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data.
[0012] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0013] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0014] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:
[0015] In one or more embodiments of the present application, the laser radar cascades the first FPGA board and the second FPGA board to be verified through a bridge module, extracts at least one frame of first point cloud frame data collected by the first FPGA board, and obtains at least one frame of second point cloud frame data. In the cross-board transmission stage, it is not necessary to transmit all the first point cloud frame data. Instead, the extracted second point cloud frame data is transmitted across the board to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data. The point cloud frame data extraction processing effectively balances the point cloud transmission bandwidth and the chip processing bandwidth, and enables the point cloud frame data to be efficiently transmitted across boards to meet the data volume required for prototype verification by the second FPGA board, thereby improving the efficiency of FPGA prototype verification and ensuring the effect of FPGA prototype verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in this specification or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is a schematic diagram of an application scenario based on laser radar provided in an embodiment of the present application;
[0018] Figure 2 is a schematic diagram of the structure of a laser radar provided in an embodiment of the present application;
[0019] Figure 3 This is an FPGA prototype verification method based on a laser radar chip provided in an embodiment of the present application;
[0020] Figure 4 It is a schematic diagram of a process of frame extraction transmission provided by an embodiment of the present application;
[0021] Figure 5 This is a timing diagram of video frame transmission provided by an embodiment of the present application;
[0022] Figure 6 This is a timing diagram of a point cloud frame transmission provided by an embodiment of the present application;
[0023] Figure 7 is a flowchart of an exemplary frame extraction process provided in an embodiment of the present application;
[0024] Figure 8 It is a schematic diagram of a FPGA prototype verification device based on a laser radar chip provided in an embodiment of the present application;
[0025] Fig. 9 It is a module schematic diagram of a data acquisition module provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in this specification to clearly and completely describe the technical solutions in this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0027] In the description of this specification, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in this specification can be understood in specific circumstances. In addition, in the description of this specification, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0028] Due to the high chip production cost and in order to shorten the debugging cycle of software and hardware after the development of a new version of the LiDAR chip, an FPGA board will be used to simulate the functions of the LiDAR chip design as the FPGA board to be verified before the chip is produced, and a verification platform will be formed with the applied FPGA board to perform FPGA prototype verification on the functions of the LiDAR chip design. However, the prototype verification design of the LiDAR involves the coordinated control of the sensor and the servo control of the electrical characteristics, and can only output point cloud frame data according to the nominal parameter standards of the LiDAR. The FPGA prototype verification stage involves the process of transmitting the point cloud data generated by the FPGA board across boards to the FPGA board to be verified. Due to the objective cross-board transmission rate, the FPGA board to be verified can only be operated at a reduced frequency to process the point cloud data, which greatly reduces the processing performance of the chip and makes it impossible to fully verify the functions of the LiDAR chip.
[0029] In one or more embodiments of this specification, please refer to Figure 1 , Figure 1 FIG. 1 shows a schematic diagram of an application scenario based on laser radar provided in this specification. Figure 1 As shown, the application scenario includes: a laser radar 101 and a vehicle 102. The laser radar 101 is installed on various vehicles 102 that need to detect the surrounding environment. The vehicle 102 can be, for example, a vehicle, a ship, an aircraft, etc.
[0030] Optionally, when the vehicle 102 is a vehicle, the laser radar can be installed on the front, rear, roof, side of the vehicle, or any other body position where the laser radar can be fixed. It is understood that the laser radar can also be fixed on other device structure platforms that are externally connected to the vehicle. It is understood that the external device structure platform can keep running synchronously with the vehicle when the vehicle is running.
[0031] Among them, the laser radar 10 can be a mechanical laser radar, a solid-state laser radar, etc. This application does not limit the type of laser radar.
[0032] Among them, the laser radar 10 device is used to emit a detection laser signal. After the detection laser signal encounters an obstacle, it is reflected to generate an echo laser signal. The laser radar 10 generates a point cloud data frame based on the echo laser signal. The point cloud data frame includes multiple point cloud data, and each point cloud data includes spatial position coordinates, timestamp and echo intensity.
[0033] In one or more embodiments of this specification, see Figure 2, is a structural schematic diagram of a laser radar provided in this specification, the laser radar, which at least includes a transmitting device 10, a scanning device 20 and a receiving device 30, wherein: the transmitting device 10 is used to transmit a detection laser; the scanning device 20 is used to receive the detection laser and emit the detection laser to the detection field of view; wherein the detection laser signal is reflected after encountering an obstacle to generate an echo laser signal; the scanning device 20 is also used to receive the echo laser and deflect the echo laser to the receiving device 30; the receiving device 30 (also referred to as a receiving module) is used to receive the echo laser. The laser radar carried by the laser radar can generate a point cloud data frame according to the echo laser signal, and the point cloud data frame includes multiple point cloud data.
[0034] The present application is described in detail below with reference to specific embodiments.
[0035] In one embodiment, Figure 3 As shown, a FPGA prototype verification method based on a laser radar chip is proposed, which can be implemented by a computer program and can be run on an FPGA prototype verification device based on a laser radar chip based on a von Neumann system. The computer program can be integrated into an application or run as an independent tool application. The FPGA prototype verification device based on a laser radar chip can be a laser radar.
[0036] Specifically, the FPGA prototype verification method based on the lidar chip includes:
[0037] S101: cascading a first FPGA board and a second FPGA board to be verified through a bridge module.
[0038] The main control part of the LiDAR can be implemented with FPGA or ASIC (Application Specific Integrated Circuit), i.e., LiDAR chip. The integration of ASIC chip is greater than that of FPGA. With the evolution of LiDAR technology, it is a development trend to use ASIC chip technology to implement the main control part.
[0039] LiDAR requires a lot of signal processing, transmission and reception timing control, etc. Usually, the main control part of LiDAR includes functions such as transmission control, reception control, scanning control, and signal processing. In order to improve the integration and reliability of LiDAR, the main control part is upgraded from FPGA to ASIC chip (i.e. LiDAR chip), and the above-mentioned transmission control, reception control, scanning control, signal processing and other functions are realized through LiDAR chip.
[0040] In order to verify whether the design of the laser radar chip can achieve the above functions, it is necessary to make a test sample of the laser radar chip and then conduct actual measurement. However, the chip casting cost is high. Before the test sample is made, the FPGA board can be used to simulate the function of the chip to verify the design. This process is called FPGA prototype verification. For example, the main control part of the laser radar that has been calibrated (usually an FPGA board) can be used as the first FPGA board in this specification. The number of the first FPGA board can be one or more, and there is no specific restriction. For the newly developed ASIC chip, the code of its functional module will be written into the second FPGA board to be verified, and the verification platform will be composed of the first FPGA board that has been applied and the second FPGA board to be verified. The first FPGA board and the second FPGA board on the verification platform are used as the main control part to operate and control the laser radar, realizing the laser radar functions such as transmission, reception, scanning, and processing. The multiple functions of the laser radar to be verified can be set on the first FPGA board and the second FPGA board respectively according to the verification needs. For example, when the scanning control function of the laser radar needs to be verified, the function module of the scanning control on the second FPGA board to be verified is run to drive the scanning component of the laser radar.
[0041] Furthermore, the signal processing function will be set at least on the second FPGA board. Due to the complexity of the signal processing process, the function that the laser radar chip most needs to integrate is the signal processing function. During the FPGA prototype verification process, the first FPGA board is at least used to generate the point cloud frame data required for the prototype verification, that is, the laser radar transmits the point cloud frame data generated based on the first FPGA board to the second FPGA board, runs the signal processing function through the second FPGA board, outputs the detection results, and completes the function verification by comparing the detection results to achieve FPGA prototype verification. It can be understood that the object of FPGA prototype verification in this specification is the second FPGA board, and the first FPGA board and the second FPGA board to be verified are cascaded through a bridge module for transmitting point cloud frame data.
[0042] The bridge module may be a module that uses a data transmission protocol such as the chip2chip protocol. For example, the verification platform uses a bridge module of the chip2chip protocol to perform inter-board cascading between the first FPGA board and the second FPGA board to be verified. Data transmission protocols such as the chip2chip protocol are IPs designed based on the AXI bus protocol, and may be burst transmissions that support burst256 at most. When cascading between boards, the AHB bus is involved. The maximum burst length of the AHB bus is limited, for example, only 16. At this time, it is necessary to split it into 16 burst16 transmissions to match the transmission efficiency of one AXIburst256. On the other hand, the AXI bus has a reverse handshake mechanism, that is, after the system write address and write data are transmitted to the opposite verification board (that is, the second FPGA board) (the one-way write delay is more than 30 cycles), it is necessary to wait for the opposite verification board to return a "response" response message such as "okey" before sending the next point cloud frame data. Such a round-trip delay plus the time for the point cloud frame data itself to be transmitted takes a total of more than 75 cycles. Among them, only 16 cycles are truly effective for data transmission, and the effective bandwidth utilization rate is only about 20%. Since the point frequency output by the LiDAR is fixed, the frequency of the point cloud frame data generated by the first FPGA board is fixed. When it comes to cross-board data transmission, the low bandwidth capacity of the bridge module becomes a bottleneck for FPGA prototype verification of the LiDAR chip.
[0043] S102: Acquire at least one frame of first point cloud frame data generated by the first FPGA board, and perform frame extraction processing on the at least one frame of first point cloud frame data to obtain at least one frame of second point cloud frame data.
[0044] The first FPGA board drives the calibrated laser radar and generates the first point cloud frame data, transmits the data across boards through the bridge module, and sends several point cloud frame data to the second FPGA board. The second FPGA board performs prototype verification based on the input several point cloud frame data.
[0045] When data is transmitted across boards, the data transmission efficiency of the bridge module of data transmission protocols such as chip2chip protocol is low. It is necessary to extract the first point cloud frame data so that the point cloud frame data can be transmitted to the second FPGA board in the form of a complete frame for prototype verification.
[0046] The first point cloud frame data can be understood as the original point cloud frame data collected by the first FPGA board after the laser radar is running; it can be the first FPGA board driving the laser radar to run, or it can be the second FPGA board driving the laser radar to run. The second point cloud frame data can be understood as the point cloud frame data to be transmitted across boards to the second FPGA board after the frame extraction processing of a number of first point cloud frame data.
[0047] Optionally, when the first FPGA board generates at least one frame of first point cloud frame data, the set frame extraction ratio can be used to perform frame extraction processing on several first point cloud frame data. For example, the frame extraction ratio can be 1 / 3, then one frame of point cloud frame data is extracted for every three frames of first point cloud frame data, and one frame of first point cloud frame data is extracted, and the remaining two frames of first point cloud frame data can be cleared.
[0048] Optionally, the set frame extraction time may be used to perform frame extraction processing on a plurality of first point cloud frame data; for example, one or more frames of first point cloud frame data may be extracted at a certain frame extraction time interval.
[0049] S103: Transmit the second point cloud frame data across boards to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data.
[0050] It can be understood that after the laser radar extracts the first point cloud frame data generated by the first FPGA board to obtain at least one frame of the second point cloud frame data, it transmits the second point cloud frame data across the board to the second FPGA board through the bridge module. The second FPGA board runs the code of the functional module to be verified based on the received second point cloud frame data. Usually, the architecture and code of the functional module to be verified (such as the aforementioned processing function) are stored on the second FPGA board. The transmitted second point cloud frame data is used as the input of the second FPGA board. The second FPGA board runs the code to obtain the result based on the input calculation and output the result, and compares the output result for prototype verification.
[0051] Among them, the specific process of FPGA prototype verification of the lidar chip based on point cloud frame data can refer to the introduction of FPGA prototype verification in the relevant technology, which is not limited here.
[0052] In one or more embodiments of the present specification, the laser radar cascades the first FPGA board and the second FPGA board to be verified through a bridge module, extracts at least one frame of first point cloud frame data collected by the first FPGA board, and obtains at least one frame of second point cloud frame data. In the cross-board transmission stage, it is not necessary to transmit all the first point cloud frame data. Instead, the extracted second point cloud frame data is transmitted across the board to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data. The point cloud frame data extraction processing effectively balances the point cloud transmission bandwidth and the chip processing bandwidth, and enables the point cloud frame data to be efficiently transmitted across boards to meet the data volume required for prototype verification by the second FPGA board, thereby improving the efficiency of FPGA prototype verification and ensuring the effect of FPGA prototype verification.
[0053] In one possible implementation, please refer to Figure 4 , Figure 4 It is a schematic diagram of the process of frame extraction transmission. When the laser radar executes step S103, "transmitting the second point cloud frame data to the second FPGA board through the bridge module across the board" can be:
[0054] S2002: Determine a first data transmission time period corresponding to the second point cloud frame data and a second data transmission time period corresponding to the third point cloud frame data.
[0055] The third point cloud frame data is the point cloud frame data in the first point cloud frame data except the second point cloud frame data. The first data transmission time period is the transmission time required for the first FPGA board's intra-frame data transmission bandwidth to transmit the second point cloud frame data; the second data transmission time period is the transmission time required for the first FPGA board's intra-frame data transmission bandwidth to transmit the third point cloud frame data.
[0056] S2004: Cache the second point cloud frame data, and transmit the second point cloud frame data to the second FPGA board based on the first data transmission time period and the second data transmission time period.
[0057] The third point cloud frame data can be deleted and the second point cloud frame data can be cached. In the first data transmission time period and the second data transmission time period, the second point cloud frame data is transmitted to the second FPGA board through the bridge module.
[0058] In practical applications, the data transmission bandwidth within a frame may still exceed the maximum data transmission bandwidth of the bridge module, such as the chip2chip protocol. Therefore, it is necessary to cache the second point cloud frame data of this frame, and then use the time gain of the removed frame to continue sending the untransmitted data in the second point cloud frame data to the second FPGA board. That is, after deleting the third point cloud frame data, the second data transmission time period can be used to continue transmitting the second point cloud frame data.
[0059] By adopting the method of one or more embodiments of the present specification, the frame rate of the laser radar output point cloud frame data is reduced by frame extraction, so that the point cloud frame data can be transmitted as a complete frame to the second FPGA board, meeting the data volume required for the prototype verification of the second FPGA board, and enabling the point cloud frame data to be efficiently transmitted across boards, effectively balancing the point cloud transmission bandwidth and the chip processing bandwidth, improving the efficiency of FPGA prototype verification, and ensuring the effect of FPGA prototype verification.
[0060] In one or more embodiments of the present specification, the laser radar performs "extracting frames for at least one frame of first point cloud frame data" in step S102 may be:
[0061] A2: Get the point cloud counting data corresponding to the point cloud counter;
[0062] The point cloud counter is used to count each point in the point cloud data. Since the point cloud of the laser radar is discrete, the output time of each point in the point cloud data depends on the scanning method of the laser radar and the distribution of the measured targets in the field of view. For the laser radar using MEMS (micro-electromechanical system) scanning, the MEMS galvanometer completes a scanning cycle, and the point cloud data obtained in one scanning cycle constitutes a complete frame of point cloud frame data. The output time of each point in the point cloud data obtained during the laser radar scanning process is random within a certain range. The row count and column count of each point in the point cloud data are realized through the point cloud counter.
[0063] A4: Determine a point cloud frame timing corresponding to at least one frame of first point cloud frame data based on the point cloud counting data, and perform frame extraction processing on at least one frame of first point cloud frame data based on the point cloud frame timing.
[0064] The frame extraction process can be to extract i frames (i is a positive integer) of point cloud data from multiple frames of point cloud data of the first point cloud frame data according to the point cloud frame timing. For example, the frame extraction process is to extract i frames every n frames, n is a positive integer, and n>i. At this time, the first point cloud frame data contains n frames of point cloud frame data, and i frames of point cloud frame data need to be extracted. These i frames of point cloud frame data are the aforementioned second point cloud frame data, and the remaining (ni) frames of point cloud data are the aforementioned third point cloud frame data.
[0065] Furthermore, after extracting i frames of point cloud frame data, the third point cloud frame data may be deleted and the second point cloud frame data may be cached. The cached second point cloud frame data is the data to be transmitted to the second FPGA board.
[0066] The point cloud frames of the LiDAR are different from the video frames of the video stream. The corresponding internal processing mechanisms of point cloud frame extraction and video frame extraction are quite different, as follows:
[0067] like Figure 5 As shown, Figure 5 It is a timing diagram of video frame transmission. Video frame transmission is processed based on the timing of field synchronization (Vsync), line synchronization (Hsync) and data valid indication (DE). Since each pixel in the video frame is acquired at the same time and output in sequence, the traditional video frame extraction can directly determine the end of a frame of video frame data based on the falling edge of Vsync, which is also the beginning of the next frame of video frame data. The falling edge mark of Vsync can be used to count the number of frames and perform frame extraction processing.
[0068] A frame of point cloud data is a data set of points in a certain coordinate system. The points in the point cloud data contain rich information and are discrete. For example, if the point frequency parameter of the laser radar system is 125*126, then a frame of point cloud data contains 125*126 points.
[0069] The first point cloud frame data includes multiple frames of point cloud frame data. The point cloud frame timing refers to the timing of multiple frames of point cloud frame data in the first point cloud frame data, that is, the starting time of each frame of point cloud frame data. The point cloud count data is compared with the point frequency parameter of the laser radar system to obtain valid frame start information frame_start; the frame timing count is performed for each frame start information frame_start, and the count value of the frame start information frame_start can be used to determine the point cloud frame timing of each frame of point cloud frame data in the first point cloud frame data.
[0070] Taking the point frequency parameter of the aforementioned laser radar system as 125*126 as an example, the point cloud counter starts from the first point of the point cloud, counts each point of the point cloud data, and matches the point cloud count data with the point frequency parameter of the laser radar system (such as 125*126). Whenever the point cloud count data is (x*125*126+1), the corresponding point is the starting point of the xth (x is an integer) frame of point cloud frame data. The frame start information is the time describing the starting point of each frame of point cloud frame data, recorded as frame_start; through the count value of the frame start information frame_start, the point cloud frame timing of each frame of point cloud frame data in the first point cloud frame data can be determined. Alternatively, a frame start information frame_start can be obtained at the starting point of the initial point cloud frame data, and the frame timing count is 1; at this time, the point cloud counter starts counting from the starting point. When the row count value of the point cloud counter is 125 and the column count value is 126, it can be known that a complete frame of point cloud frame data has been obtained. The next point is the starting point of the next point cloud frame data, and the corresponding moment is the starting moment of the next point cloud frame data. A frame start information frame_start is obtained, and the frame timing count is 2. The point cloud counter is cleared and starts counting again. And so on, until the frame timing count is n, the timing of each frame of the point cloud frame data in the first point cloud frame data can be obtained through the count value of the frame start information frame_start.
[0071] Indicatively, Figure 6 As shown, Figure 6 It is a timing diagram of point cloud frame transmission. The corresponding frame extraction processing method is to extract 1 frame of point cloud frame data every 3 frames for cross-board transmission to the laser radar chip, and the remaining 2 frames of data are discarded. frame_start is the frame start information of each point cloud frame data in the first point cloud frame data. frame_number is a cyclic increment counter with a maximum value of 2, which counts the frame start information in the first point cloud frame data; frame_valid is a valid indication signal of frame_number=0, and frame_valid is used as the valid output signal of the second point cloud frame data to be transmitted to the FPGA board after frame extraction processing.
[0072] The laser radar is converted from the first point cloud frame data into multiple point cloud frame data ( Figure 6 Extract the second point cloud frame data from frame_number=0, frame_number=1, frame_number=2) ( Figure 6 frame_number=0) and cache; at the same time, the laser radar can delete the third point cloud frame data ( Figure 6 The second point cloud frame data is transmitted to the second FPGA board using the first data transmission time period and the second data transmission time period.
[0073] In one or more embodiments of the present specification, frame start information can be accurately determined from discrete point clouds by point counting, and then the point cloud frame timing can be determined, and the point cloud frame data to be extracted in the next frame extraction process can be determined based on the point cloud frame timing. Point cloud frame data frame extraction processing can effectively balance the point cloud transmission bandwidth and chip processing bandwidth. Through the mechanism of frame extraction processing and frame buffer transmission, point cloud frame data can be efficiently transmitted across boards to meet the data volume required for prototype verification on the second FPGA board, avoiding the poor efficiency of FPGA prototype verification caused by low cross-board transmission efficiency and frequency reduction operation, and ensuring the reliability of FPGA prototype verification.
[0074] In one or more embodiments of the present specification, the maximum main frequency of the system in the main control part is often adjusted due to the iteration of the chip version or system version during the FPGA prototype verification process, and the adjustment of the system main frequency will cause an imbalance between the point frequency and processing power of the laser radar output point cloud. If too much second point cloud frame data is extracted, the bridge module bandwidth will be insufficient, and the complete second point cloud frame data cannot be transmitted to the second FPGA board; if too little second point cloud frame data is extracted, the processing function module on the second FPGA board can only obtain a small amount of data, and it needs to reduce the frequency to process the data, and it cannot be fully verified. In order to solve the above problems, it is necessary to reset the frame extraction number so that the output point frequency of the second point cloud frame data obtained by frame extraction matches the current processing power to ensure that the point cloud frame data is not lost during the transmission of the point cloud frame data across boards. In one or more embodiments of the present specification, Figure 6 A flowchart of an exemplary frame extraction process is provided. Optionally, based on one or more of the above embodiments, in the step of "extracting at least one frame of the first point cloud frame data to obtain at least one frame of the second point cloud frame data", the following scheme may also be included:
[0075] S202: Detect the system main clock frequency of the second FPGA board.
[0076] The system master clock frequency may be the clock frequency of the second FPGA board to be verified on the verification platform, and may be obtained by detecting or monitoring the system master clock frequency of the second FPGA board.
[0077] In schematic form, the system master clock frequency of the second FPGA board is related to the reference clock frequency of the laser radar, and the system master clock frequency is obtained by dividing or multiplying the reference clock obtained from the off-chip reference clock pin of the second FPGA board. The reference clock frequency is the clock frequency of the main control part of the laser radar system, which is always fixed at a frequency.
[0078] The reference clock and the system master clock can be counted simultaneously. When the reference clock count value reaches a preset value, the count value of the system master clock is read, and the system master clock frequency can be obtained by calculation.
[0079] The reference clock count value, the system master clock count value and the reference clock frequency are input into the target calculation formula to obtain the system master clock frequency of the second FPGA board.
[0080] The target calculation formula satisfies the following formula:
[0081] S=(x / y)*m
[0082] Wherein, S is the system master clock frequency, x is the system master clock count value, y is the reference clock count value, and m is the reference clock frequency.
[0083] For example, if the reference clock frequency is 100MHz, the verification platform generates a common counting start signal. When the system master clock and the off-chip reference clock detect the start signal, they count according to their respective clock cycles. When the reference clock counts to 1000 cycles (that is, the reference clock count value is 1000), the counting stops at the same time. At this time, the count value of the system master clock is 900. The target calculation formula is used to calculate the system master clock frequency as (900 / 1000)*100MHz=90MHz.
[0084] S204: Determine target frame extraction parameters based on the system master clock frequency.
[0085] It is understandable that a suitable target frame extraction parameter can be matched according to the system main clock frequency of the second FPGA board to perform subsequent frame extraction processing.
[0086] In a feasible implementation, the system master clock frequency of the second FPGA board is adjusted to re-match a suitable number of frame extractions. First, a number of different "frequency gears" are divided according to the frequency range, and each frequency gear can be set with a corresponding ideal number of frame extractions; that is, a relationship is established between the "frequency gear" and the number of frame extractions to obtain a gear frame extraction mapping relationship, and the gear frame extraction mapping relationship can be characterized by one or more fittings in the form of a mapping relationship list, a mapping relationship value, a mapping relationship chain, etc. The relationship between these "frequency gears" and the number of frame extractions can be established and saved as a lookup table, the index of the table entry is "frequency gear", and the item of the table is the number of frame extractions.
[0087] Specifically, the system master clock frequency of the second FPGA board can be obtained first, and the target frequency range to which it belongs can be determined according to the system master clock frequency, and the target frequency gear corresponding to the target frequency range can be determined. In practical applications, the target frequency range to which the system master clock frequency belongs can be determined, and the corresponding target frequency gear can be determined accordingly. Obtain the saved gear frame extraction mapping relationship, and determine the target frame extraction parameters corresponding to the target frequency gear according to the gear frame extraction mapping relationship, that is, determine the target frame extraction parameters based on the system master clock frequency and the gear frame extraction mapping relationship. Then, frame extraction processing is performed on a number of first point cloud frame data based on the target frame extraction parameters to obtain at least one frame of second point cloud frame data.
[0088] Taking the above example, the system main clock frequency is 90MHz. The target frequency range is determined based on 90MHz, and the target frequency gear corresponding to the target frequency range is determined to be 3 gears. The frame extraction frame rate corresponding to 3 gears is found in the gear frame extraction mapping relationship, and it is used as the target frame extraction parameter to achieve adaptive frame extraction frame rate.
[0089] It can be understood that by determining the target frame extraction parameters through the mapping relationship between the system main clock frequency and the gear frame extraction, the frame extraction number can be adaptively adjusted to a suitable value. Usually, the smaller the gear interval is, the higher the frame extraction adjustment accuracy is.
[0090] S206: Perform frame extraction processing on at least one frame of first point cloud frame data based on the target frame extraction parameter to obtain at least one frame of second point cloud frame data.
[0091] If the target frame extraction parameter can be to extract one frame every three frames, then every three frames of point cloud frame data are the first point cloud frame data, and one frame of point cloud frame data is extracted according to every three frames of point cloud frame data. The extracted point cloud frame data is used as the second point cloud frame data to be transmitted across versions, and the remaining two frames of point cloud frame data are ignored.
[0092] In one or more embodiments of the present specification, it is not necessary to transmit all of the first point cloud frame data during the cross-board transmission stage. Instead, the second point cloud frame data after frame extraction by the bridge module is transmitted across the board. The point cloud frame data extraction process effectively balances the point cloud transmission bandwidth and the chip processing bandwidth, thereby ensuring the effect of FPGA prototype verification on the existing lidar.
[0093] The following will be combined Figure 8 , the FPGA prototype verification device based on the laser radar chip provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 8 The FPGA prototype verification device based on the laser radar chip shown is used to execute the application Figure 1 to Figure 7 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 1 to Figure 7 The embodiment shown.
[0094] See also Figure 8 , which shows a schematic diagram of the structure of the FPGA prototype verification device based on the laser radar chip according to an embodiment of the present application. The FPGA prototype verification device 1 based on the laser radar chip can be implemented as all or part of an electronic device through software, hardware, or a combination of both. According to some embodiments, the FPGA prototype verification device 1 based on the laser radar chip includes an inter-board cascade module 11, a data acquisition module 12, and a data transmission module 13, which are specifically used for:
[0095] An inter-board cascade module 11, used for inter-board cascading the first FPGA board and the second FPGA board to be verified through a bridge module;
[0096] A data acquisition module 12 is used to acquire at least one frame of first point cloud frame data generated by the first FPGA board, and perform frame extraction processing on the at least one frame of first point cloud frame data to obtain at least one frame of second point cloud frame data;
[0097] The data transmission module 13 is used to transmit the second point cloud frame data across boards to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data.
[0098] Optional, such as Fig. 9 As shown, the data acquisition module 12 includes:
[0099] A frequency detection unit 121, used to detect the system main clock frequency of the second FPGA board;
[0100] The frame extraction processing unit 122 is used to determine the target frame extraction parameters based on the system main clock frequency, and perform frame extraction processing on the at least one frame of the first point cloud frame data based on the target frame extraction parameters to obtain at least one frame of the second point cloud frame data.
[0101] Optionally, the frame extraction processing unit 122 is specifically configured to:
[0102] Obtain the saved gear position frame extraction mapping relationship;
[0103] Based on the system main clock frequency and the gear frame extraction mapping relationship, a target frame extraction parameter is determined.
[0104] Optionally, the frame extraction processing unit 122 is specifically configured to:
[0105] Obtaining a target frequency range to which the system master clock frequency belongs, and determining a target frequency gear corresponding to the target frequency range;
[0106] The target frame extraction parameter corresponding to the target frequency gear is determined in the gear frame extraction mapping relationship.
[0107] Optionally, the data acquisition module 12 is specifically used for:
[0108] Get the reference clock frequency of the laser radar ;
[0109] Determine a reference clock count value of the laser radar and a system master clock count value of the second FPGA board;
[0110] Obtaining the system master clock frequency of the second FPGA board based on the reference clock count value, the system master clock count value and the reference clock frequency;
[0111] Optionally, the data acquisition module 12 is specifically used for:
[0112] The reference clock count value, the system master clock count value and the reference clock frequency are input into the target calculation formula to obtain the system master clock frequency of the second FPGA board.
[0113] The target calculation formula satisfies the following formula:
[0114] S=(x / y)*m
[0115] Wherein, S is the system master clock frequency, x is the system master clock count value, y is the reference clock count value, and m is the reference clock frequency.
[0116] Optionally, the data acquisition module 12 is specifically used for:
[0117] Get the point cloud counting data corresponding to the point cloud counter;
[0118] The point cloud frame timing corresponding to the at least one frame of first point cloud frame data is determined based on the point cloud counting data, and frame extraction processing is performed on the at least one frame of first point cloud frame data based on the point cloud frame timing.
[0119] Optionally, the data acquisition module 12 is specifically used for:
[0120] Perform signal matching on the point cloud counting data and the system point frequency parameter to obtain frame start information;
[0121] Frame timing counting processing is performed based on the frame start information to obtain the point cloud frame timing corresponding to the at least one frame of first point cloud frame data.
[0122] Optionally, the data transmission module 13 is used to:
[0123] Determine a first data transmission time period corresponding to the second point cloud frame data and a second data transmission time period for the third point cloud frame data, wherein the third point cloud frame data is the point cloud frame data in all the first point cloud frame data except the second point cloud frame data;
[0124] The second point cloud frame data is cached, and the second point cloud frame data is transmitted to the second FPGA board based on the first data transmission time period and the second data transmission time period.
[0125] It should be noted that the FPGA prototype verification device based on the laser radar chip provided in the above embodiment only uses the division of the above functional modules as an example when executing the FPGA prototype verification method based on the laser radar chip. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the FPGA prototype verification device based on the laser radar chip provided in the above embodiment and the FPGA prototype verification method based on the laser radar chip belong to the same concept. The implementation process is detailed in the method embodiment, which will not be repeated here.
[0126] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0127] In one or more embodiments of the present specification, the laser radar cascades the first FPGA board and the second FPGA board to be verified through a bridge module, extracts at least one frame of first point cloud frame data collected by the first FPGA board, and obtains at least one frame of second point cloud frame data. In the cross-board transmission stage, it is not necessary to transmit all the first point cloud frame data. Instead, the extracted second point cloud frame data is transmitted across the board to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data. The point cloud frame data extraction processing effectively balances the point cloud transmission bandwidth and the chip processing bandwidth, thereby improving the efficiency of FPGA prototype verification and ensuring the effect of FPGA prototype verification on the existing FPGA prototype board.
[0128] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 7 The FPGA prototype verification method based on the laser radar chip in the embodiment shown in the figure can be found in the specific execution process. Figure 1 to Figure 7 The specific description of the illustrated embodiment will not be repeated here.
[0129] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 7 The FPGA prototype verification method based on the laser radar chip of the embodiment is shown in the following example. For the specific execution process, please refer to Figure 1 to Figure 7 The specific description of the illustrated embodiment will not be repeated here.
[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0131] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A FPGA prototype verification method based on a laser radar chip, characterized in that: Applied to laser radar, the method comprises: The first FPGA board is cascaded with the second FPGA board to be verified through a bridge module; Acquire at least one frame of first point cloud frame data generated by the first FPGA board, and perform frame extraction processing on the at least one frame of first point cloud frame data to obtain at least one frame of second point cloud frame data; The second point cloud frame data is transmitted across boards to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data.
2. The method according to claim 1, characterized in that The step of performing frame extraction processing on the at least one frame of the first point cloud frame data to obtain at least one frame of the second point cloud frame data includes: Detecting the system master clock frequency of the second FPGA board; A target frame extraction parameter is determined based on the system master clock frequency, and frame extraction processing is performed on the at least one frame of the first point cloud frame data based on the target frame extraction parameter to obtain at least one frame of the second point cloud frame data.
3. The method according to claim 2, characterized in that The determining of the target frame extraction parameter based on the system master clock frequency comprises: Obtain the saved gear position frame extraction mapping relationship; Based on the system main clock frequency and the gear frame extraction mapping relationship, a target frame extraction parameter is determined.
4. The method according to claim 3, characterized in that The determining of target frame extraction parameters based on the system master clock frequency and the gear frame extraction mapping relationship includes: Obtaining a target frequency range to which the system master clock frequency belongs, and determining a target frequency gear corresponding to the target frequency range; The target frame extraction parameter corresponding to the target frequency gear is determined in the gear frame extraction mapping relationship.
5. The method according to claim 2, characterized in that: Detecting the system main clock frequency of the second FPGA board , include: Get the reference clock frequency of the laser radar ; Determine a reference clock count value of the laser radar and a system master clock count value of the second FPGA board; The system master clock frequency of the second FPGA board is obtained based on the reference clock count value, the system master clock count value and the reference clock frequency.
6. The method according to claim 5, characterized in that The obtaining the system master clock frequency of the second FPGA board based on the reference clock count value, the system master clock count value and the reference clock frequency includes: The reference clock count value, the system master clock count value and the reference clock frequency are input into the target calculation formula to obtain the system master clock frequency of the second FPGA board. The target calculation formula satisfies the following formula: S=(x / y)*m Wherein, S is the system master clock frequency, x is the system master clock count value, y is the reference clock count value, and m is the reference clock frequency.
7. The method according to claim 1, characterized in that The step of performing frame extraction processing on the at least one frame of first point cloud frame data comprises: Get the point cloud counting data corresponding to the point cloud counter; The point cloud frame timing corresponding to the at least one frame of first point cloud frame data is determined based on the point cloud counting data, and frame extraction processing is performed on the at least one frame of first point cloud frame data based on the point cloud frame timing.
8. The method according to claim 7, characterized in that The step of determining the point cloud frame timing corresponding to the at least one frame of first point cloud frame data based on the point cloud counting data comprises: Perform signal matching on the point cloud counting data and the system point frequency parameter to obtain frame start information; Frame timing counting processing is performed based on the frame start information to obtain the point cloud frame timing corresponding to the at least one frame of first point cloud frame data.
9. The method according to claim 1, characterized in that: The method of transmitting the second point cloud frame data across boards to the second FPGA board through the bridge module includes: Determine a first data transmission time period corresponding to the second point cloud frame data and a second data transmission time period for the third point cloud frame data, wherein the third point cloud frame data is the point cloud frame data in all the first point cloud frame data except the second point cloud frame data; The second point cloud frame data is cached, and the second point cloud frame data is transmitted to the second FPGA board based on the first data transmission time period and the second data transmission time period.
10. An FPGA prototype verification device based on a laser radar chip, characterized in that: The device comprises: An inter-board cascade module, used for inter-board cascading the first FPGA board and the second FPGA board to be verified through a bridge module; A data acquisition module, used for acquiring at least one frame of first point cloud frame data generated by the first FPGA board, and performing frame extraction processing on the at least one frame of first point cloud frame data to obtain at least one frame of second point cloud frame data; A data transmission module is used to transmit the second point cloud frame data across boards to the second FPGA board through the bridge module, so that the second FPGA board performs FPGA prototype verification based on the second point cloud frame data.
11. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 9.
12. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 9.
