<1>$time 系统函数

The $time system function returns an integer that is a 64-bit time, scaled to the timescale unit of the module that invoked it.

`timescale 10 ns / 1 ns
module test;reg set;parameter p = 1.55;initial begin//$monitor($time,,"set=",set);#p set = 0;#p set = 1;endinitial begin$monitor($time,,"set=",set);end
endmodule
 vcs 仿真结果如下:0 set=x2 set=03 set=1V C S S i m u l a t i o n   R e p o r t
Time: 32 ns  CPU time: 0.680 seconds Data structure: 0.0Mb

分析:

a) The simulation times 16 ns(1.55x10=15.5~16ns) and 32 ns(1.55x10=15.5~16ns+1.55x10=15.5~16ns=32ns) are scaled to 1.6 and 3.2 because the time unit for the module is 10 ns; therefore, time values reported by this module are multiples of 10 ns.
b) The value 1.6 is rounded to 2, and 3.2 is rounded to 3 because the $time system function returns an integer. The time precision does not cause rounding of these values.

因为精度是1ns,1.55*10=15.5ns,四舍五入,取16ns

假如将精度设置为

`timescale 10 ns / 1ps  那么,结果将是15.5和31。但是,此时打印结果还是: 如上述所示,打印结果不变。因为还要重新换算回去,重新是 $time 10ns 单位来显示。

<2>$stime 系统函数

The $stime system function returns an unsigned integer that is a 32-bit time, scaled to the timescale unit of the module that invoked it. If the actual simulation time does not fit in 32 bits, the low order 32 bits of the current simulation time are returned.

对于$time的example,$stime和$time是一样的。

<3> $realtime

The $realtime system function returns a real number time that, like $time, is scaled to the time unit of the module that invoked it.

将上述example改为$realtime之后,结果如下所示:

0 set=x
1.6 set=0  // 此处要换算回去,重新显示小数
3.2 set=1  // 此处要换算回去,重新显示小数V C S   S i m u l a t i o n   R e p o r t
Time: 32 ns

其他运行结果相同。

#systemverilog# $time,$stime,$realtime的使用相关推荐

  1. Towards Real-time Semantic RGB-D SLAM in Dynamic Environments(动态语义SLAM)

    动态环境下的实时语义SLAM 简介 摘要 系统流程 实验结果 总结 简介 在ICRA 2021上看到这样一篇论文:Towards Real-time Semantic RGB-D SLAM in Dy ...

  2. Oracle 11g dataguard三种模式以及实时查询(Real-time query)功能设置

    之前我们讨论过<Linux Oracle 11g dataguard物理standby 配置过程>, 但是在实际过程中会遇到不同的问题,首先我们讨论下ORACLE DATAGUARD的三种 ...

  3. Single Molecule Real-Time Sequencing

    Single Molecule Real-Time Sequencing Published July 9, 2016 Recently, I have witnessed the uprising ...

  4. Real-Time DNA Sequencing from Single Polymerase Molecules

    Real-Time DNA Sequencing from Single Polymerase Molecules  单聚合酶分子的实时DNA测序 Abstract ①We detected the ...

  5. Single molecule real-time (SMRT) sequencing comes of age: applications and utilities for medical dia

    Single molecule real-time (SMRT) sequencing comes of age: applications and utilities for medical dia ...

  6. The power of single molecule real-time sequencing technology in the de novo assembly of a eukaryotic

    The power of single molecule real-time sequencing technology in the de novo assembly of a eukaryotic ...

  7. 快速目标检测--YOLO-LITE: A Real-Time Object Detection Algorithm Optimized for Non-GPU Computers

    YOLO-LITE: A Real-Time Object Detection Algorithm Optimized for Non-GPU Computers https://github.com ...

  8. 实时车道检测--A Novel Vision-Based Framework for Real-Time Lane Detection and Tracking

    A Novel Vision-Based Framework for Real-Time Lane Detection and Tracking SAE Technical Paper 2019-01 ...

  9. 实时目标检测--Pelee: A Real-Time Object Detection System on Mobile Devices

    Pelee: A Real-Time Object Detection System on Mobile Devices ICLR 2018 Code: https://github.com/Robe ...

  10. 快速人脸验证--MobileFaceNets: Efficient CNNs for Accurate Real-time Face Verification on Mobile Devices

    MobileFaceNets: Efficient CNNs for Accurate Real-time Face Verification on Mobile Devices Face Verif ...

最新文章

  1. aspx页面事件执行顺序
  2. kubernetes不同的命名空间下的容器能通信吗_超长干货 | Kubernetes命名空间详解
  3. 用matlab仿真函数在空间分布,1.3 信道函数免费阅读_MATLAB R2016a通信系统建模与仿真28个案例分析免费全文_百度阅读...
  4. Android IllegalStateException: The specified child already has a parent问题解决办法
  5. Scala AKKA入门示例
  6. 如何保证NFS文件锁的一致性?
  7. 【Auto.js】QQ自动回赞_简易版
  8. 中根遍历二叉查找树所得序列一定是有序序列_二叉搜索树(BST)
  9. 判断一个偶数(大于4)是不是两个素数之和
  10. getcwd和pwd为什么不一样_农村医保,为什么每个地区收费不一样?
  11. ojdbc14_g.jar与ojdbc14.jar区别
  12. ShellExecuteEx and SHELLEXECUTEINFO and ShellExecute
  13. python爬虫轻松下载某易云音乐
  14. 好用的项目管理工具|选择Tracup的N种理由
  15. 位,字节,字符的区别是什么?
  16. ORACLE和SQL SERVER数据交换的二进制问题
  17. 使用TIBCO Rendezvous发送hello world,实现监听和发送
  18. firefox浏览器一分钟去广告--去广告插件安装教程(adblock plus)
  19. 力扣牛客每日刷题(Python解法持续更新)
  20. arachni安装与使用

热门文章

  1. 局域网内被外网访问的解决方案
  2. ROWNUM(伪行号)如何在ACCESS查询中实现。
  3. 基于JavaWeb Mybatis+MVC(JSP + servlet + javabean)的高校就业管理系统(含项目源码)
  4. 报表模板—在项目管理中应用数据报表分析
  5. Maven基础(2-1):maven详解2
  6. 太原理工大学软件学院信息安全课程设计DAY4
  7. 基于微信的拍照花卉识别
  8. 横瓜先生为什么不屑于帮助360和搜搜等其它二流搜索打败李彦宏的百度搜索
  9. 10.2 Python 类和对象
  10. C语言在txt文本后面添加字符串函数总结