SystemC Hello World

 Hello World 

#include "systemc.h"

int sc_main (int argc, char* argv[]) {
  
  cout <<"Hello World "<< endl;
  return 0;// Terminate simulation
  
}

Simulator Output :

Hello World
Execute the above code on 

#include “systemc.h”:
Includes SystemC library header file.
int sc_main (int argc, char* argv[ ]):
int is the return value.
sc_main() is entry point to the users code form library, It is called by the function main() which is part of the SystemC library.
The arguments argc and argv[] are the standard command-line arguments. They are passed to sc_main() from main() in the library.
 
{ } :
The two curly brackets are used to indicate the beginning and the end of the function sc_main.
cout:
cout represents the standard output stream in C++.
 
return 0;
The return statement causes the main function to finish.

 Basic Input and Output 

Cin, cout, cerr and clog are are the instance of ostream class,

Cin   – gets the input from standard input device.
Cout – To display message on standard output device.
Cerr  – To display error message on standard output device.
Clog – To display log message on standard output device.
❮ Previous Next ❯

SystemC Interview Questions

Below are the most frequently asked SystemC interview questions,

  1. What is SystemC SC_HAS_Process?
  2. What is the difference between SystemC sc_int and sc_bigint ?
  3. What is the difference between SystemC SC_METHOD and SC_THREAD?
  4. what are different types of sensitivity in SystemC?
  5. SC_METHOD is preferable over SC_THREAD. Why?
  6. what is context switching in SC_THREAD?
  7. Explain the SystemC simulation kernel?
  8. what is virtual prototyping?
  9. What is the end of elaboration and before the end of elaboration?
  10. what is SC_ZERO_TIME?
  11. What is the difference between sc_port and sc_export?
  12. What are the features of TLM 2.0
  13. What is the difference between TLM 1.0 to TLM 2,0?
  14. What are the different transport interfaces in TLM 2.0?
  15. Difference between method and thread?
  16. Which one you choose for implementation?
  17. what is sc_zero_time in System C and what is the use?
  18. What is the use of dont_initilazie?
  19. Explain SystemC next_trigger and wait difference?
  20. Why is utility sockets are under the non-interoperable layer?
  21. Explain the Debug and Direct memory interface?
  22. What is temporal decoupling?
  23. Explain mutex and semaphore?