当前位置:网站首页>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.
边栏推荐
- 【SemiDrive源码分析】【X9芯片启动流程】25 - MailBox 核间通信机制介绍(代码分析篇)之 RPMSG-IPCC RTOS & QNX篇
- Programmer interview golden classic good question / interview question 01.05 Edit once
- 开发中使用的语言技巧
- Codeforces 1634 F. Fibonacci additions - Fibonacci sequence addition, ideas
- Go zero micro Service Practice Series (II. Service splitting)
- Behind the unsealing of Shanghai, this group of developers "cloud gathering" built an AI anti epidemic robot
- NotePad 常用设置
- 拆改广告机---业余解压
- [MySQL advanced] index classification and index optimization scheme (V)
- Recursion of subviews of view
猜你喜欢

Talk about the top 10 classic MySQL errors

Go language functions as parameters of functions

阿里云开发板HaaS510将串口获取数据发送到物联网平台

chrome://tracing Performance analysis artifact

阿里云开发板HaaS510响应UART串口指令

Transmission and response of events and use cases

Now you must know the pointer

拆改廣告機---業餘解壓

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

Codeforces 1637 D. yet another minimization problem - Mathematics, DP
随机推荐
Codeforces 1629 A. download more RAM - simple greed
Codeforces 1629 F2. Game on sum (hard version) - Yang Hui's triangle, violence, finding rules
Binary tree traversal
Explanation of static and extern keywords
Acwing: topology sequence
Go zero micro Service Practice Series (II. Service splitting)
After reading the question, you will point to offer 16 Integer power of numeric value
Return value of WaitForSingleObject
Brush one question every day /537 Complex multiplication
Codeforces 1637 B. mex and array - reading, violence
Void pointer (void*) usage
播放器屏幕方向方案
Paw 高级使用指南
Byte order data read / write
Codeforces 1637 A. sorting parts - simple thinking
[advanced MySQL] query optimization principle and scheme (6)
Dial up and Ethernet
Talk about the top 10 classic MySQL errors
Mold and remainder
[WUSTCTF2020]颜值成绩查询-1