vhdl - VHDL 中的字时间

标签 vhdl

我是 VHDL 的新手。
有一行,如下所示:

constant TIME_DELTA : time := 100 ns;

这是什么字time在行吗?是不是和integer一样的数据类型?当我在互联网上搜索 VHDL 帮助时,很多人都在使用它,但没有人讨论任何关于它的事情。我也搜索过书籍,但没有用。
有人能解释一下这个关键字是如何time的吗?用来?

最佳答案

时间是预定义的物理类型

IEEE 标准 1076™-2008 年:

5.2.4.2 Predefined physical types

The only predefined physical type is type TIME. The range of TIME is implementation dependent, but it is guaranteed to include the range –2147483647 to +2147483647. It is defined with an ascending range. All specifications of delays and pulse rejection limits shall be of type TIME. The declaration of type TIME appears in package STANDARD in Clause 16.

By default, the primary unit of type TIME (1 fs) is the resolution limit for type TIME. Any TIME value whose absolute value is smaller than this limit is truncated to zero (0) time units. An implementation may allow a given elaboration of a model (see Clause 14) to select a secondary unit of type TIME as the resolution limit. Furthermore, an implementation may restrict the precision of the representation of values of type TIME and the results of expressions of type TIME, provided that values as small as the resolution limit are representable within those restrictions. It is an error if a given unit of type TIME appears anywhere within the design hierarchy defining a model to be elaborated, and if the position number of that unit is less than that of the secondary unit selected as the resolution limit for type TIME during the elaboration of the model, unless that unit is part of a physical literal whose abstract literal is either the integer value zero or the floating-point value zero.



在模拟器方面,我将其理解为一个整数值,它表示具有主要限制分辨率(例如 1fs)的时间。
它可以在您的代码中用实数值表示,时间更长,时间刻度更大:
-- time1 and time2 are equal
signal time1 : time := 1000.125 ms;
signal time2 : time := 1000125 us;

关于vhdl - VHDL 中的字时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52091706/

相关文章:

vhdl - 使用 De2-115 板运行在不同板上开发的项目?

需要 VHDL 语法解释

vhdl - Active-HDL 仿真时钟交叉

hardware - a <= a + 1 是 VHDL 中的一个好习惯吗?

arrays - 初始化VHDL中的记录数组

csv - 在 VHDL 中,有没有一种方法使用 std_texio 读取 .csv 文件的元素并将它们存储在变量中以供使用?

vhdl - 何时使用VHDL库std_logic_unsigned和numeric_std?

vhdl - vhdl 中逻辑与 (&&) 的等效项是什么?

VHDL 计数器结果给出 X

VHDL:按钮去抖动(或不去抖动,视情况而定)