CN113704091B - Logic code debugging method, device, equipment and storage medium - Google Patents

Logic code debugging method, device, equipment and storage medium Download PDF

Info

Publication number
CN113704091B
CN113704091B CN202110871216.5A CN202110871216A CN113704091B CN 113704091 B CN113704091 B CN 113704091B CN 202110871216 A CN202110871216 A CN 202110871216A CN 113704091 B CN113704091 B CN 113704091B
Authority
CN
China
Prior art keywords
virtual
debugging
dynamic library
logic code
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110871216.5A
Other languages
Chinese (zh)
Other versions
CN113704091A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN202110871216.5A priority Critical patent/CN113704091B/en
Publication of CN113704091A publication Critical patent/CN113704091A/en
Application granted granted Critical
Publication of CN113704091B publication Critical patent/CN113704091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3652Software debugging using additional hardware in-circuit-emulation [ICE] arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a logic code debugging method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving an access instruction and acquiring a device identifier carried in the access instruction; the access instruction is generated when the corresponding device is required to be accessed in the process of debugging the logic code; if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; wherein, the virtual device is a file simulating the corresponding real physical device. Therefore, the method and the device can ensure the quick debugging of the logic code, and further effectively improve the debugging efficiency of the logic code.

Description

Logic code debugging method, device, equipment and storage medium
Technical Field
The present invention relates to the field of software development technologies, and in particular, to a method, an apparatus, a device, and a storage medium for debugging a logic code.
Background
When the projects in the server and the storage are started, the conditions of hardware and software development and even software development first exist; correspondingly, when BMC software is developed, if the hardware equipment cannot be obtained, the logic code cannot be debugged, the code debugging work can only be performed after the hardware equipment is turned back, and the quick debugging of the logic code cannot be realized, so that the debugging efficiency of the logic code is low.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for debugging a logic code, which can ensure the rapid debugging of the logic code and further effectively improve the debugging efficiency of the logic code.
In order to achieve the above object, the present invention provides the following technical solutions:
a logic code debugging method, comprising:
receiving an access instruction and acquiring a device identifier carried in the access instruction; the access instruction is generated when the corresponding device is required to be accessed in the process of performing logic code debugging;
if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by the access to realize the debugging of the logic code;
if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; the virtual device is a file simulating a corresponding real physical device.
Preferably, obtaining the virtual dynamic library includes:
determining any physical device in all real physical devices to be simulated as a target device;
establishing a file corresponding to the target device as a target file, setting the name of the target file as the name and address of the target device, and adding data of each register contained in the target device in the target file for acquisition during access;
and adding all the files of the real physical devices to be simulated into a pre-created information base to obtain the virtual dynamic base.
Preferably, adding data of each register included in the target device in the target file includes:
the data of each register contained in the target device is added to the target file in a manner that each row contains 16 data.
Preferably, the method further comprises:
and displaying the target file under the external triggering, and storing the data currently contained in the target file after the external confirmation of the completion of the modification of the data in the displayed target file.
Preferably, before returning the accessed data, the method further comprises:
and converting the data obtained by access into data with unified standards.
Preferably, the method further comprises:
and monitoring the hardware dynamic library and the virtual dynamic library in real time, and deleting the new physical device corresponding to the virtual device from the virtual dynamic library if the new physical device is added in the hardware dynamic library and the new physical device corresponding to the virtual device exists in the virtual dynamic library.
Preferably, the method further comprises:
and if the hardware dynamic library or the virtual dynamic library does not have the device corresponding to the device identifier, outputting prompt information that the corresponding device cannot be accessed successfully.
A logic code debugging device comprises a hardware adaptation layer, a virtual adaptation layer, a hardware dynamic library and a virtual dynamic library; wherein:
a hardware dynamic library for: storing the actual physical device and the hardware driver;
virtual dynamic library for: storing the virtual device; the virtual device is a file simulating a corresponding real physical device;
a virtual adaptation layer for: receiving an access instruction and acquiring a device identifier carried in the access instruction; if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; the access instruction is generated when the corresponding device is required to be accessed in the process of performing logic code debugging.
A logic code debugging device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the logic code debugging method as claimed in any preceding claim when executing the computer program.
A computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the logic code debugging method of any preceding claim.
The invention provides a logic code debugging method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving an access instruction and acquiring a device identifier carried in the access instruction; the access instruction is generated when the corresponding device is required to be accessed in the process of performing logic code debugging; if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; the virtual device is a file simulating a corresponding real physical device. The method and the device are provided with a hardware dynamic library comprising real physical devices and corresponding hardware drivers and a virtual dynamic library comprising files simulating the real physical devices as virtual devices, so that the real physical devices or the hardware drivers in the hardware dynamic library can be accessed according to actual needs in the process of debugging the logic codes, or the virtual devices in the virtual dynamic library can be accessed to acquire corresponding data for the logic codes to debug. Therefore, when the logic code debugging is realized, the logic code debugging is realized based on the access to the hardware equipment when the hardware equipment can be obtained, and when the hardware equipment cannot be obtained, the logic code debugging is realized based on the access to the file simulating the hardware equipment, so that the quick debugging of the logic code can be ensured, and the debugging efficiency of the logic code is further effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for debugging a logic code according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating file contents in a method for debugging a logic code according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a logic code debugging device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flowchart of a logic code debugging method according to an embodiment of the present invention may include:
s11: receiving an access instruction and acquiring a device identifier carried in the access instruction; the access instruction is generated when the corresponding device is required to be accessed in the process of debugging the logic code.
It should be noted that, the logic code debugging in the embodiment of the present application may be specifically logic code debugging in the BMC development process, or may be logic code debugging in other product development processes, which are all within the protection scope of the present invention.
In the process of debugging the logic code, if a corresponding device needs to be accessed to acquire data in the device, and further, the corresponding logic code debugging is realized based on the acquired data, the embodiment of the application can receive an access instruction of the corresponding device, wherein the instruction can comprise a device identifier of the device needing to be accessed, and further, the device identifier is used for positioning the corresponding device, and the data required by the logic code debugging is acquired in the positioned corresponding device. Wherein the device identifier may be the unique information representing the device such as the name, number, etc. of the device.
S12: if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by access to realize the debugging of the logic code.
S13: if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; wherein, the virtual device is a file simulating the corresponding real physical device.
In order to enable the logical code debugging to be realized quickly and smoothly, the embodiment of the application can be preset with a hardware dynamic library and a virtual dynamic library; specifically, the hardware dynamic library comprises real physical devices (namely, physical devices) and corresponding hardware drivers, so that the access of the physical devices or the corresponding hardware drivers in the hardware dynamic library can be realized when needed, the virtual dynamic library comprises files simulating the real physical devices, and single virtual devices in the virtual dynamic library are simulated as single real physical devices, so that the access of the virtual devices in the virtual dynamic library can be realized when needed; in addition, the physical devices in the hardware dynamic library, the hardware drivers and the virtual devices in the virtual dynamic library can be added and deleted according to actual needs, and the physical devices in the embodiment of the application can be I2C devices. Based on the above, after receiving the access instruction, if the device corresponding to the device identifier carried in the access instruction is a real physical device or a corresponding hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier to a hardware dynamic library, acquiring data contained in the physical device or the hardware driver, and feeding the acquired data back to the module for performing logic code debugging, so that the processor realizes the corresponding logic code debugging based on the acquired data; if the device corresponding to the device identifier carried in the access instruction is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, acquiring data contained in the virtual device, and feeding the acquired data back to a module for performing logic code debugging so that the device can realize corresponding logic code debugging based on the acquired data.
In addition, in order to determine whether a device corresponding to the device identifier is stored in the hardware dynamic library or the virtual dynamic library, the embodiment of the application may maintain a corresponding device table, where the device table includes device identifiers of all physical devices in the hardware dynamic library, all virtual devices in the hardware driver and the virtual dynamic library, and the device identifier included in the device table belongs to a tag of a real physical device or a hardware driver or a virtual device, so as to determine whether the device corresponding to the device identifier is a physical device or a hardware driver or a virtual device based on the device table.
Receiving an access instruction and acquiring a device identifier carried in the access instruction; the access instruction is generated when the corresponding device is required to be accessed in the process of debugging the logic code; if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; wherein, the virtual device is a file simulating the corresponding real physical device.
The method and the device are provided with a hardware dynamic library comprising real physical devices and corresponding hardware drivers and a virtual dynamic library comprising files simulating the real physical devices as virtual devices, so that the real physical devices or the hardware drivers in the hardware dynamic library can be accessed according to actual needs in the process of debugging the logic codes, or the virtual devices in the virtual dynamic library can be accessed to acquire corresponding data for the logic codes to debug. Therefore, when the logic code debugging is realized, the logic code debugging is realized based on the access to the hardware equipment when the hardware equipment can be obtained, and when the hardware equipment cannot be obtained, the logic code debugging is realized based on the access to the file simulating the hardware equipment, so that the quick debugging of the logic code can be ensured, and the debugging efficiency of the logic code is further effectively improved.
The method for debugging the logic code provided by the embodiment of the invention, which is specifically used for obtaining the virtual dynamic library, can comprise the following steps:
determining any physical device in all real physical devices to be simulated as a target device;
establishing a file corresponding to the target device as a target file, setting the name of the target file as the name and address of the target device, and adding data of each register contained in the target device in the target file for acquisition during access;
and adding all the files of the real physical devices to be simulated into a pre-created information base to obtain a virtual dynamic base.
When the simulation of the real physical device is realized, the file is used for simulating the register of the physical device, the simulated information comprises the corresponding register and the data in the register, and when the physical device needs to be accessed, the register of the physical device is accessed to acquire the data in the register; specifically, for each real physical device to be simulated, a file corresponding to the physical device may be created, where the address and name of the physical device may be distinguished by a file path and a file name (i 2c@bus/name@slave mode), for example: i2 c-gpio virtual device PCA9555, located at bus10, slave address 0x40, the file name may be i2c@10/PCA9555@0x40.dev; the data in the register of the physical device can be directly added into the corresponding file as file content; and then adding the file of the physical device into a pre-created information base, and further obtaining a virtual dynamic base containing virtual devices corresponding to each real physical device to be simulated, thereby ensuring the efficient creation of the virtual dynamic base while realizing the corresponding simulation devices of the real physical devices.
The method for debugging the logic code provided by the embodiment of the invention adds the data of each register contained in the target device into the target file, and can comprise the following steps:
the data of each register included in the target device is added to the target file in such a manner that each row contains 16 data.
The register data contained in the file simulating the real physical device is divided into 16 rows for storage, so that a data array formed by the data of all registers in the corresponding physical device is obtained, the storage is convenient, and the operations of quickly inquiring, acquiring and the like of the register data can be conveniently realized when the data is needed. For example, the array of data in a file having the file name i2c@10/PCA9555@0x40.dev as described above may be as shown in FIG. 2, with a single data representing the data of a single register.
The logic code debugging method provided by the embodiment of the invention can further comprise the following steps:
and displaying the target file under the external triggering, and storing the data currently contained in the target file after the external confirmation of the completion of the modification of the data in the displayed target file.
It should be noted that, according to the embodiment of the application, the simulation of the real physical device is realized through the file, the file content of any file in the virtual dynamic library can be displayed under the external trigger, the displayed file content can be modified by the external, and further the modified file content is stored after the modification is confirmed by the external, that is, the application can support the external manual modification of the register information trigger information in the virtual device file to change, and the dynamic change scene is better simulated.
The method for debugging the logic code provided by the embodiment of the invention can further comprise the following steps before the data obtained by access is returned:
and converting the data obtained by access into data with unified standards.
The embodiment of the application can also provide a unified interface for the upper layer, correspondingly, the data obtained by access is converted into the data of the standard required by the upper layer for realizing the logic code debugging, and further the upper layer is convenient for obtaining and using the corresponding unified standard data based on the unified interface.
The logic code debugging method provided by the embodiment of the invention can further comprise the following steps:
and monitoring the hardware dynamic library and the virtual dynamic library in real time, and deleting the virtual device corresponding to the new physical device from the virtual dynamic library if the new physical device is added in the hardware dynamic library and the virtual device corresponding to the new physical device exists in the virtual dynamic library.
It should be noted that, in the embodiment of the present application, the hardware dynamic library and the virtual dynamic library may also be monitored in real time, and after any real physical device is added to the hardware dynamic library, if the virtual device of any physical device exists in the virtual dynamic library, the virtual device of any physical device may be deleted from the virtual dynamic library, so as to avoid multiple storage of the same physical device, and reduce storage space waste.
The logic code debugging method provided by the embodiment of the invention can further comprise the following steps:
if the hardware dynamic library or the virtual dynamic library does not have the device corresponding to the device identification, outputting prompt information that the corresponding device cannot be accessed successfully.
In the embodiment of the application, if the corresponding device is not queried in the hardware dynamic library or the virtual dynamic library, the prompt information that the corresponding device cannot be successfully accessed can be output so as to prompt that the corresponding device does not exist outside and needs to be supplemented, or the information in the device table is wrong and needs to be corrected, and the like, so that the subsequent logic code debugging is ensured to be smoothly carried out.
The embodiment of the invention also provides a logic code debugging device which can comprise a hardware adaptation layer, a virtual adaptation layer, a hardware dynamic library and a virtual dynamic library; wherein:
a hardware dynamic library for: storing the actual physical device and the hardware driver;
virtual dynamic library for: storing the virtual device; the virtual device is a file simulating a corresponding real physical device;
a virtual adaptation layer for: receiving an access instruction and acquiring a device identifier carried in the access instruction; if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; the access instruction is generated when the corresponding device is required to be accessed in the process of debugging the logic code.
It should be noted that, the above-mentioned logic code debugging device provided in the embodiment of the present application may further include an application layer, a framework layer, and a hardware adaptation layer, as shown in fig. 3, so that different driving call objects (for calling a physical device or for calling a simulation device) are loaded according to requirements based on the device in the figure, and the debugging of the logic code without depending on physical hardware is implemented. Specifically, the application program layer is mainly responsible for a processing logic layer of a service, and for a certain logic code debugging, the method can include issuing an access instruction and realizing the logic code debugging based on data obtained by corresponding access of the access instruction; the framework layer is a general information processing layer and can comprise a hardware adaptation layer for forwarding an issuing access instruction and an application program layer for forwarding the accessed data; the hardware adaptation layer is responsible for realizing shielding of different hardware differences (protecting different hardware, buses and the like, providing a unified interface for the hardware adaptation layer), and can comprise forwarding an access instruction to the virtual adaptation layer and forwarding data obtained by access to the framework layer; the virtual adaptation layer is responsible for selecting an actual hardware dynamic library or a virtual dynamic library according to different configuration items, and can comprise accessing the hardware dynamic library or the virtual dynamic library and returning the data obtained by access to the hardware adaptation layer; the hardware dynamic library is a dynamic library which actually accesses a physical device or a hardware driver; the virtual dynamic library is a dynamic library that invokes the virtual device. Therefore, the debugging of the logic codes can be carried out under the condition that the hardware single board is insufficient or even the board is not returned, the quick debugging of the codes is ensured, the quick starting and function verification are carried out after the board is returned, and the project delivery schedule is ensured. In addition, other functions like gpio/sgpio/pwm/tab exist in actual development, and virtual guarantee rapid development and debugging can be performed through the method and the device.
The embodiment of the invention also provides logic code debugging equipment, which can comprise:
a memory for storing a computer program;
a processor for implementing the steps of the logic code debugging method as claimed in any preceding claim when executing a computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program can realize the steps of the logic code debugging method according to any one of the above steps when being executed by a processor.
It should be noted that, for the description of the relevant portion in the logic code debugging device, the device and the storage medium provided in the embodiment of the present invention, please refer to the detailed description of the corresponding portion in the logic code debugging method provided in the embodiment of the present invention, and no further description is given here. In addition, the parts of the above technical solutions provided in the embodiments of the present invention, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A method for debugging a logic code, comprising:
receiving an access instruction and acquiring a device identifier carried in the access instruction; the access instruction is generated when the corresponding device is required to be accessed in the process of performing logic code debugging;
if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by the access to realize the debugging of the logic code;
if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; the virtual device is a file simulating a corresponding real physical device;
wherein obtaining the virtual dynamic library comprises:
determining any physical device in all real physical devices to be simulated as a target device;
establishing a file corresponding to the target device as a target file, setting the name of the target file as the name and address of the target device, and adding data of each register contained in the target device in the target file for acquisition during access;
adding all files of real physical devices to be simulated into a pre-created information base to obtain the virtual dynamic base;
the method for adding the data of each register contained in the target device in the target file comprises the following steps:
adding data of each register contained in the target device into the target file in a manner that each row contains 16 data;
before returning the accessed data, the method further comprises the following steps:
converting the accessed data into unified standard data required by upper layer to realize logic code debugging; the data conversion is realized by a unified interface so as to realize the acquisition and the use of corresponding unified standard data based on the unified interface by an upper layer.
2. The method as recited in claim 1, further comprising:
and displaying the target file under the external triggering, and storing the data currently contained in the target file after the external confirmation of the completion of the modification of the data in the displayed target file.
3. The method as recited in claim 2, further comprising:
and monitoring the hardware dynamic library and the virtual dynamic library in real time, and deleting the new physical device corresponding to the virtual device from the virtual dynamic library if the new physical device is added in the hardware dynamic library and the new physical device corresponding to the virtual device exists in the virtual dynamic library.
4. A method according to claim 3, further comprising:
and if the hardware dynamic library or the virtual dynamic library does not have the device corresponding to the device identifier, outputting prompt information that the corresponding device cannot be accessed successfully.
5. The logic code debugging device is characterized by comprising a hardware adaptation layer, a virtual adaptation layer, a hardware dynamic library and a virtual dynamic library; wherein:
a hardware dynamic library for: storing the actual physical device and the hardware driver;
virtual dynamic library for: storing the virtual device; the virtual device is a file simulating a corresponding real physical device;
a virtual adaptation layer for: receiving an access instruction and acquiring a device identifier carried in the access instruction; if the device corresponding to the device identifier is a real physical device or a hardware driver, accessing the physical device or the hardware driver corresponding to the device identifier into a hardware dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; if the device corresponding to the device identifier is a virtual device, accessing the virtual device corresponding to the device identifier to a virtual dynamic library, and returning the data obtained by the access to realize the debugging of the logic code; the access instruction is generated when the corresponding device is required to be accessed in the process of performing logic code debugging;
the virtual adaptation layer is further configured to: determining any physical device in all real physical devices to be simulated as a target device; establishing a file corresponding to the target device as a target file, setting the name of the target file as the name and address of the target device, and adding data of each register contained in the target device in the target file for acquisition during access; adding all files of real physical devices to be simulated into a pre-created information base to obtain the virtual dynamic base; the method for adding the data of each register contained in the target device in the target file comprises the following steps: adding data of each register contained in the target device into the target file in a manner that each row contains 16 data; before returning the accessed data, the method further comprises the following steps: converting the accessed data into unified standard data required by upper layer to realize logic code debugging; the data conversion is realized by a unified interface so as to realize the acquisition and the use of corresponding unified standard data based on the unified interface by an upper layer.
6. A logic code debugging device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the logical code debugging method according to any one of claims 1 to 4 when executing said computer program.
7. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the logic code debugging method of any of claims 1 to 4.
CN202110871216.5A 2021-07-30 2021-07-30 Logic code debugging method, device, equipment and storage medium Active CN113704091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110871216.5A CN113704091B (en) 2021-07-30 2021-07-30 Logic code debugging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110871216.5A CN113704091B (en) 2021-07-30 2021-07-30 Logic code debugging method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113704091A CN113704091A (en) 2021-11-26
CN113704091B true CN113704091B (en) 2024-02-09

