CN113806279B - Modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC - Google Patents

Modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC Download PDF

Info

Publication number
CN113806279B
CN113806279B CN202111224366.3A CN202111224366A CN113806279B CN 113806279 B CN113806279 B CN 113806279B CN 202111224366 A CN202111224366 A CN 202111224366A CN 113806279 B CN113806279 B CN 113806279B
Authority
CN
China
Prior art keywords
serial port
behavior
imx
systemc
service component
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
CN202111224366.3A
Other languages
Chinese (zh)
Other versions
CN113806279A (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.)
Tianjin Jinhang Computing Technology Research Institute
Original Assignee
Tianjin Jinhang Computing Technology Research Institute
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 Tianjin Jinhang Computing Technology Research Institute filed Critical Tianjin Jinhang Computing Technology Research Institute
Priority to CN202111224366.3A priority Critical patent/CN113806279B/en
Publication of CN113806279A publication Critical patent/CN113806279A/en
Application granted granted Critical
Publication of CN113806279B publication Critical patent/CN113806279B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to the technical field of SoC on-chip serial port modeling, and particularly relates to a modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC, which is used for interacting with serial ports, if software acts, analyzing the software acts, processing an act signal by a iMX Q serial port component, generating a feedback signal, feeding back the feedback signal to a simulation CPU core, generating TCP data, feeding back the TCP data to a TCP service component, and calling a gui interface of the TCP service component to display or update a value of a register or a variable; if the hardware behavior is the hardware behavior, converting the command of the hardware behavior into a hardware waveform signal to act on the iMX Q serial port component to generate a corresponding waveform signal, processing the corresponding waveform signal by the TCP service component, and displaying and redisplaying data on the serial port monitor; the invention establishes the serial port simulation platform, can completely and truly simulate all operations of the serial port, directly interact with the outside, can be independently used for code debugging of the serial port, verifies whether the code is correct, and can intuitively see whether the serial port has interaction or not and whether the serial port is good to use.

Description

Modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC
Technical Field
The invention belongs to the technical field of on-chip serial port modeling of SoC, and particularly relates to a modeling method for realizing iMX Q on-chip serial ports of SoC based on SystemC.
Background
The virtualization technology is a technology for achieving the purpose of verifying an application program by replacing hardware with software by simulating a processor core, on-chip hardware resources, a peripheral interface circuit and the like by the software. SystemC is a library of C++ classes that can model complex electronic systems containing software and hardware at different levels of abstraction.
IMX6Q is a high performance processor developed by Feishar Karl. The processor has the characteristics of excellent performance, high energy efficiency, ultra-safety, small size, low price and the like, and is welcomed by the Chinese market. The processor chip also integrates rich communication interfaces, wherein the serial port is one of the most important and most commonly used interfaces of the processor. The design and production time of the hardware development board based on the chip are long, and software cannot be developed in advance, so that virtualization modeling is required to be conducted on the chip, and early learning and debugging are carried out.
The serial port is modeled based on the system C, the hardware is generally only divided into modules, the modules are modeled respectively, a serial port model is built, the model cannot be directly used for interacting with the outside, if the serial port is required to be known to work normally, a VCD waveform file needs to be generated, the file is opened through a waveform tool to check whether the serial port model works normally, the function of judging the serial port by using the waveform file is not intuitive, the simple serial port model cannot be independently used for software debugging, the model is required to be embedded into the whole system to be used, and software personnel cannot independently perform advanced independent serial port debugging on the whole system model.
Disclosure of Invention
First, the technical problem to be solved
The invention aims to solve the technical problems that: how to implement on-chip serial port modeling for imx q.
(II) technical scheme
In order to solve the technical problems, the invention provides a modeling method for realizing iMX Q on-chip serial ports of a SoC based on SystemC, which is implemented based on a simulation platform, wherein the simulation platform comprises a TCP service component, a simulation CPU core and an IMX6Q serial port component; the modeling method comprises the following steps:
Step 1: the user performs interaction with the serial port through gui interface provided by the TCP service component, and the interaction behavior is divided into software behavior and hardware behavior; if the behavior is software behavior, the step 2 is carried out; if the hardware behavior is the hardware behavior, the step 4 is carried out;
Step 2: if the user behavior uses the interaction behavior performed by the TCP service component and the software behavior is triggered, the user behavior firstly acts on the simulation CPU core, the simulation CPU core generates a behavior signal by analyzing the software behavior, the behavior signal is sent to the iMX Q serial port component, and the step 3 is shifted to;
Step 3: the iMX Q serial port component processes the behavior signal to generate a feedback signal, the feedback signal is fed back to the simulation CPU core, TCP data is generated and fed back to the TCP service component through the processing of the simulation CPU core, the gui interface of the TCP service component is called to display or update the value of a register or a variable, and the process is finished;
Step 4: if the user behavior uses the interaction behavior performed by the TCP service component and triggers the hardware behavior, the TCP service component converts a command of the hardware behavior into a hardware waveform signal which directly acts on the iMX Q serial port component, and the step 5 is performed;
Step 5: the iMX Q serial port component processes the hardware waveform signal to generate a corresponding waveform signal for feedback, returns the corresponding waveform signal to the TCP service component and shifts to the step 6;
step 6: the TCP service component processes the corresponding waveform signals fed back by the iMX Q serial port component, the data is displayed and back displayed on the serial port monitor, and the flow is ended.
The simulation platform is realized by using SystemC and C++.
On the simulation platform, related programs can be written like a serial port of a real iMX Q, registers can be operated, and serial port data receiving and transmitting are completed.
Wherein, in the step 2, the software behavior includes a view variable operation.
Wherein, in the step 2, the software behavior includes modifying a variable operation.
Wherein, in the step 2, the software behavior includes a check register operation.
Wherein, in the step 2, the software behavior includes modifying a register operation.
In the step 2, the software behavior includes online debugging.
In the step 2, the behavior signal is a TLM signal.
In step4, the hardware behavior includes sending or receiving data by using a serial monitor in the TCP service component.
(III) beneficial effects
Compared with the prior art, the invention is different from the traditional modeling method for only establishing the serial port model, and establishes a serial port simulation platform which can completely and truly simulate all operations of the serial port, can directly interact with the outside, does not need to embed the serial port model into the whole system model for use, can be independently used for code debugging of the serial port, can verify whether the code is correct, can also intuitively see whether the serial port has interaction or not, and is good for use.
The traditional serial port component does not support the behavior of software, namely, checking and modifying variables and registers and online debugging functions, and only outputs corresponding waveforms.
Drawings
FIG. 1 is a schematic workflow diagram of the method of the present invention.
Detailed Description
For the purposes of clarity, content, and advantages of the present invention, a detailed description of the embodiments of the present invention will be described in detail below with reference to the drawings and examples.
In order to solve the technical problems, the invention provides a modeling method for realizing iMX Q on-chip serial ports of a SoC based on SystemC, which is implemented based on a simulation platform, wherein the simulation platform comprises a TCP service component, a simulation CPU core and an IMX6Q serial port component; as shown in fig. 1, the modeling method includes:
Step 1: the user performs interaction with the serial port through gui interface provided by the TCP service component, and the interaction behavior is divided into software behavior and hardware behavior; if the behavior is software behavior, the step 2 is carried out; if the hardware behavior is the hardware behavior, the step 4 is carried out;
step 2: if the user behavior uses the interaction behavior performed by the TCP service component, the software behavior (viewing and modifying variables, registers, online debugging and the like) is triggered, the user behavior firstly acts on the simulation CPU core, the simulation CPU core generates a behavior signal by analyzing the software behavior, and the behavior signal (TLM signal) is sent to the iMX Q serial port component to enter step 3;
Step 3: the iMX Q serial port component processes the behavior signal to generate a feedback signal, the feedback signal is fed back to the simulation CPU core, TCP data is generated and fed back to the TCP service component through the processing of the simulation CPU core, the gui interface of the TCP service component is called to display or update the value of a register or a variable, and the process is finished;
step 4: if the user behavior uses the interaction behavior performed by the TCP service component and triggers hardware behavior (data is sent or received by using a serial monitor in the TCP service component), the TCP service component converts a command of the hardware behavior into a hardware waveform signal to directly act on the iMX Q serial component, and the step 5 is shifted to;
Step 5: the iMX Q serial port component processes the hardware waveform signal to generate a corresponding waveform signal for feedback, returns the corresponding waveform signal to the TCP service component and shifts to the step 6;
step 6: the TCP service component processes the corresponding waveform signals fed back by the iMX Q serial port component, the data is displayed and back displayed on the serial port monitor, and the flow is ended.
The simulation platform is realized by using SystemC and C++.
On the simulation platform, related programs can be written like a serial port of a real iMX Q, registers can be operated, and serial port data receiving and transmitting are completed.
Wherein, in the step 2, the software behavior includes a view variable operation.
Wherein, in the step 2, the software behavior includes modifying a variable operation.
Wherein, in the step 2, the software behavior includes a check register operation.
Wherein, in the step 2, the software behavior includes modifying a register operation.
In the step 2, the software behavior includes online debugging.
In the step 2, the behavior signal is a TLM signal.
In step4, the hardware behavior includes sending or receiving data by using a serial monitor in the TCP service component.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and variations could be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and variations should also be regarded as being within the scope of the invention.

