I am trying to port a SystemVerilog model of a memory controller to SystemC and am wondering what is the best way to translate run()
-type functions (i.e. with forever loops that do continuous processing) spawned with fork and join to SystemC. These run()
functions are typically spawned at the beginning of the simulation. My confusion is that SystemC does support spawning threads, fork and join, but I believe the language's intent is for SC_THREAD
to provide this kind of functionality. Does anyone have enough experience with both languages to comment?
Note: I believe this question has more to do with convention than a solution that is technically right or wrong. Possibly it can be done more than one way.