VHDL中的时间戳 [英] Time stamp in VHDL

查看:178
本文介绍了VHDL中的时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VHDL中是否有任何函数可用于获取进程正在运行的当前模拟时间?可能与systemC sc_time_stamp()

is there any function in VHDL which is used to get current simulation time at which a process is running? May be same like the function in systemC sc_time_stamp()

推荐答案

是的.使用关键字now.

您可以使用VHDL属性打印仿真时间:

You can print the simulation time using VHDL Attributes:

report "current time = " & time'image(now);

您还可以将当前时间存储到变量中:

You can also store the current time to a variable:

variable v_TIME : time := 0 ns;
v_TIME := now;
-- STUFF HAPPENS
v_TIME := now - V_TIME; --used to find delta time

这篇关于VHDL中的时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