在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 5090|回复: 3

[求助] 关于vcs编译和运行时候的寄存器初始化问题

[复制链接]
发表于 2020-11-13 14:38:54 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 高乐 于 2020-11-16 09:42 编辑

问题1   vcs的命令里面有+vcs+initreg+random ,可以对寄存器进行随机初始化。但是这个命令可以加到编译条件里面,也可以添加到运行仿真的条件里,想问下有没有在这两个地方用这个命令有什么区别么,求解答。  问题2    然后+vcs+initreg+config config-file的选项里面,config file的语法里tree top.d1 0 1,是把top.d1初始化从0到1,为什么不是直接用一个常数0,1或者random,而是一个跳变的过程,从0到1(这里是我理解错误了,大家不要被误导)。第一个0是depth的意思。
发表于 2020-11-15 14:09:42 来自手机 | 显示全部楼层
tree top.d1  0  1,确定是初始化0到1的意思?我记得第一个0表示depth,生效作用域是从top.d1开始到以下所以层次。没有什么跳变过程,也不需要。
 楼主| 发表于 2020-11-16 09:40:27 | 显示全部楼层


saipolo 发表于 2020-11-15 14:09
tree top.d1  0  1,确定是初始化0到1的意思?我记得第一个0表示depth,生效作用域是从top.d1开始到以下所 ...


感谢大佬解惑,tree instance_hierarchical_name depth [x|z|0|1|random| random seed_value] 是的语法上说的确实是depth,之前理解错是因为两个条目在一起(如下),第一个是初始化成0,第二个是初始化成x,所以ug上解释才说的的从o到x,我给当成单独第二条是从0到x了。我看深度depth在ug上面给的例子都是0,从tree的instance到下面所有,如果是1呢,这个depth 设置1有代表什么呢,还有最后一个层次结构不初始化么?还请指教,谢谢。
tree top 0 0
tree top.d1 0 x
The first entry initializes all variables, registers, and memories in the design to value 0. The second entry changes the initial values from 0 to x for the variables, registers and memories in thetop.d1 instance and all instances beneath top.d1, namely top.d1.g1 and top.d1.g2.

 楼主| 发表于 2020-11-16 09:54:39 | 显示全部楼层
是我自己文档没看清楚。感谢大佬了。
depth 0 代表 Initialize all levels down the sub-hierarchy to the leaf level instances
depth 1 代表 Initialize only the specified instance
depth 2。。。 代表 Initialize the specified number of levels down the sub-hierarchy from the specified instance
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-9-22 21:18 , Processed in 0.017231 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表