taichi-ishitani / tvip-axi

AMBA AXI VIP
Apache License 2.0
361 stars 104 forks source link

Support Vivado simulator #32

Open taichi-ishitani opened 2 years ago

taichi-ishitani commented 2 years ago

Elab error below is reported.

ERROR: [VRFC 10-8792] cannot assign a string to an object of an unpacked type [/home/ishitani/workspace/rggen-sample-testbench/env/tvip-axi/src/tvip_axi_monitor_base.svh:375]

This error is caused by this code.

https://github.com/taichi-ishitani/tvip-axi/blob/21a3bfc5f4137fa032b655b43f4ea83ae6f3b368/src/tvip_axi_monitor_base.svh#L375

We can avoid this error by referring configuration and status objects with this handle.

item.set_context(this.configuration, this.status);
taichi-ishitani commented 2 years ago
ERROR: [XSIM 43-3980] File "/home/ishitani/workspace/rggen-sample-testbench/env/tvip-axi/src/tvip_axi_monitor_base.svh" Line 58 : The SystemVerilog feature "ended" is not supported yet for simulation.

This ended method is a method of tvip_axi_item class but it's seemed that Vivado sim misunderstands this method for ended sequence method.

Avoid this error by defining a new function with different name.

taichi-ishitani commented 2 years ago
ERROR: [XSIM 43-3316] Signal SIGSEGV received.
Printing stacktrace...

[0] /lib64/libc.so.6(cfree+0x3c) [0x7fa328f015bc]
[1] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriIdRef::~VeriIdRef()+0x23) [0x7fa32a9c29e3]
[2] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriIdRef::~VeriIdRef()+0x9) [0x7fa32a9c2a09]
[3] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriAttributeSpec::~VeriAttributeSpec()+0x21) [0x7fa32aa92e71]
[4] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriAttributeInstance::~VeriAttributeInstance()+0x7e) [0x7fa32aa9a11e]
[5] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriAttributeInstance::~VeriAttributeInstance()+0x9) [0x7fa32aa9a199]
[6] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriNode::DeleteAttributes() const+0x53) [0x7fa32ab60f23]
[7] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriTreeNode::~VeriTreeNode()+0x17) [0x7fa32ab60fb7]
[8] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriIfOperator::~VeriIfOperator()+0x9) [0x7fa32a9c54c9]
[9] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriInlineConstraint::SetConstraintBlock(Verific::Array*)+0x42) [0x7fa32a9c6712]
[10] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x720592]
[11] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x73feda]
[12] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriUnaryOperator&)+0xa9) [0x7fa32abd5a69]
[13] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x737271]
[14] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriConditionalStatement&)+0x70) [0x7fa32abd7ab0]
[15] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x7406c5]
[16] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[17] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriFunctionDecl&)+0xd0) [0x7fa32abcf140]
[18] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x7462a4]
[19] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[20] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriClass&)+0xec) [0x7fa32abceeec]
[21] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x771d1a]
[22] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[23] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriModule&)+0x78) [0x7fa32abcdba8]
[24] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x773303]
[25] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x737b86]
[26] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x73d69c]
[27] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x742ddb]
[28] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriTypeRef&)+0xa9) [0x7fa32abd5d49]
[29] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x737984]
[30] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriParamId&)+0x131) [0x7fa32abdabf1]
[31] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x7388c1]
[32] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[33] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriDataDecl&)+0x9c) [0x7fa32abd98ac]
[34] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x7538ad]
[35] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[36] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriClass&)+0x95) [0x7fa32abcee95]
[37] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x771d1a]
[38] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[39] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriModule&)+0x78) [0x7fa32abcdba8]
[40] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x773303]
[41] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x737b86]
[42] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x73d69c]
[43] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x742ddb]
[44] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriTypeRef&)+0xa9) [0x7fa32abd5d49]
[45] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x737984]
[46] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriDataDecl&)+0xf9) [0x7fa32abd9909]
[47] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x753769]
[48] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[49] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriSeqBlock&)+0x7d) [0x7fa32abd6afd]
[50] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x73f291]
[51] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriConditionalStatement&)+0x9b) [0x7fa32abd7adb]
[52] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x7406c5]
[53] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[54] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriFunctionDecl&)+0xd0) [0x7fa32abcf140]
[55] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x7462a4]
[56] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[57] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriClass&)+0xec) [0x7fa32abceeec]
[58] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x771d1a]
[59] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[60] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriModule&)+0x78) [0x7fa32abcdba8]
[61] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x773303]
[62] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x737b86]
[63] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x73d69c]
[64] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x742ddb]
[65] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriSelectedName&)+0xb9) [0x7fa32abd5b39]
[66] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x755fab]
[67] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriScopeName&)+0x10) [0x7fa32abd92a0]
[68] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x73a498]
[69] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[70] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriImportDecl&)+0x4e) [0x7fa32abce34e]
[71] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x7359e7]
[72] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::TraverseArray(Verific::Array const*)+0x85) [0x7fa32abd1ce5]
[73] /storage/eda/tools/xilinx/Vivado/2022.1/lib/lnx64.o/libxsimverific.so(Verific::VeriVisitor::Visit(Verific::VeriModule&)+0x78) [0x7fa32abcdba8]
[74] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x773303]
[75] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x73d69c]
[76] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x58619f]
[77] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x54c08e]
[78] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x554f8f]
[79] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x4dec44]
[80] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fa328e9e3d5]
[81] /storage/eda/tools/xilinx/Vivado/2022.1/bin/unwrapped/lnx64.o/xelab() [0x53fcf7]

It's seemed that a if constraint which has a foreach constraint its inside causes this SEGV error. https://github.com/taichi-ishitani/tvip-axi/blob/21a3bfc5f4137fa032b655b43f4ea83ae6f3b368/src/tvip_axi_slave_default_sequence.svh#L79

taichi-ishitani commented 2 years ago

It's seemed that xlab enters infinite loop when foreach constraints includes a range expression [min:max] which refer an object. For example:

taichi-ishitani commented 2 years ago

tvip_axi_master_item and tvip_axi_slave_item have different random constraints for tvip_axi_item::data variable.

This pattern would cause SEGV error below.

ERROR: [XSIM 43-3316] Signal SIGSEGV received.
Printing stacktrace...

[0] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0xb0db08]
[1] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x62406b]
[2] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x5d4b70]
[3] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x79cafa]
[4] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x6e05a0]
[5] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x6e7188]
[6] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x6a83c4]
[7] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x7e7d87]
[8] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x7ee8c8]
[9] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x56ac31]
[10] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x9f19e5]
[11] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x9b51f2]
[12] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x526bac]
[13] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x53bd0a]
[14] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x4be325]
[15] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fd9ec83b3d5]
[16] /storage/eda/tools/xilinx/Vivado/2021.2/bin/unwrapped/lnx64.o/xelab() [0x524d07]
taichi-ishitani commented 2 years ago

Refer an array variable, which is defined outside of constraint block, from a foreach constraint then xelab enters infinite loop. For example:

https://github.com/taichi-ishitani/tvip-axi/blob/21a3bfc5f4137fa032b655b43f4ea83ae6f3b368/src/tvip_axi_slave_default_sequence.svh#L62