SystemVerilog 中一些数据类型

本文介绍了SystemVerilog中的数据类型,包括packed array(向量细分)、unpacked array(分别处理元素)、内存(reg、logic或bit的一维数组)以及多维数组(MDA)的概念。此外,还提到了动态数组,这种类型的尺寸可以在运行时设置或更改。
摘要由CSDN通过智能技术生成

packed array:

An array where the dimensions are declared before an object name. Packed arrays can have any number of dimensions. A one-dimensional packed array is the same as a vector width declaration in IEEE 1364-2005 Verilog. Packed arrays provide a mechanism for subdividing a vector into subfields, which can be conveniently accessed as array elements. A packed array differs from an unpacked array, in that the whole array is treated as a single vector for arithmetic operations.

For example:

bit [7:0] a; // packed array of scalar bit types

unpacked array:

An array where the dimensions are declared after an object name. Unpacked arrays are the same as arrays in IEEE 1364-2005 Verilog and can have any number of dimensions. An unpacked array differs from a packed array in that the whole array cannot be used for arithmetic operations. Each element shall be treated separately.

For example:

<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值