Pedestrian positioning soc system and method based on riscv extension instruction
Patent Information
- Application Number
- CN202310255162.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-03-16
AI Technical Summary
[0003]针对现有技术中的上述不足,本发明提供的一种基于RISCV扩展指令的行人定位Soc系统及其方法解决了解决了传统行人定位系统运算性能不足的问题
[0035] S2. Based on the RISCV extended instructions, the RISCV processor, and pedestrian positioning data, the pedestrian positioning algorithm is used to calculate the vector instructions and vector data.
Smart Images

Figure CN116483443B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer architecture technology, and in particular relates to a pedestrian positioning SoC system and method based on RISCV extended instructions. Background Technology
[0002] In recent years, pedestrian positioning technology has been widely used in scenarios such as fire rescue, wilderness exploration and search and rescue, and car retrieval in underground parking garages. Faced with complex natural environments, a real-time, accurate, and portable pedestrian positioning system has become an inevitable trend in the development of related applications. Currently, pedestrian positioning technologies include external signal technologies based on platforms such as WiFi, Bluetooth, and RFID, and autonomous positioning technologies based on inertial navigation systems. Considering the development trends of practical application scenarios and functional devices, it is not difficult to imagine that the latter will occupy a place in the future pedestrian positioning market. Autonomous positioning technology based on inertial navigation systems involves Kalman filtering algorithms, which include a large number of vector matrix operations. Furthermore, with the development of pedestrian positioning technology and algorithm iterations, the amount of data that sensors need to detect in the same amount of time increases, increasing complexity. Traditional processor architectures require a significant amount of resources and time to perform these operations. Summary of the Invention
[0003] To address the aforementioned shortcomings in existing technologies, this invention provides a pedestrian positioning SoC system and method based on RISCV extended instructions, which solves the problem of insufficient computational performance in traditional pedestrian positioning systems.
[0004] To achieve the above-mentioned objectives, the technical solution adopted by the present invention is: a pedestrian positioning SoC system based on RISCV extended instructions, including a sensor and a SoC system;
[0005] The sensor is used to acquire raw data;
[0006] The SoC system is used to locate pedestrians based on raw data and RISCV extended instructions.
[0007] The beneficial effects of this invention are as follows: By flexibly utilizing the hardware resource scheduling of the SoC system, this invention processes the vector operations involved in the pedestrian localization algorithm, greatly improving the speed of vector data calculation. By accelerating the calculation of vector data, the pedestrian localization algorithm is accelerated, the number of instructions is reduced, and the performance of behavior localization SoC processing is improved.
[0008] Furthermore, the SoC system includes a RISC-V processor and a vector coprocessor;
[0009] The RISCV processor is used to generate vector instructions and extract vector data using a pedestrian localization algorithm based on the original data and RISCV extended instructions, and to complete the pedestrian localization algorithm calculation based on integer processing data and floating-point processing data to achieve pedestrian localization.
[0010] The vector coprocessor is used to process vector data according to vector instructions to obtain integer processing data and floating-point processing data.
[0011] The beneficial effects of the above-mentioned further solutions are: by using a vector coprocessor to accelerate the operation of vector data, the running speed of the pedestrian localization algorithm is improved; and by using a "vector coprocessor + RISC-V processor" approach, the number of instructions is reduced and the computing performance is improved.
[0012] Furthermore, the vector coprocessor includes an instruction dispatch module, an instruction execution module, and a storage module;
[0013] The instruction dispatch module is used to update status information and the execution progress of vector instructions; decode vector instructions to obtain vector operation configuration information, data type, operation type, and read / write operation information; and perform transmission operations on the vector operation configuration information, data type, operation type, and read / write operation information according to instruction execution occupancy information and storage occupancy information.
[0014] The instruction execution module is used to acquire instruction execution occupancy information, decode and process data types and operation types to obtain short operation instructions, and process vector data according to vector operation configuration information and short operation instructions to obtain integer processing data and floating-point processing data.
[0015] The storage module is used to acquire storage occupancy information, acquire vector data of the RISCV processor based on read and write operation information, and transmit integer processing data and floating-point processing data to the RISCV processor.
[0016] The beneficial effects of the above-mentioned further solutions are as follows: the processor architecture that combines the instruction dispatch module, the instruction execution module and the storage module can ensure the smooth flow of data paths to the greatest extent, and the functions of the three modules are clear and each performs its own duties, making the processor architecture clearer.
[0017] Furthermore, the instruction dispatch module includes a decoding unit, a control and status buffer, and an hazard handling unit;
[0018] The decoding unit is used to decode vector instructions to obtain vector operation configuration information, data type, operation type and read / write operation information, and transmit the vector operation configuration information, data type, operation type and read / write operation information to the control and status buffer according to the control signal.
[0019] The control and status buffer is used to update status information and the execution progress of vector instructions, and to transmit vector operation configuration information, data type and operation type to the instruction execution module and read / write operation information to the storage module according to the control signal.
[0020] The hazard processing unit is used to detect the existence and type of hazards by updating the lookup table based on the instruction execution occupancy information and storage occupancy information, and obtain control signals.
[0021] The beneficial effects of the above-mentioned further solution are as follows: the instruction dispatch module can reasonably schedule the execution order of instructions according to the occupancy of the internal functional units of the vector coprocessor, so as to maximize the pipelined execution of instructions and thus improve the speed of vector data computation.
[0022] Furthermore, the instruction execution module includes a scheduling unit, an arithmetic logic unit, a floating-point arithmetic unit, a request processing unit, and a register group;
[0023] The scheduling unit is used to decode the data type and operation type to obtain the short operation instruction, and to obtain the instruction execution occupancy information based on the first occupancy information, the second occupancy information and the third occupancy information;
[0024] The arithmetic logic unit is used to obtain first occupancy information, and according to vector operation configuration information, to obtain integer read / write requests using short operation instructions, and to perform calculations on the integer data to obtain integer processed data;
[0025] The floating-point arithmetic unit is used to obtain the second occupancy information, and according to the vector arithmetic configuration information, to obtain a floating-point number read / write request using short operation instructions, and to perform calculations on the floating-point number data to obtain floating-point number processing data;
[0026] The request processing unit is used to obtain third occupancy information, and according to the operation short instruction, use the register group occupancy information to detect the existence and type of hazards, obtain the read / write request priority, and obtain integer data and floating-point data according to the read / write request priority, integer read / write request and floating-point read / write request, and transmit the integer data and floating-point data to the arithmetic logic unit and the floating-point operation unit respectively, and transmit the integer processing data and floating-point processing data to the register group;
[0027] The register group is used to obtain register group occupancy information, obtain integer data and floating-point data based on vector data, and transmit the integer processing data and floating-point processing data to the storage module.
[0028] The beneficial effects of the above-mentioned further solution are as follows: the instruction execution module is essentially the execution site for vector computation operations, and its corresponding structure can ensure hardware support for various basic operation types of vector computation and smooth data path.
[0029] Furthermore, the storage module includes a storage unit and a loading unit;
[0030] The storage unit is used to acquire storage occupancy information, and to obtain integer processing data and floating-point processing data based on read and write operation information, and to transmit the integer processing data and floating-point processing data to the RISCV processor;
[0031] The loading unit is used to acquire storage occupancy information, and to obtain vector data of the RISC-V processor based on read and write operation information, and to transmit the vector data to the instruction execution module.
[0032] The beneficial effect of the above-mentioned further solution is that the storage module enables efficient data exchange between the vector coprocessor and the RISCV processor, thereby improving the execution speed of the pedestrian localization algorithm.
[0033] This invention provides a method for processing pedestrian localization SoCs based on RISCCV extended instructions, comprising the following steps:
[0034] S1. Use sensors to collect pedestrian positioning data in real time;
[0035] S2. Based on the RISCV extended instructions, the RISCV processor, and pedestrian positioning data, the pedestrian positioning algorithm is used to calculate the vector instructions and vector data.
[0036] S3. Based on the vector instructions, use the vector coprocessor to calculate the vector data to obtain the processed data;
[0037] S4. Based on the processed data, use the RISC-V processor to complete pedestrian localization.
[0038] The beneficial effects of this invention are as follows: This invention implements the pedestrian localization algorithm by combining a "vector coprocessor + RISC-V processor". The vector coprocessor processes the vector data in the pedestrian localization algorithm, which accelerates the processing speed of the vector data, thereby improving the running speed of the pedestrian localization algorithm and improving the performance of behavior localization SoC processing. Attached Figure Description
[0039] Figure 1 This is a system structure diagram of the present invention.
[0040] Figure 2 This is a flowchart of the method of the present invention. Detailed Implementation
[0041] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0042] Example 1
[0043] like Figure 1 As shown, a pedestrian positioning SoC system based on RISCV extended instructions includes a sensor and an SoC system.
[0044] The sensor is used to acquire raw data;
[0045] The SoC system is used to locate pedestrians based on raw data and RISCV extended instructions.
[0046] In this embodiment, the SoC system is a SoC system-on-a-chip or a system-on-a-chip.
[0047] The SoC system includes a RISC-CV processor and a vector coprocessor;
[0048] The RISCV processor is used to generate vector instructions and extract vector data using a pedestrian localization algorithm based on the original data and RISCV extended instructions, and to complete the pedestrian localization algorithm calculation based on integer processing data and floating-point processing data to achieve pedestrian localization.
[0049] The vector coprocessor is used to process vector data according to vector instructions to obtain integer processing data and floating-point processing data.
[0050] In this embodiment, the pedestrian positioning algorithm is a zero-velocity update algorithm based on an inertial sensor. The inertial sensor is generally composed of a three-axis accelerometer and a three-axis gyroscope. The data it measures is the acceleration of the sensor moving in a three-dimensional spatial coordinate system. The data is in the form of a three-dimensional matrix. The zero-velocity update algorithm uses Kalman filtering to reduce noise errors in the measurement data.
[0051] The vector coprocessor includes an instruction dispatch module, an instruction execution module, and a storage module;
[0052] The instruction dispatch module is used to update status information and the execution progress of vector instructions; decode vector instructions to obtain vector operation configuration information, data type, operation type, and read / write operation information; and perform transmission operations on the vector operation configuration information, data type, operation type, and read / write operation information according to instruction execution occupancy information and storage occupancy information.
[0053] The instruction execution module is used to acquire instruction execution occupancy information, decode and process data types and operation types to obtain short operation instructions, and process vector data according to vector operation configuration information and short operation instructions to obtain integer processing data and floating-point processing data.
[0054] The storage module is used to acquire storage occupancy information, acquire vector data of the RISCV processor based on read and write operation information, and transmit integer processing data and floating-point processing data to the RISCV processor.
[0055] In this embodiment, the instruction dispatch module decodes the vector instruction to obtain the vector long instruction. The decoded vector long instruction information includes module occupancy information, vector operation configuration information, read and write operation information, processing data type, operation type, register usage, etc. The vector configuration information includes the length of the vector data and the grouping multiple of the register group. The module occupancy information indicates whether the instruction was sent to the instruction execution module or the storage module, while the instruction execution occupancy information and the storage occupancy information indicate the occupancy status of each unit in the corresponding module.
[0056] The instruction dispatch module includes a decoding unit, a control and status buffer, and an hazard processing unit.
[0057] The decoding unit is used to decode vector instructions to obtain vector operation configuration information, data type, operation type and read / write operation information, and transmit the vector operation configuration information, data type, operation type and read / write operation information to the control and status buffer according to the control signal.
[0058] The control and status buffer is used to update status information and the execution progress of vector instructions, and to transmit vector operation configuration information, data type and operation type to the instruction execution module and read / write operation information to the storage module according to the control signal.
[0059] The hazard processing unit is used to detect the existence and type of hazards by updating the lookup table based on the instruction execution occupancy information and storage occupancy information, and obtain control signals.
[0060] In this embodiment, the hazard handling unit checks whether the instruction to be executed and the currently executed instruction have the same module occupancy and the same register occupancy (i.e., hazard existence and type) based on the instruction execution occupancy information and the storage occupancy information, that is, the occupancy information of each working unit transmitted by the instruction execution module and the storage module. When the instruction to be executed and the currently executed instruction do not have the same module occupancy and the same register occupancy, the hazard handling module will transmit a control signal to the decoding unit to allow the instruction to be issued; otherwise, it will transmit a control signal to disallow the instruction to be issued.
[0061] The instruction execution module includes a scheduling unit, an arithmetic logic unit, a floating-point arithmetic unit, a request processing unit, and a register group;
[0062] The scheduling unit is used to decode the data type and operation type to obtain the short operation instruction, and to obtain the instruction execution occupancy information based on the first occupancy information, the second occupancy information and the third occupancy information;
[0063] The arithmetic logic unit is used to obtain first occupancy information, and according to vector operation configuration information, to obtain integer read / write requests using short operation instructions, and to perform calculations on the integer data to obtain integer processed data;
[0064] The floating-point arithmetic unit is used to obtain the second occupancy information, and according to the vector arithmetic configuration information, to obtain a floating-point number read / write request using short operation instructions, and to perform calculations on the floating-point number data to obtain floating-point number processing data;
[0065] The request processing unit is used to obtain third occupancy information, and according to the operation short instruction, use the register group occupancy information to detect the existence and type of hazards, obtain the read / write request priority, and obtain integer data and floating-point data according to the read / write request priority, integer read / write request and floating-point read / write request, and transmit the integer data and floating-point data to the arithmetic logic unit and the floating-point operation unit respectively, and transmit the integer processing data and floating-point processing data to the register group;
[0066] The register group is used to obtain register group occupancy information, obtain integer data and floating-point data based on vector data, and transmit the integer processing data and floating-point processing data to the storage module.
[0067] The storage module includes a storage unit and a loading unit;
[0068] The storage unit is used to acquire storage occupancy information, and to obtain integer processing data and floating-point processing data based on read and write operation information, and to transmit the integer processing data and floating-point processing data to the RISCV processor;
[0069] The loading unit is used to acquire storage occupancy information, and to obtain vector data of the RISC-V processor based on read and write operation information, and to transmit the vector data to the instruction execution module.
[0070] The working principle of this invention is as follows: Pedestrian positioning data, i.e., raw data, is collected in real time by sensors; the sensors transmit the raw data to the RISCV processor; the RISCV processor executes a pedestrian positioning algorithm based on its built-in RISCV extended instructions and the raw data, obtaining vector instructions and vector data generated by the algorithm; the RISCV processor transmits the vector instructions to the decoding unit of the instruction dispatch module, which decodes the vector instructions to obtain vector operation configuration information, data type, operation type, and read / write operation information; the instruction execution module obtains the occupancy information of each internal unit to determine the instruction execution occupancy. Information; the storage module obtains the occupancy information of each internal unit, thus obtaining storage occupancy information; the hazard handling unit of the instruction dispatch module detects the existence and type of hazards based on the instruction execution occupancy information and the storage occupancy information, and obtains control signals; the decoding unit decides whether to transmit the instruction to the instruction execution module based on the control signals. If so, it transmits the vector operation configuration information, processing data type, operation type, and read / write operation information to the control and state buffer, which then transmits the vector operation configuration information, processing data type, and operation type to the instruction execution module, and transmits the read / write operation information to the storage module; otherwise, it continuously updates the instructions. The instruction execution module retrieves the execution and storage occupancy information and performs repeated checks. The storage module obtains vector data from the RISC-V processor based on the read / write operation information and transfers the vector data to the instruction execution module's register set. The register set obtains its own occupancy information, calculates the register set occupancy information, and stores the integer and floating-point data of the vector data separately. The instruction execution module's scheduling unit decodes the data type and operation type to obtain short operation instructions. When the arithmetic logic unit and floating-point unit operate, they obtain integer read / write requests and floating-point read / write requests based on the short operation instructions, respectively. The request processing unit then uses the register set occupancy information to determine the appropriate read / write request. The system prioritizes read / write requests and reads integer and floating-point data from the register set based on these priorities, as well as the integer and floating-point read / write requests. The arithmetic logic unit (ALU) and floating-point unit perform calculations on the integer and floating-point data respectively, yielding processed integer and floating-point data. The request processing unit transfers the processed integer and floating-point data to the register set for storage. The storage unit of the storage module then transfers the processed integer and floating-point data to the RISCV processor. The RISCV processor then executes the pedestrian localization algorithm based on the processed integer and floating-point data to complete the pedestrian localization.
[0071] Example 2
[0072] like Figure 2 As shown, the present invention provides a pedestrian localization SoC processing method based on RISCCV extended instructions, comprising the following steps:
[0073] S1. Use sensors to collect pedestrian positioning data in real time;
[0074] S2. Based on the RISCV extended instructions, the RISCV processor, and pedestrian positioning data, the pedestrian positioning algorithm is used to calculate the vector instructions and vector data.
[0075] S3. Based on the vector instructions, use the vector coprocessor to calculate the vector data to obtain the processed data;
[0076] S4. Based on the processed data, use the RISC-V processor to complete pedestrian localization.
Claims
1. A pedestrian positioning SoC system based on RISC-CV extended instructions, characterized in that, Including sensors and SoC systems; The sensor is used to acquire raw data; The SoC system is used to locate pedestrians based on raw data and RISCV extended instructions; the SoC system includes a RISCV processor and a vector coprocessor. The RISCV processor is used to generate vector instructions and extract vector data using a pedestrian localization algorithm based on the original data and RISCV extended instructions, and to complete the pedestrian localization algorithm calculation based on integer processing data and floating-point processing data to achieve pedestrian localization. The vector coprocessor is used to process vector data according to vector instructions to obtain integer processing data and floating-point processing data.
2. The pedestrian positioning SoC system based on RISC extended instructions according to claim 1, characterized in that, The vector coprocessor includes an instruction dispatch module, an instruction execution module, and a storage module; The instruction dispatch module is used to update status information and the execution progress of vector instructions; decode vector instructions to obtain vector operation configuration information, data type, operation type, and read / write operation information; and perform transmission operations on the vector operation configuration information, data type, operation type, and read / write operation information according to instruction execution occupancy information and storage occupancy information. The instruction execution module is used to acquire instruction execution occupancy information, decode and process data types and operation types to obtain short operation instructions, and process vector data according to vector operation configuration information and short operation instructions to obtain integer processing data and floating-point processing data. The storage module is used to acquire storage occupancy information, acquire vector data of the RISCV processor based on read and write operation information, and transmit integer processing data and floating-point processing data to the RISCV processor.
3. The pedestrian positioning SoC system based on RISC extended instructions according to claim 2, characterized in that, The instruction dispatch module includes a decoding unit, a control and status buffer, and an hazard processing unit. The decoding unit is used to decode vector instructions to obtain vector operation configuration information, data type, operation type and read / write operation information, and transmit the vector operation configuration information, data type, operation type and read / write operation information to the control and status buffer according to the control signal. The control and status buffer is used to update status information and the execution progress of vector instructions, and to transmit vector operation configuration information, data type and operation type to the instruction execution module and read / write operation information to the storage module according to the control signal. The hazard processing unit is used to detect the existence and type of hazards by updating the lookup table based on the instruction execution occupancy information and storage occupancy information, and obtain control signals.
4. The pedestrian positioning SoC system based on RISC extended instructions according to claim 3, characterized in that, The instruction execution module includes a scheduling unit, an arithmetic logic unit, a floating-point arithmetic unit, a request processing unit, and a register group; The scheduling unit is used to decode the data type and operation type to obtain the short operation instruction, and to obtain the instruction execution occupancy information based on the first occupancy information, the second occupancy information and the third occupancy information; The arithmetic logic unit is used to obtain first occupancy information, and according to vector operation configuration information, to obtain integer read / write requests using short operation instructions, and to perform calculations on the integer data to obtain integer processed data; The floating-point arithmetic unit is used to obtain the second occupancy information, and according to the vector arithmetic configuration information, to obtain a floating-point number read / write request using short operation instructions, and to perform calculations on the floating-point number data to obtain floating-point number processing data; The request processing unit is used to obtain third occupancy information, and according to the operation short instruction, use the register group occupancy information to detect the existence and type of hazards, obtain the read / write request priority, and obtain integer data and floating-point data according to the read / write request priority, integer read / write request and floating-point read / write request, and transmit the integer data and floating-point data to the arithmetic logic unit and the floating-point operation unit respectively, and transmit the integer processing data and floating-point processing data to the register group; The register group is used to obtain register group occupancy information, obtain integer data and floating-point data based on vector data, and transmit the integer processing data and floating-point processing data to the storage module.
5. The pedestrian positioning SoC system based on RISC extended instructions according to claim 2, characterized in that, The storage module includes a storage unit and a loading unit; The storage unit is used to acquire storage occupancy information, and to obtain integer processing data and floating-point processing data based on read and write operation information, and to transmit the integer processing data and floating-point processing data to the RISCV processor; The loading unit is used to acquire storage occupancy information, and to obtain vector data of the RISC-V processor based on read and write operation information, and to transmit the vector data to the instruction execution module.
6. The processing method of the pedestrian localization SoC system based on RISCV extended instructions according to any one of claims 1-5, characterized in that, Includes the following steps: S1. Use sensors to collect pedestrian positioning data in real time; S2. Based on the RISCV extended instructions, the RISCV processor, and pedestrian positioning data, the pedestrian positioning algorithm is used to calculate the vector instructions and vector data. S3. Based on the vector instructions, use the vector coprocessor to calculate the vector data to obtain the processed data; S4. Based on the processed data, use the RISC-V processor to complete pedestrian localization.
Citation Information
Patent Citations
RiscV kernel-based navigation acquisition and calculation Soc processing system and method thereof
CN112711213A