当前位置:网站首页>SystemC time
SystemC time
2022-06-12 13:55:00 【123axj】
The first thing to distinguish is SystemC Simulation time and Machine execution time , Machine execution time It is our CPU The physical time spent by the physical machine running the program , This time is the time we really feel ,1s,1min … ; and SystemC The simulation time is SystemC Program execution kernel Scheduled time ,SystemC Simulation time does not correspond to physical execution time in any granularity , Like a program , stay SystemC Simulation time from 0ns To 100 ns It took CPU The physical time is 10s; It is not possible to deduce from 100ns To 200ns The process also costs 10s The physical time of .
about 1G Hz Of silicon ( Hardware chip ),1s Is to execute 1G individual cycle; But if it's running RTL code Of Simulation, Then run 1 m Cycle It will probably cost CPU Physical time 1h, because Simulation It's serial execution . because Simulation Running too slowly , So we usually use emulation platform To run RTL code, use FPGA Hardware devices to speed up the simulation process .
SystemC It uses pure software to simulate the implementation of hardware , The simulation speed of the program is closely related to our code implementation . It can be used in general cycle per S To express the simulation speed , That is, the physical execution time 1S,SystemC How many times has the simulation time been advanced cycle, If we SystemC The program is configured with 1G Hz, be 1 individual cycle Namely 1ns.
You can use... In the code sc_core::sc_time_stamp() Get the current simulation time .
SC_ZERO_TIME yes SystemC Define a time macro , Express delta T, yes SystemC Kernel The smallest unit of time for scheduling , For programmers , In most cases, it can be simply understood as 0T. notes : If it involves SystemC Problems caused by scheduling sequence , You may need to consider delta T Influence .
Class sc_time yes SystemC Type of time used ,SystemC Supported time units enum sc_time_unit {SC_FS = 0, SC_PS, SC_NS, SC_US, SC_MS, SC_SEC};
Simulation time is an integer quantity. Simulation time is initialized to zero at the start of simulation and increases monotonically during simulation. The physical significance of the integer value representing time within the kernel is determined by the simulation time resolution. Simulation time and time intervals are represented by class sc_time. Certain functions allow time to be expressed as a value pair having the signature <double,sc_time_unit>
The simulation time is an integer . The simulation time is initialized to zero at the beginning of the simulation , Monotonically increase in the simulation process . The physical meaning of the integer value representing the time in the core is determined by the resolution of the simulation time . The simulation time and time interval are determined by the class sc_time Express . Some functions allow you to time Expressed as < double sc_time_unit> Value .
边栏推荐
- What is the default gateway
- [semidrive source code analysis] [x9 chip startup process] 26 - LK of R5 safetyos_ INIT_ LEVEL_ Target phase code flow analysis (TP drvier, audio server initialization)
- Return value of WaitForSingleObject
- [semidrive source code analysis] [x9 chip startup process] 25 - Introduction to mailbox inter core communication mechanism (code analysis) rpmsg-ipcc RTOS & QNX
- Dial up and Ethernet
- Seekg, tellg related file operations
- Single bus temperature sensor 18B20 data on cloud (Alibaba cloud)
- [video lesson] a full set of tutorials on the design and production of Android studio Internet of things app -- all mastered during the National Day
- When the byte jumps, the Chinese 996 is output in the United States
- 正点原子STM32F429核心板的插座型号
猜你喜欢

初学者入门阿里云haas510开板式DTU(2.0版本)--510-AS

【视频课】android studio物联网APP设计制作全套教程--国庆期间全掌握

什么是自动出价?它的优势是什么?

D1 Nezha Development Board understands the basic startup and loading process

Compile and install lamp architecture of WordPress and discuz for multi virtual hosts based on fastcgi mode

Qualcomm platform development series (Protocol) QMI brief introduction and usage

NotePad 常用设置

Transmission and response of events and use cases

Alibaba cloud development board haas510 responds to UART serial port instructions

Single bus temperature sensor 18B20 data on cloud (Alibaba cloud)
随机推荐
618 entered the second half of the period, apple occupied the high-end market, and the domestic mobile phones finally undercut the price competition
Formal analysis of Woo Lam protocol with scyther tool
List of common ACM knowledge points (to be continued)
English learning plan
Understanding recursion
Go zero micro Service Practice Series (II. Service splitting)
Codeforces 1637 D. yet another minimization problem - Mathematics, DP
How to brush leetcode
Codeforces 1629 F1. Game on sum (easy version) - DP, game, thinking
Alibaba Cloud Development Board haas510 submission Device Properties
CSDN blog points rule
Web3.0,「激发创造」的时代
注重点击,追求更多用户进入网站,可以选择什么出价策略?
当字节跳动在美国输出中国式 996
"Non" reliability of TCP
Summary of virtual box usage problems
Codeforces 1629 A. download more RAM - simple greed
Write policy of cache
Byte order data read / write
Implementing singleton mode of database under QT multithreading