Iverilog源码分析 -- vvp value change 类型

本文介绍了VVP模拟器中使用的几种数值类型,包括vvp_vector4_t、vvp_vector2_t、vvp_scalar_t和vvp_vector8_t。详细解释了这些类型的内部存储方式和应用场景,特别是针对不同强度信息的需求。

vvp_vecor4_t

该类用来存储不包含strength信息的4-stat值;
里面所有的value均为a/b bus:

	// Values in the vvp_vector4_t are stored split across two
	// arrays. For each bit in the vector, there is an abit and a
	// bbit. the encoding of a vvp_vector4_t is:
	//
	//         abit bbit
	//         ---- ----
	// BIT4_0    0    0   (Note that for BIT4_0 and BIT4_1, the bbit
	// BIT4_1    1    0    value is 0. This makes detecting XZ fast.)
	// BIT4_X    1    1
	// BIT4_Z    0    1

      unsigned size_;
      union {
	    unsigned long abits_val_;
	    unsigned long*abits_ptr_;
      };
      union {
	    unsigned long bbits_val_;
	    unsigned long*bbits_ptr_;
      };

代表01xz字符串;

vvp_vector4array_t / vvp_vector4array_sa / vvp_vector4array_aa

这几个类是记录了vvp_vector4_t的array, static alloc 和automatic alloc的不同之处是:static alloc只会产生一次, automatic alloc可能会动态地

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值