Jump to content

Context switching


Recommended Posts

hello ,

I have a systemC model where i using two independent func ...these function have priority processing ..

so i case a higher priority requests comes context swtiching happens with resp to current processing  ..


Any way to implement context switching w.r.t systemC 

Link to comment
Share on other sites

Your question is not pretty much clear to me, let me try to answer it still.


Context Switching: is the process of storing and restoring the state (context) of a process so that execution can be resumed from the same point at a later time.


So if you want the local members of the function to be used in other function :

1. then you have to make it global and used between the two

2. In case  wanted to supply the updated values to other function: it will get that if both the functional calls are in different delta cycles.



P.S: by function here I am SC_METHOD or normal functional call executed in zero time, that would be executed in zero time.


You need not to take care of context switching , the simulator does itself, that is the COOPERATIVE MULTITASKING , as in case of resumption of process implemented as SC_THREAD.


If not answer of your question , kindly elaborate it further.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...