Circuit design test method, device, equipment and storage medium
By starting the operating system in the hardware circuit memory and executing the model inference program, the problem of circuit design testing in a verification environment that does not support memory card is solved, and the operation of large-model inference is realized, which improves the testing efficiency and quality.
Patent Information
- Application Number
- CN202411171401.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-23
AI Technical Summary
In verification environments that do not support memory cards as external devices, it is difficult to run large model inference programs in bare metal environments, resulting in difficult circuit design testing.
By obtaining the model inference file, compiling and importing the temporary file system, generating the operating system executable file, and transmitting it to the hardware circuit memory through the test interface peripheral, starting the operating system to execute the model inference program, avoiding relying on external memory cards.
在不支持存储卡的环境中,成功运行模型推理程序,实现了电路设计的测试需求,提高了测试效率和质量。
Smart Images

Figure CN118690699B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a circuit design testing method, device, electronic device and computer-readable storage medium. Background Art
[0002] In the process of testing circuit design, large model reasoning is needed as an aid.
[0003] At present, the test scheme of large model reasoning cannot be run in a bare metal environment due to the complexity of the large model reasoning program and the need to read and write model files. It needs to run in an operating system. Due to the size of the model of the large model program, the model and the modification program can usually be placed in an external storage card, and then the operating system can be started from the storage card, and then the large model reasoning program can be run.
[0004] However, there are often verification environments that do not support memory cards as external devices, which can render memory cards unusable and make it difficult to perform large model programs for circuit design testing. Summary of the invention
[0005] The embodiments of the present application provide a circuit design testing method, device, electronic device and computer-readable storage medium to solve the problems in the related art.
[0006] In a first aspect, an embodiment of the present application provides a circuit design testing method, the method comprising:
[0007] Obtaining a model reasoning file, and compiling the model reasoning file to obtain a compiled file;
[0008] Importing the compiled file and the model file into a temporary file system to obtain an operating system executable file; the model file is used to provide model information for use by the reasoning program corresponding to the model reasoning file;
[0009] In response to the transmission task, the operating system executable file is transmitted to the memory of the hardware circuit through the test interface peripheral; the test interface peripheral and the memory are external devices of the hardware circuit, and the hardware circuit is used to test the circuit design under test;
[0010] In response to a start command, the circuit design to be tested and the reasoning program are run according to the operating system executable file in the memory.
[0011] In a second aspect, an embodiment of the present application provides a circuit design testing device, the device comprising:
[0012] An acquisition module is used to acquire a model reasoning file and compile the model reasoning file to obtain a compiled file;
[0013] An import module, used to import the compiled file and the model file into a temporary file system to obtain an operating system executable file; the model file is used to provide model information for use by the reasoning program corresponding to the model reasoning file;
[0014] A transmission module, configured to transmit the operating system executable file to the memory of the hardware circuit via the test interface peripheral in response to the transmission task; the test interface peripheral and the memory are external devices of the hardware circuit, and the hardware circuit is used to test the circuit design to be tested;
[0015] An execution module is used to respond to a startup command and run the circuit design to be tested and the reasoning program according to the operating system executable file in the memory.
[0016] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor;
[0017] a memory for storing instructions executable by the processor;
[0018] The processor is configured to execute the instructions to implement the method of the first aspect.
[0019] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the method of the first aspect.
[0020] In an embodiment of the present application, the model reasoning file and the model file can be processed into an operating system executable file, and the operating system executable file can be transferred to the memory of the hardware circuit through the test interface peripheral. The operating system executable file can be subsequently executed in the memory of the hardware circuit, thereby starting the operating system, executing the model reasoning program in the operating system, and achieving the purpose of executing model reasoning during the test process of the circuit design. In an embodiment of the present application, in a verification environment that does not support a memory card as an external device, the memory of the hardware circuit can be used to provide an operating system and run model reasoning, thereby avoiding the use of an external memory card to perform model reasoning.
[0021] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of the steps of a circuit design testing method provided in an embodiment of the present application;
[0024] Figure 2 It is a flowchart of the specific steps of a circuit design testing method provided in an embodiment of the present application;
[0025] Figure 3 It is a block diagram of a circuit design test device provided in an embodiment of the present application;
[0026] Figure 4 is a block diagram of an electronic device provided by an embodiment of the present invention;
[0027] Figure 5 is a block diagram of another electronic device according to another embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three kinds of relationships can exist, for example, A and / or B can be represented: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the front and back associated objects are a kind of "or" relationship. In the embodiment of the present application, the term "multiple" refers to two or more, and other quantifiers are similar.
[0030] Figure 1, is a flow chart of the steps of a circuit design testing method provided in an embodiment of the present application, such as Figure 1 As shown, the method may include:
[0031] Step 101: Obtain a model reasoning file, and compile the model reasoning file to obtain a compiled file.
[0032] In the embodiment of the present application, the implementation scenario of the scheme is to test the circuit design, and the circuit design is a file obtained by programming. The circuit design is imported into the hardware circuit for operation, so that the circuit design can be tested. Among them, the hardware circuit may include: Field Programmable Gate Array (FPGA), System on Chip (SOC), etc.
[0033] Specifically, in the process of testing circuit design, the efficiency and quality of the test can be improved by applying large model reasoning. In one implementation, the large model used in the test process can include the second-generation generative pre-trained (GPT-2, Generative Pre-Trained-2) model, which is a fully automatic text generation model that uses an unsupervised learning model to generate high-quality, coherent text. In the process of using large model reasoning to assist circuit design testing, the model file and model reasoning program must run in an independent operating system (such as a Linux system).
[0034] In this step, the model reasoning file can be obtained. The model reasoning file includes the reasoning program developed for implementing model reasoning. Furthermore, the model reasoning file can be compiled according to the characteristics of the test environment to obtain a compiled file that can meet the requirements of running in the test environment.
[0035] Step 102: Import the compiled file and the model file into a temporary file system to obtain an operating system executable file; the model file is used to provide model information for use by the reasoning program corresponding to the model reasoning file.
[0036] In an embodiment of the present application, a temporary file system (initramfs, Initial RAM Filesystem) can be loaded into the memory during the startup of the operating system. The temporary file system includes the necessary drivers, tools and configuration files of the operating system, which are used to initialize and configure the operating system before the kernel starts and mounts the real root file system. The main function of the temporary file system is to provide a basic, minimum file system when the kernel starts so that the kernel can access the required drivers and tools. The temporary file system is smaller than the actual root file system, so it can be loaded into the memory faster. This enables the operating system to complete the initialization phase faster during the startup process, improving the response speed of the system.
[0037] Specifically, the embodiment of the present application can obtain a model file, which provides the model information required by the model reasoning program. Since the model reasoning process requires the model reasoning program and the model file to run together, the embodiment of the present application can import the compiled file and the model file into a temporary file system, and compile the temporary file system including the compiled file and the model file to obtain an operating system executable file, that is, an executable file for executing model reasoning in the operating system, thereby solving the problem that model reasoning cannot be executed in a bare metal environment.
[0038] Step 103, in response to the transfer task, the operating system executable file is transferred to the memory of the hardware circuit through the test interface peripheral; the test interface peripheral and the memory are external devices of the hardware circuit, and the hardware circuit is used to test the circuit design under test.
[0039] In an embodiment of the present application, after obtaining an operating system executable file based on an operating system environment provided by a temporary file system, the operating system executable file can be passed to the memory of the hardware circuit so that the operating system can be subsequently started in the memory and the model reasoning process can be executed, thereby avoiding the use of an external storage card to perform model reasoning.
[0040] Specifically, the hardware circuit of the embodiment of the present application can support memory and test interface peripherals as external devices connected thereto, but does not support memory cards as external devices. In one case, the test interface peripheral can be Jtag, which is a standard interface for testing, debugging, and programming inside a hardware circuit. Jtag is specifically a parallel interface that can be used to debug the hardware circuit, view the internal state and register values of the hardware circuit, program the hardware circuit during the production process, and load programs or configuration files into the hardware circuit.
[0041] In this step, the transmission task can be established by the operating system command, and the operating system executable file can be transferred to the memory of the hardware circuit through the test interface peripheral, so as to subsequently start the operating system in the memory and execute the model reasoning process.
[0042] Step 104 , in response to a start command, running the circuit design to be tested and the inference program according to the operating system executable file in the memory.
[0043] In an embodiment of the present application, after the operating system executable file is transferred to the memory of the hardware circuit, the operating system executable file can be executed in the memory of the hardware circuit through a startup command, thereby starting the operating system and executing the model reasoning program in the operating system, thereby realizing the requirement of performing model reasoning during the circuit design test process.
[0044] In summary, in the embodiments of the present application, the model reasoning file and the model file can be processed into an operating system executable file, and the operating system executable file can be transferred to the memory of the hardware circuit through the test interface peripheral. The operating system executable file can be subsequently executed in the memory of the hardware circuit, thereby starting the operating system, executing the model reasoning program in the operating system, and achieving the purpose of performing model reasoning during the test process of the circuit design. The embodiments of the present application can use the memory of the hardware circuit to provide the operating system and run model reasoning in a verification environment that does not support a memory card as an external device, thereby avoiding the use of an external memory card to perform model reasoning.
[0045] Figure 2 , is a flowchart of the specific steps of a circuit design testing method provided in an embodiment of the present application, such as Figure 2 As shown, the method may include:
[0046] Step 201: Obtain a model reasoning file and determine the hardware instruction set architecture of the test environment.
[0047] Step 202: cross-compile the model reasoning file according to the hardware instruction set architecture and the operating system architecture to obtain the compiled file.
[0048] In the embodiment of the present application, with respect to steps 201-202, the embodiment of the present application can improve the quality of the compiled file obtained after compilation by sampling cross-compilation, so that the compiled file can subsequently run more stably in the test environment.
[0049] First, the embodiment of the present application can obtain a model reasoning file and determine the hardware instruction set architecture of the test environment. The model reasoning file can be a file obtained by programming in C++ language.
[0050] In one implementation, the hardware instruction set architecture of the test environment may be the riscv64 architecture (an open source instruction set architecture based on the reduced instruction set principle). If the operating system of the test environment is the Linux operating system, cross-compilation may be implemented by combining the riscv64 architecture and the Linux architecture, so that the compiled file meets both the requirements of the riscv64 architecture and the requirements of the Linux architecture.
[0051] Step 203: After importing the compiled file and the model file into the temporary file system, the temporary file system is recompiled to obtain the operating system executable file.
[0052] In an embodiment of the present application, the temporary file system can provide a basic, minimal file system when the kernel starts so that the kernel can access the required drivers and tools. In an embodiment of the present application, the compiled file and the model file can be imported into the temporary file system, and the temporary file system including the compiled file and the model file can be compiled to obtain an operating system executable file, that is, an executable file for executing model reasoning in the operating system, which solves the problem that model reasoning cannot be executed in a bare metal environment.
[0053] In one implementation, the operating system may be a Linux operating system, and the obtained operating system executable file may be a Linux.bin file.
[0054] Step 204: perform special character removal and zero padding alignment operations on the operating system executable file to obtain a processed operating system executable file.
[0055] The processed operating system executable file is a .txt text format file.
[0056] In an embodiment of the present application, in the operating system executable file obtained in step 203, there are a large number of special characters, and zero padding alignment is not performed, which will cause interference, making it difficult for the operating system executable file to be accurately identified by the driver jtag_axi IP of the test interface peripheral. Therefore, an embodiment of the present application can utilize a special character removal script to automatically remove special characters in the operating system executable file, and perform a zero padding alignment operation on the operating system executable file to obtain the processed operating system executable file. This process is equivalent to standardizing the operating system executable file to reduce the subsequent processing difficulty.
[0057] Among them, zero padding alignment refers to zero padding to align 1024 bits of data, converting a row of data with an address of every 16 bits into a format of a row of address and a row of 1024 bits of data, so as to facilitate the subsequent sending of a write command to the driver jtag_axi IP of the test interface peripheral.
[0058] Step 205: Create the transmission task through the create_hw_axi_txnTCL command.
[0059] Step 206 : In response to the transmission task, the processed operating system executable file is transmitted to the memory of the hardware circuit through the test interface peripheral.
[0060] Step 207: performing a release operation through a control program corresponding to the hardware circuit to start the operation of the circuit design under test.
[0061] In an embodiment of the present application, for steps 205-207, after obtaining an operating system executable file based on an operating system environment provided by a temporary file system, and after the operating system executable file is processed by special character removal and zero padding alignment, the processed operating system executable file can be transferred to the memory of the hardware circuit, so that the operating system can be started in the memory and the model reasoning process can be executed later. Specifically, the transmission operation can be implemented by the test interface peripheral of the hardware circuit, and the transmission process can first create a transmission task through the create_hw_axi_txnTCL command, and then the test interface peripheral responds to the transmission task and transmits the processed operating system executable file to the memory of the hardware circuit.
[0062] Furthermore, the hardware circuit has a corresponding control program, and the control program is used to perform relevant control on the hardware circuit. In one implementation, the control program can be a Vivado control program, and the Vivado control program provides an integrated design environment for developing and deploying FPGA and SoC designs. The Vivado control program provides a full set of tools from the beginning of design to implementation and verification, and supports from the most basic FPGA design to complex SoC system design.
[0063] Through the control program, the circuit design to be tested can be imported into the hardware circuit. After the circuit design to be tested is imported into the hardware circuit, the circuit design to be tested is in a paused state. Therefore, after the processed operating system executable file is transferred to the memory of the hardware circuit, the reset operation can be released through the control program to contact the paused state of the circuit design to be tested and start the operation of the circuit design to be tested in the hardware circuit, wherein the circuit design to be tested starts executing the program from the reset address (i.e., the location where the operating system executable file is stored in the memory).
[0064] Optionally, the hardware circuit is further connected to a serial communication peripheral; step 207 may specifically include:
[0065] Sub-step 2071: performing a release reset operation through a control program corresponding to the hardware circuit to start the operation of the circuit design to be tested, and during the operation, outputting execution information through the serial communication peripheral.
[0066] In an embodiment of the present application, the hardware circuit can also support a serial communication peripheral as an external device connected thereto, and the serial communication peripheral is mainly used to output and print the execution information of the circuit design to be tested. In one implementation, the serial communication peripheral can be a Uart peripheral, which is a serial communication protocol for data transmission between a computer and an external device. It is specifically an asynchronous communication protocol, which means that data is transmitted one by one in units of characters, without the need for a clock signal to synchronize data transmission. In an embodiment of the present application, the Uart peripheral can be used to observe the output of the hardware circuit.
[0067] Step 208: In response to the startup command, run the circuit design to be tested and the inference program according to the operating system executable file in the memory.
[0068] In an embodiment of the present application, after the operation of the circuit design to be tested is started in step 207, the circuit design to be tested begins to execute at the reset address of the memory (i.e., the location where the operating system executable file is stored in the memory), so that the memory starts the operating system and provides an operating environment for model reasoning. In this step, the circuit design to be tested and the reasoning program can be run in response to the startup command of the operating system according to the operating system executable file in the memory, thereby achieving the purpose of executing model reasoning during the test process of the circuit design.
[0069] In summary, in the embodiments of the present application, the model reasoning file and the model file can be processed into an operating system executable file, and the operating system executable file can be transferred to the memory of the hardware circuit through the test interface peripheral. The operating system executable file can be subsequently executed in the memory of the hardware circuit, thereby starting the operating system, executing the model reasoning program in the operating system, and achieving the purpose of performing model reasoning during the test process of the circuit design. The embodiments of the present application can use the memory of the hardware circuit to provide the operating system and run model reasoning in a verification environment that does not support a memory card as an external device, thereby avoiding the use of an external memory card to perform model reasoning.
[0070] Figure 3 : is a block diagram of a circuit design testing device provided in an embodiment of the present application, the device comprising:
[0071] The acquisition module 301 is used to acquire a model reasoning file and compile the model reasoning file to obtain a compiled file;
[0072] An import module 302 is used to import the compiled file and the model file into a temporary file system to obtain an operating system executable file; the model file is used to provide model information for use by the reasoning program corresponding to the model reasoning file;
[0073] The transmission module 303 is used to transmit the operating system executable file to the memory of the hardware circuit through the test interface peripheral in response to the transmission task; the test interface peripheral and the memory are external devices of the hardware circuit, and the hardware circuit is used to test the circuit design under test;
[0074] The execution module 304 is used to respond to the start command and run the circuit design to be tested and the reasoning program according to the operating system executable file in the memory.
[0075] Optionally, the acquisition module 301 includes:
[0076] The acquisition submodule is used to obtain the model reasoning file and determine the hardware instruction set architecture of the test environment;
[0077] The cross-compilation submodule is used to cross-compile the model reasoning file according to the hardware instruction set architecture and the operating system architecture to obtain the compiled file.
[0078] Optionally, the import module 302 includes:
[0079] The import submodule is used to import the compiled file and the model file into a temporary file system, and then perform secondary compilation on the temporary file system to obtain the operating system executable file.
[0080] Optionally, the device further comprises:
[0081] A processing module, used for performing special character removal and zero padding alignment operations on the operating system executable file to obtain a processed operating system executable file;
[0082] The processed operating system executable file is a .txt text format file.
[0083] Optionally, the transmission module 303 includes:
[0084] Create a submodule for creating the transmission task through the create_hw_axi_txnTCL command;
[0085] The transmission submodule is used to transmit the processed operating system executable file to the memory of the hardware circuit through the test interface peripheral in response to the transmission task.
[0086] Optionally, the execution module 304 includes:
[0087] A release-reset submodule, used to perform a release-reset operation through a control program corresponding to the hardware circuit to start the operation of the circuit design to be tested;
[0088] The startup submodule is used to respond to the startup command and run the circuit design to be tested and the reasoning program according to the operating system executable file in the memory.
[0089] Optionally, the hardware circuit is further connected to a serial communication peripheral;
[0090] The release-reset submodule comprises:
[0091] The printing output unit is used to release the reset operation through the control program corresponding to the hardware circuit to start the operation of the circuit design to be tested, and during the operation, output the execution information through the serial communication peripheral.
[0092] In summary, in the embodiments of the present application, the model reasoning file and the model file can be processed into an operating system executable file, and the operating system executable file can be transferred to the memory of the hardware circuit through the test interface peripheral. The operating system executable file can be subsequently executed in the memory of the hardware circuit, thereby starting the operating system, executing the model reasoning program in the operating system, and achieving the purpose of performing model reasoning during the test process of the circuit design. The embodiments of the present application can use the memory of the hardware circuit to provide the operating system and run model reasoning in a verification environment that does not support a memory card as an external device, thereby avoiding the use of an external memory card to perform model reasoning.
[0093] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0094] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0095] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0096] An embodiment of the present application provides a circuit design testing device, including a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors to include methods for performing one or more of the above embodiments.
[0097] Figure 4is a block diagram of an electronic device 600 according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0098] Reference Figure 4 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0099] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0100] The memory 604 is used to store various types of data to support the operation of the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, multimedia, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0101] The power supply component 606 provides power to the various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 600.
[0102] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0103] The audio component 610 is used to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the electronic device 600 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0104] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0105] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the electronic device 600. For example, the sensor assembly 614 can detect the open / closed state of the electronic device 600, the relative positioning of the components, such as the display and keypad of the electronic device 600, and the sensor assembly 614 can also detect the position change of the electronic device 600 or a component of the electronic device 600, the presence or absence of contact between the user and the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0106] The communication component 616 is used to facilitate wired or wireless communication between the electronic device 600 and other devices. The electronic device 600 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0107] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement the methods provided in the embodiments of the present application.
[0108] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of an electronic device 600 to perform the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0109] Figure 5 is a block diagram of an electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 may be provided as a server. Figure 5 The electronic device 700 includes a processing component 722, which further includes one or more processors, and a memory resource represented by a memory 732 for storing instructions that can be executed by the processing component 722, such as an application. The application stored in the memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 722 is configured to execute instructions to perform the method provided in the embodiment of the present application.
[0110] The electronic device 700 may also include a power supply component 726 configured to perform power management of the electronic device 700, a wired or wireless network interface 750 configured to connect the electronic device 700 to a network, and an input / output (I / O) interface 758. The electronic device 700 may operate based on an operating system stored in the memory 732, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, FreeBSD TM or the like.
[0111] An embodiment of the present application further provides a computer program product, including a computer program, which implements the method described in the above embodiment when executed by a processor.
[0112] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0113] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A circuit design testing method, characterized in that: The method comprises: Obtaining a model reasoning file, and compiling the model reasoning file to obtain a compiled file; Importing the compiled file and the model file into a temporary file system to obtain an operating system executable file; the model file is used to provide model information for use by the reasoning program corresponding to the model reasoning file; In response to the transmission task, the operating system executable file is transmitted to the memory of the hardware circuit through the test interface peripheral; the test interface peripheral and the memory are external devices of the hardware circuit, and the hardware circuit is used to test the circuit design under test; In response to a start command, running the circuit design to be tested and the reasoning program according to the operating system executable file in the memory; The obtaining of the model inference file and compiling the model inference file to obtain a compiled file includes: Obtain the model reasoning file and determine the hardware instruction set architecture of the test environment; The model reasoning file is cross-compiled according to the hardware instruction set architecture and the operating system architecture to obtain the compiled file.
2. The circuit design testing method according to claim 1, characterized in that: The step of importing the compiled file and the model file into a temporary file system to obtain an operating system executable file includes: After the compiled file and the model file are imported into a temporary file system, the temporary file system is recompiled to obtain the operating system executable file.
3. The circuit design testing method according to claim 1, characterized in that: Before transmitting the operating system executable file to the memory of the hardware circuit through the test interface peripheral in response to the transmission task, the method further includes: Performing special character removal and zero padding alignment operations on the operating system executable file to obtain a processed operating system executable file; The processed operating system executable file is a .txt text format file.
4. The circuit design testing method according to claim 3, characterized in that: The step of transmitting the operating system executable file to the memory of the hardware circuit through the test interface peripheral in response to the transmission task includes: Create the transmission task through the create_hw_axi_txnTCL command; In response to the transfer task, the processed operating system executable file is transferred to the memory of the hardware circuit through the test interface peripheral.
5. The circuit design testing method according to claim 1, characterized in that: The step of responding to the start command and running the circuit design to be tested and the reasoning program according to the operating system executable file in the memory includes: Performing a reset operation through a control program corresponding to the hardware circuit to start the operation of the circuit design to be tested; In response to the startup command, the circuit design to be tested and the reasoning program are run according to the operating system executable file in the memory.
6. The circuit design testing method according to claim 5, characterized in that: The hardware circuit is also connected to a serial communication peripheral; The releasing the reset operation by a control program corresponding to the hardware circuit to start the operation of the circuit design to be tested includes: The reset operation is released through the control program corresponding to the hardware circuit to start the operation of the circuit design to be tested, and during the operation, the execution information is output through the serial communication peripheral.
7. A circuit design testing device, characterized in that: The device comprises: An acquisition module is used to acquire a model reasoning file and compile the model reasoning file to obtain a compiled file; An import module, used to import the compiled file and the model file into a temporary file system to obtain an operating system executable file; the model file is used to provide model information for use by the reasoning program corresponding to the model reasoning file; A transmission module, configured to transmit the operating system executable file to the memory of the hardware circuit via the test interface peripheral in response to the transmission task; the test interface peripheral and the memory are external devices of the hardware circuit, and the hardware circuit is used to test the circuit design to be tested; An execution module, for responding to a start command and running the circuit design to be tested and the reasoning program according to the operating system executable file in the memory; The acquisition module comprises: The acquisition submodule is used to obtain the model reasoning file and determine the hardware instruction set architecture of the test environment; The cross-compilation submodule is used to cross-compile the model reasoning file according to the hardware instruction set architecture and the operating system architecture to obtain the compiled file.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Neural network compiling method and system, computer equipment and storage medium
CN114399019A
Model deployment method and system, storage medium and electronic equipment
CN116126365A
Software testing method and device
CN117762765A
Neural network accelerator hardware-specific division of inference into groups of layers
US11176449B1