Family

ID=78650957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110871216.5A Active CN113704091B (en) 2021-07-30 2021-07-30 Logic code debugging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113704091B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770551A (en) * 2008-12-30 2010-07-07 中国科学院软件研究所 Method for processing hidden process based on hardware simulator
CN102662843A (en) * 2012-04-11 2012-09-12 贵州航天风华精密设备有限公司 Software testing method capable of simulating abnormality of spacecraft equipment
CN104850478A (en) * 2014-12-19 2015-08-19 北汽福田汽车股份有限公司 Method for establishing model of tested object, and virtual test method
CN112463614A (en) * 2020-12-01 2021-03-09 北京计算机技术及应用研究所 Software virtualization test environment construction method based on hardware board card access
CN112667354A (en) * 2020-12-30 2021-04-16 上海壁仞智能科技有限公司 Computer readable storage medium, virtualized register device, and method of accessing the device
CN112799965A (en) * 2021-03-22 2021-05-14 南京远思智能科技有限公司 Virtual debugging system and method for automation equipment software

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10049054B2 (en) * 2015-04-01 2018-08-14 Micron Technology, Inc. Virtual register file

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770551A (en) * 2008-12-30 2010-07-07 中国科学院软件研究所 Method for processing hidden process based on hardware simulator
CN102662843A (en) * 2012-04-11 2012-09-12 贵州航天风华精密设备有限公司 Software testing method capable of simulating abnormality of spacecraft equipment
CN104850478A (en) * 2014-12-19 2015-08-19 北汽福田汽车股份有限公司 Method for establishing model of tested object, and virtual test method
CN112463614A (en) * 2020-12-01 2021-03-09 北京计算机技术及应用研究所 Software virtualization test environment construction method based on hardware board card access
CN112667354A (en) * 2020-12-30 2021-04-16 上海壁仞智能科技有限公司 Computer readable storage medium, virtualized register device, and method of accessing the device
CN112799965A (en) * 2021-03-22 2021-05-14 南京远思智能科技有限公司 Virtual debugging system and method for automation equipment software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于FPGA的STT-MRAM信道虚拟实验平台设计;张小军 等;实验科学与技术;第19卷(第2期);全文 *

