我设法用cocotb读取通用模块值,没有问题。但如果我写不出来。
我的VHDL通用语言是:
...
generic (
...
C_M00_AXI_BURST_LEN : integer := 16;
...
)我可以在茧里读到:
self.dut.log.info("C_M00_AXI_BURST_LEN 0x{:x}".format(
int(self.dut.c_m00_axi_burst_len)))但如果我想改变它
self.dut.c_m00_axi_burst_len = 32我得到了这个python错误:
Send raised exception: Not permissible to set values on object c_m00_axi_burst_len
File "/opt/cocotb/cocotb/decorators.py", line 197, in send
return self._coro.send(value)
File "/usr/local/projects/axi_pattern_tester/vivado_ip/axi_pattern_tester_1.0/cocotb/test_axi_pattern_tester_v1_0.py", line 165, in axi4_master_test
dutest.print_master_generics()
File "/usr/local/projects/axi_pattern_tester/vivado_ip/axi_pattern_tester_1.0/cocotb/test_axi_pattern_tester_v1_0.py", line 86, in print_master_generics
self.dut.c_m00_axi_burst_len = 32
File "/opt/cocotb/cocotb/handle.py", line 239, in __setattr__
return getattr(self, name)._setcachedvalue(value)
File "/opt/cocotb/cocotb/handle.py", line 378, in _setcachedvalue
raise TypeError("Not permissible to set values on object %s" % (self._name))有什么方法可以用GHDL作为模拟器吗?
发布于 2018-04-13 09:01:33
事实上,user1155120、Paebbels和scary_jeff回答了这个问题:这是不可能的。但是,可以以不同的方式使用配置来解决这个问题。
https://stackoverflow.com/questions/44040693
复制相似问题