当前位置:网站首页>SystemC:SC_ Thread and SC_ METHOD
SystemC:SC_ Thread and SC_ METHOD
2022-06-12 13:55:00 【123axj】
SC_THREAD / SC_METHOD All are spec Mentioned in processes,SC_CTHREAD Rarely used , Not much discussed here .
SC_THREAD / SC_METHOD Itself is a SystemC Defined macro , In the source code, we can find the corresponding actual execution statement , In fact, it is to add the corresponding function in parentheses to SystemC kernel In the scheduling list in .SC_THREAD / SC_METHOD Must be in a module Or before_end_of_elaboration / end_of_elaboration Use in . If you want to Simulation Phase dynamically creates a thread or method, You need to use sc_pawn.
A process may call function sc_spawn to create a spawned process instance, in which case the new process instance shall be added to the set of runnable processes (unless function sc_spawn_options::dont_initialize is called) and subsequently executed in this very same evaluation phase.
sc_process_handle sc_get_current_process_handle() You can get the handle of the last registered function closest to it , And then you can do it in Simulation Stage disable / enable This processes.
SC_METHOD There has to be a sensitive List of sensitive events ;SC_THREAD Generally, it does not follow the sensitive list , Of course, you can also add .
SC_METHOD The call logic of the associated function is , When a sensitive event is triggered (notify) When , The function is called completely once , A function cannot have any wait Function call .
SC_THREAD The call logic for is ,Simulation The stage is called once , And in the whole Simulation The phase will only be called once , So in general SC_THREAD Will use while(1) To avoid function exit .SC_THREAD It is generally required that there must be explicit or implicit wait call , Otherwise SystemC Procedure stagnation , That is to say SystemC Simulation time does not advance , Has been while(1) In the implementation of , This is also the most common mistake for novices , And this kind of mistake is debug The process is very easy to ignore .
SC_THREAD Sensitive lists of are only encountered in functions wait() or wait(int) It works , At this point, you need to wait for the sensitive list to be triggered , Equivalent to using... In a function wait( Sensitive list Events ).
边栏推荐
- 初学者入门阿里云haas510开板式DTU(2.0版本)--510-AS
- 播放器屏幕方向方案
- NotePad 常用设置
- Transmission and response of events and use cases
- Codeforces 1637 D. yet another minimization problem - Mathematics, DP
- Briefly describe the difference between CGI and fastcgi
- Implementing singleton mode of database under QT multithreading
- xcode 调试openGLES
- Behind the unsealing of Shanghai, this group of developers "cloud gathering" built an AI anti epidemic robot
- Web3.0, the era of "stimulating creativity"
猜你喜欢

注重点击,追求更多用户进入网站,可以选择什么出价策略?

Possible solutions to problems after CodeBlocks installation

公司运营中更注重转化的出价策略,如何实现? —Google sem

Alibaba cloud development board haas510 sends the serial port data to the Internet of things platform

Démontage et modification de la machine publicitaire - décompression amateur

Create a small root heap and judge the node relationship (also.C\u str() substr(),atoi(),string. Use of find())

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

【SemiDrive源码分析】【X9芯片启动流程】25 - MailBox 核间通信机制介绍(代码分析篇)之 RPMSG-IPCC RTOS & QNX篇

阿里云开发板HaaS510连接物联网平台--HaaS征文

Alibaba cloud development board haas510 connects to the Internet of things platform -- Haas essay solicitation
随机推荐
Formal analysis of Woo Lam protocol with scyther tool
Transmission and response of events and use cases
Top 10 tips for visual studio code on Google
Behind the unsealing of Shanghai, this group of developers "cloud gathering" built an AI anti epidemic robot
Is MySQL query limit 1000,10 as fast as limit 10? How to crack deep paging
Codeforces 1637 B. mex and array - reading, violence
Dial up and Ethernet
969. pancake sorting
Alibaba cloud development board haas510 sends the serial port data to the Internet of things platform
公司运营中更注重转化的出价策略,如何实现? —Google sem
Alibaba cloud development board haas510 submission device attributes
Now you must know the pointer
CSDN blog points rule
Tinyxml Usage Summary
Codeforces 1634 F. Fibonacci additions - Fibonacci sequence addition, ideas
NotePad 常用设置
CUDA error: CUBLAS_ STATUS_ NOT_ INITIALIZED when calling `cublasCreate(handle)`
Alibaba cloud development board haas510 connects to the Internet of things platform -- Haas essay solicitation
[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
Codeforces 1638 B. odd swap sort - tree array, no, simple thinking