当前位置:网站首页>Running phase of SystemC
Running phase of SystemC
2022-06-12 13:55:00 【123axj】
Spec Given in SystemC The execution of a program ( stay terminal perform Compiled executable file ):
a) Elaboration—Construction of the module hierarchy
b) Elaboration—Callbacks to function before_end_of_elaboration
c) Elaboration—Callbacks to function end_of_elaboration
d) Simulation—Callbacks to function start_of_simulation
e) Simulation—Initialization phase
f) Simulation—Evaluation, update, delta notification, and timed notification phases (repeated)
g) Simulation—Callbacks to function end_of_simulation
h) Simulation—Destruction of the module hierarchy
My personal understanding is as follows :
- Elaboration—Construction of the module hierarchy, Exemplification Systematic Top Module, That is to say According to the hierarchy call class Constructor for . This process is very important , In the constructor SC_THREAD / SC_METHOD The marked function will be Sign up to SystemC Kernel in ,port Binding is also usually done in the constructor .
- Elaboration—Callbacks to function before_end_of_elaboration, Call all sc_module Example of before_end_of_elabration(), Base class sc_module This function in is null , no need care.
- end_of_elaboration and before_end_of_elaboration The difference between them is not clear for the time being .Spec Both are introduced separately in , systemc: sc_event and sc_event_finder A scenario where these two functions are required is described in .end_of_elaboration Cannot be called in event Of notify function , Cannot call kill, reset, or throw_it of class sc_process_handle.
- start_of_simulation Rarely used in general .
- Simulation—Initialization phase, Call all at once ( SC_METHOD correlation function & This function is not followed by dont_initialize() ).SC_THREAD The correlation function is not executed at this stage .
- Simulation—Evaluation, update, delta notification, and timed notification phases (repeated) This stage is the real SC_METHOD/SC_THREAD correlation function ( stay spec Zhongtong is called processes) Start the execution phase ,SystemC The simulation time starts from 0 Start moving forward ,SystemC Kernel Start at each processes Scheduling execution between .
- end_of_simulation. This function follows before_end_of_elaboration similar , It's also in the base class sc_module As defined in . For this stage ,spec It is explained as follows :If no pending timed notifications or time-outs exist, the end of simulation has been reached. So, exit the scheduler. Applications are recommended to call function sc_stop before returning control from sc_main to ensure that the end_of_simulation callbacks are called. therefore , If there is no explicit call in the program sc_stop, Then all sc_module In the instance end_of_simulation Function will not be called . The general usage of this function is , Do some performance counter Output of the statistical results , But it can also be written in the destructor of the module ; Therefore, it is generally not recommended to use this function .
- Destruction of the module hierarchy
The purpose of member function before_end_of_elaboration is to allow an application to perform actions during elaboration that depend on the global properties of the module hierarchy and that also need to modify the module hierarchy. Examples include the instantiation of top-level modules to monitor events buried within the hierarchy.
operator-> and operator[] of class sc_port should not be called from the function before_end_of_elaboration because the implementation may not have completed port binding at the time of this callback and, hence, these operators may return null pointers. The member function size may return a value less than its final value.
The purpose of member function end_of_elaboration is to allow an application to perform housekeeping actions at the end of elaboration that do not need to modify the module hierarchy. Examples include design rule checking, actions that depend on the number of times a port is bound, and printing diagnostic messages concerning the module hierarchy.
边栏推荐
- Is MySQL query limit 1000,10 as fast as limit 10? How to crack deep paging
- Understanding recursion
- Top 10 tips for visual studio code on Google
- 通过loganalyzer展示数据库中的日志
- 阿里云开发板HaaS510响应UART串口指令
- Tinyxml Usage Summary
- 基于Profibus-DP协议的PLC智能从站设计
- AVFoundation
- Codeforces 1638 B. odd swap sort - tree array, no, simple thinking
- Codeforces 1629 B. GCD arrays - simple thinking
猜你喜欢

Data type conversion and conditional control statements

单总线温度传感器18B20数据上云(阿里云)

CSDN blog points rule

Hash tables, sets, maps, trees, heaps, and graphs

Web3.0, the era of "stimulating creativity"

聊聊MySQL的10大经典错误

618 entered the second half of the period, apple occupied the high-end market, and the domestic mobile phones finally undercut the price competition

Alibaba cloud development board haas510 parses serial port JSON data and sends attributes

Codeforces 1629 F2. Game on sum (hard version) - Yang Hui's triangle, violence, finding rules

Compile and install lamp architecture of WordPress and discuz for multi virtual hosts based on fastcgi mode
随机推荐
Codeforces 1629 D. pecuriar movie preferences - simple thinking, palindrome strings
Single bus temperature sensor 18B20 data on cloud (Alibaba cloud)
Convert the string to hexadecimal string and display it
Codeforces 1637 D. yet another minimization problem - Mathematics, DP
NotePad 常用设置
Behind the unsealing of Shanghai, this group of developers "cloud gathering" built an AI anti epidemic robot
Web3.0,「激发创造」的时代
颜色编码格式介绍
Player screen orientation scheme
Tinyxml Usage Summary
[MySQL advanced] index classification and index optimization scheme (V)
Use of awlive structures
FFmpeg 学习指南
Codeforces 1638 A. reverse - simple thinking
肝了一个月的原创小袁个人博客项目开源啦(博客基本功能都有,还包含后台管理)
Xcode debugging OpenGLES
Create a small root heap and judge the node relationship (also.C\u str() substr(),atoi(),string. Use of find())
Shell notes
Tree reconstruction (pre order + middle order or post order + middle order)
Implementation of Ackermann function with simulated recursion