Also Published As

Publication number Publication date
CN113704091A (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN110765001B (en) Modularized automatic test method and device for application system
CN110647471B (en) Interface test case generation method, electronic device and storage medium
CN111597110B (en) Page test method and device, electronic equipment and storage medium
CN112257733B (en) Model iteration method, second electronic equipment and storage medium
CN111966390A (en) Project construction method, system, terminal device and storage medium
CN110750440A (en) Data testing method and terminal equipment
CN116679986A (en) Register access method, device, server, system and storage medium
CN112131196A (en) Distributed log processing method and device, terminal equipment and storage medium
US9600397B2 (en) Dynamic debugging method of a software module and corresponding device
CN113704091B (en) Logic code debugging method, device, equipment and storage medium
US20230101154A1 (en) Resumable instruction generation
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
WO2023051466A1 (en) Communication method, apparatus and system
CN115170152A (en) Data distribution method, device, equipment and storage medium
CN109446462B (en) Page-based data monitoring processing method, device, equipment and storage medium
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
CN109828752B (en) Project code automatic generation method, device, computer equipment and storage medium
CN112631949A (en) Debugging method and device, computer equipment and storage medium
CN111045787A (en) Rapid continuous experiment method and system
CN111949430B (en) Basic input/output system error information recording method, system and terminal based on GPNV
CN111682991B (en) Bus error message processing method and device
CN110852743A (en) Data acquisition method and device
CN112069065B (en) Algorithm debugging method, electronic equipment and computer readable storage medium
CN112000503B (en) Server fault debugging method and system and remote server
CN117950635A (en) Application development method and device of platform, electronic equipment and storage medium

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