Trung tâm đào tạo thiết kế vi mạch Semicon


  • ĐĂNG KÝ TÀI KHOẢN ĐỂ TRUY CẬP NHIỀU TÀI LIỆU HƠN!
  • Đăng ký
    *
    *
    *
    *
    *
    Fields marked with an asterisk (*) are required.
wafer.jpg

Time In SystemC Part III

Email In PDF.

sc_time_stamp ()

The function sc_time_stamp return's the current simulation time. During elaboration and initialization the function will return a value of zero.

Example : sc_time_stamp()

  1 #include

  2

  3 int sc_main (int argc, char* argv[]) {

  4   cout<<"Current time is "<< sc_time_stamp() << endl;

  5   sc_start(1);

  6   cout<<"Current time is "<< sc_time_stamp() << endl;

  7   sc_start(100);

  8   cout<<"Current time is "<< sc_time_stamp() << endl;

  9   sc_stop();

 10   cout<<"Current time is "<< sc_time_stamp() << endl;

 11   return 0;// Terminate simulation

 12 }

Simulation Output : sc_time_stamp()
 Current time is 0 s

 Current time is 1 ns

 Current time is 101 ns

 SystemC: simulation stopped by user.

 Current time is 101 ns

Bạn Có Đam Mê Với Vi Mạch hay Nhúng      -     Bạn Muốn Trau Dồi Thêm Kĩ Năng

Mong Muốn Có Thêm Cơ Hội Trong Công Việc

Và Trở Thành Một Người Có Giá Trị Hơn

Bạn Chưa Biết Phương Thức Nào Nhanh Chóng Để Đạt Được Chúng

Hãy Để Chúng Tôi Hỗ Trợ Cho Bạn. SEMICON  

 

Lần cập nhật cuối ( Thứ ba, 29 Tháng 3 2022 00:48 )  
Chat Zalo