Claims (10)

1. The modeling method for realizing the iMX Q on-chip serial port of the SoC based on the SystemC is characterized in that the modeling method is implemented based on a simulation platform, and the simulation platform comprises a TCP service component, a simulation CPU core and an IMX6Q serial port component; the modeling method comprises the following steps:
Step 1: the user performs interaction with the serial port through gui interface provided by the TCP service component, and the interaction behavior is divided into software behavior and hardware behavior; if the behavior is software behavior, the step 2 is carried out; if the hardware behavior is the hardware behavior, the step 4 is carried out;
Step 2: if the user behavior uses the interaction behavior performed by the TCP service component and the software behavior is triggered, the user behavior firstly acts on the simulation CPU core, the simulation CPU core generates a behavior signal by analyzing the software behavior, the behavior signal is sent to the iMX Q serial port component, and the step 3 is shifted to;
Step 3: the iMX Q serial port component processes the behavior signal to generate a feedback signal, the feedback signal is fed back to the simulation CPU core, TCP data is generated and fed back to the TCP service component through the processing of the simulation CPU core, the gui interface of the TCP service component is called to display or update the value of a register or a variable, and the process is finished;
Step 4: if the user behavior uses the interaction behavior performed by the TCP service component and triggers the hardware behavior, the TCP service component converts a command of the hardware behavior into a hardware waveform signal which directly acts on the iMX Q serial port component, and the step 5 is performed;
Step 5: the iMX Q serial port component processes the hardware waveform signal to generate a corresponding waveform signal for feedback, returns the corresponding waveform signal to the TCP service component and shifts to the step 6;
step 6: the TCP service component processes the corresponding waveform signals fed back by the iMX Q serial port component, the data is displayed and back displayed on the serial port monitor, and the flow is ended.
2. The modeling method of the serial port on the SoC chip based on the SystemC implementation iMX Q of claim 1, wherein the method uses SystemC and c++ to implement the simulation platform.
3. The modeling method of the serial port on the SoC chip based on the system c implementation iMX Q according to claim 2, wherein on the simulation platform, related programs can be written like the serial port of the real iMX Q, and the registers are operated to complete the receiving and transmitting of the serial port data.
4. The method for modeling serial ports on a SoC chip based on the SystemC implementation iMX Q as claimed in claim 1, wherein in the step 2, the software behavior includes a view variable operation.
5. The method for modeling serial ports on a SoC chip based on the SystemC implementation iMX Q as claimed in claim 1, wherein in the step 2, the software behavior includes modifying a variable operation.
6. The method for modeling serial ports on a SoC chip based on the SystemC implementation iMX Q as claimed in claim 1, wherein in the step 2, the software behavior includes checking register operation.
7. The method for modeling serial ports on a SoC chip based on the SystemC implementation iMX Q as claimed in claim 1, wherein in the step 2, the software behavior includes modifying register operations.
8. The modeling method of the SoC on-chip serial port based on the SystemC implementation iMX Q as claimed in claim 1, wherein in the step 2, the software behavior includes online debugging.
9. The modeling method of the SoC on-chip serial port based on the SystemC implementation iMX Q of claim 1, wherein in the step 2, the behavior signal is a TLM signal.
10. The method for modeling serial ports on SoC chip based on the SystemC implementation iMX Q as claimed in claim 1, wherein in the step 4, the hardware behavior includes transmitting or receiving data by using a serial port monitor in a TCP service component.
CN202111224366.3A 2021-10-19 2021-10-19 Modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC Active CN113806279B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111224366.3A CN113806279B (en) 2021-10-19 2021-10-19 Modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111224366.3A CN113806279B (en) 2021-10-19 2021-10-19 Modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC

Publications (2)

Publication Number Publication Date
CN113806279A CN113806279A (en) 2021-12-17
CN113806279B true CN113806279B (en) 2024-04-30

Family

ID=78937631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111224366.3A Active CN113806279B (en) 2021-10-19 2021-10-19 Modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC

Country Status (1)

Country Link
CN (1) CN113806279B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504187A (en) * 2014-12-11 2015-04-08 安徽师范大学 FPGA (Field Programmable Gate Array) online verification structure and method based on serial communication interface
CN105956267A (en) * 2016-04-29 2016-09-21 北京航天自动控制研究所 Equipment modeling language based embedded type emulated serial port and modeling method thereof
CN110674579A (en) * 2019-09-25 2020-01-10 中国科学院微小卫星创新研究院 Satellite peripheral interface simulation system and method
CN112964244A (en) * 2021-02-03 2021-06-15 中山大学 Model-based combined navigation rapid prototyping system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504187A (en) * 2014-12-11 2015-04-08 安徽师范大学 FPGA (Field Programmable Gate Array) online verification structure and method based on serial communication interface
CN105956267A (en) * 2016-04-29 2016-09-21 北京航天自动控制研究所 Equipment modeling language based embedded type emulated serial port and modeling method thereof
CN110674579A (en) * 2019-09-25 2020-01-10 中国科学院微小卫星创新研究院 Satellite peripheral interface simulation system and method
CN112964244A (en) * 2021-02-03 2021-06-15 中山大学 Model-based combined navigation rapid prototyping system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于 SystemVerilog 的事务级建模在FPGA 测试中的应用与研究;李敬磊 等;《科技与创新》;20161205;116-117 *

Also Published As

Publication number Publication date
CN113806279A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
US8146061B2 (en) Systems and methods for graphics hardware design debugging and verification
CN113312879A (en) Chip circuit function verification system, method, device and storage medium
CN102053911A (en) Automated testing method and system based on Android and mobile terminal
CN107907814B (en) Method for improving mass production test efficiency of chips
CN104915297B (en) A kind of automated testing method of the APP power consumption of android equipment
US8504344B2 (en) Interface between a verification environment and a hardware acceleration engine
CN102480467A (en) SOC (System on a Chip) software and hardware collaborative simulation verification method based on network communication protocol
US20080147372A1 (en) Automatic method and system for identifying and recording transaction data generated from a computer simulation of an integrated circuit
CN102929688B (en) The simulator of a kind of simulated touch screen realizes method and this simulator
CN113806279B (en) Modeling method for realizing iMX Q on-chip serial port of SoC based on SystemC
CN103744757B (en) DF file verification method based on ARINC661
CN112559264B (en) Simulation test method for realizing FPGA (field programmable Gate array) universal serial port by verification platform based on UVM (Universal verification Module)
Yang et al. Current status and challenges of soc verification for embedded systems market
CN107526585B (en) Scala-based FPGA development platform and debugging and testing method thereof
CN211044204U (en) Mouse keyboard simulation equipment
CN113704032A (en) Embedded heterogeneous multi-core processor architecture parallel debugging system and method
CN113609052A (en) Chip simulation system based on FPGA and microprocessor and implementation method
CN101097457A (en) Electric wave bell application program development system
CN105511995B (en) A kind of graphics processor verification method
CN102999373A (en) Stimulator for stimulating press-key apparatus and implement method of stimulator
CN113204494B (en) Terminal remote test platform and method, electronic equipment and readable medium
CN110348127B (en) Method, device, equipment and storage medium for generating test cases
CN208580303U (en) A kind of test terminal of the product on carrier rocket measuring system arrow
Patel et al. Transaction-based debug of PCI Express embedded SoC platforms
CN104820638A (en) Embedded whole machine automatic testing method

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