seabeam / yuu_ahb

UVM AHB VIP
MIT License
75 stars 18 forks source link

an extra cycle between cmd_phase and data_phase is always there even hready keeps high #2

Closed validfox closed 2 years ago

validfox commented 2 years ago
无标题

I'm now using the yuu_ahb_master to drive my ahb interface. And I notice an extra cycle between cmd_phase and data_phase is always there even hready keeps high, like the snapshot above. Am I missing something in the configuration? Thank you!

validfox commented 2 years ago

line 245 to line 246 of yuu_ahb_master_driver.sv it seems a 'vif.wait_cycle()' is added after htrans turns from NONSEQ to !NONSEQ, does these lines add the extra cycle? I also checked AHB lite protocal, cmd phase can be followed by data phase without any extra cycle when hready is high.

seabeam commented 2 years ago

line 245 to line 246 of yuu_ahb_master_driver.sv it seems a 'vif.wait_cycle()' is added after htrans turns from NONSEQ to !NONSEQ, does these lines add the extra cycle? I also checked AHB lite protocal, cmd phase can be followed by data phase without any extra cycle when hready is high.

和这个没关系,当遇到第一个NONSEQ,代码就已经从246行往下走了。 把sequence贴上来吧,里面是否使用了#这样的异步延时?

validfox commented 2 years ago

回复好快,而且还是中文! 我的代码就是用RAL操作几个寄存器 image 下面是配置 image

seabeam commented 2 years ago

回复好快,而且还是中文! 我的代码就是用RAL操作几个寄存器 image 下面是配置 image

和配置应该是没啥关系。最有可能就是用了异步延时了,如果加了而且你用的vcs的话,编译的时候加个-deraceclockdata试试,如果还不行只能等我下来再看看了

validfox commented 2 years ago

就一个时钟,设计可简单了。就是想用ahb去读写寄存器。我做仿真的目的是看看ahb vip和自己写的ral模型能不能一起工作,所以设计部分没任何功能,只有一个寄存器模块,简单的挂到ahb口上。不处理 Hresp, 一直拉高 hready。

seabeam commented 2 years ago

就一个时钟,设计可简单了。就是想用ahb去读写寄存器。我做仿真的目的是看看ahb vip和自己写的ral模型能不能一起工作,所以设计部分没任何功能,只有一个寄存器模块,简单的挂到ahb口上。不处理 Hresp, 一直拉高 hready。

你误会了,是指seq或者case里有#100这样的异步延时

validfox commented 2 years ago

+define+YUU_AHB_MASTER_SETUP_TIME=0+YUU_AHB_MASTER_HOLD_TIME=0 找到问题了,这两个宏被我配置为0了...

seabeam commented 2 years ago

+define+YUU_AHB_MASTER_SETUP_TIME=0+YUU_AHB_MASTER_HOLD_TIME=0 找到问题了,这两个宏被我配置为0了...

Hello, 感谢反馈。 hold是支持#0的,为了适配采样也支持0偏移,于是修改了setup的默认值,不指定的话会将默认使用1step.

BR.