当前位置:网站首页>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.
边栏推荐
- Brush one question every day /537 Complex multiplication
- Encryptor and client authenticate with each other
- Alibaba Cloud Development Board haas510 submission Device Properties
- 阿里云开发板HaaS510将串口获取数据发送到物联网平台
- Debug code to quickly locate the error location
- Cmake basic tutorial - 01 a-hello-cmake
- Display logs in the database through loganalyzer
- 拆改广告机---业余解压
- 2000. reverse word prefix
- 当字节跳动在美国输出中国式 996
猜你喜欢

Write policy of cache

Briefly describe the difference between CGI and fastcgi

Greed issues - Egypt scores

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

chrome://tracing Performance analysis artifact

当字节跳动在美国输出中国式 996
Introduction to color coding format

When the byte jumps, the Chinese 996 is output in the United States

Alibaba cloud development board haas510 responds to UART serial port instructions

Xcode debugging OpenGLES
随机推荐
CSDN blog points rule
阿裏雲開發板HaaS510報送設備屬性
Comparator summary
Codeforces 1638 A. reverse - simple thinking
Qualcomm platform development series (Protocol) QMI brief introduction and usage
Scyther工具形式化分析Woo-Lam协议
Codeforces 1629 B. GCD arrays - simple thinking
go-zero 微服务实战系列(二、服务拆分)
[wustctf2020] selfie score query -1
Binary tree traversal
Shell notes
969. pancake sorting
上海解封背后,这群开发者“云聚会”造了个AI抗疫机器人
工具笔记 —— 常用自定义工具类(正则,随机数等)
Display logs in the database through loganalyzer
通过loganalyzer展示数据库中的日志
Codeforces 1637 E. best pair - Thinking
Is MySQL query limit 1000,10 as fast as limit 10? How to crack deep paging
什么是自动出价?它的优势是什么?
2021-05-28