rggen / rggen-sample-testbench

https://github.com/rggen/rggen
MIT License
14 stars 2 forks source link

Support Vivado simulator #5

Open taichi-ishitani opened 2 years ago

taichi-ishitani commented 2 years ago
FATAL_ERROR: Vivado Simulator kernel has discovered an exceptional condition from which it cannot recover. Process will terminate. For technical support on this issue, please open a WebCase with this project attached at http://www.xilinx.com/support.
Time: 113 ns  Iteration: 1  Process: /tvip_apb_pkg/tvip_apb_monitor_base(ITEM=tvip_apb_master_item_tvip_apb_pkg_work)::monitor_thread
  File: /home/ishitani/workspace/rggen-sample-testbench/env/tvip-apb/src/tvip_apb_monitor_base.svh
exit

This error is reported when:

Concretely, this foreach block causes this error. https://github.com/rggen/rggen-sv-ral/blob/441ea35390b5ec8df32eb93023248ea153d66e1b/rggen_ral_map.svh#L198

To resolve this error, this foreach block should be re-written by using first and next methods.

taichi-ishitani commented 2 years ago

In UVM package bundled with Vivado, methods defined in uvm_reg_backdoor are not virtual methods. image

In the original UVM package, these methods are virtual. image

Therefore, user defined backdoor access via uvm_reg_backdoor cannot be used with Vivado sim.

taichi-ishitani commented 2 years ago

Vivado sim inserts space and backslash to HDL path like this.

top.u_block_0.\g_register_0.u_register .u_register_common.u_backdoor

These characters should be removed.

taichi-ishitani commented 2 years ago
FATAL_ERROR: Vivado Simulator kernel has discovered an exceptional condition from which it cannot recover. Process will terminate. For technical support on this issue, please open a WebCase with this project attached at http://www.xilinx.com/support.
Time: 30 ns  Iteration: 0  Process: /rggen_ral_backdoor_pkg/rggen_backdoor::read
  File: /home/ishitani/workspace/rggen-sample-testbench/ral/rggen-sv-ral/rggen_ral_backdoor_pkg.sv
exit

Another fatal error is reported when using virtual interface stored in an associative array. https://github.com/rggen/rggen-sv-ral/blob/441ea35390b5ec8df32eb93023248ea153d66e1b/rggen_ral_backdoor_pkg.sv#L61

Use uvm_config_db instead of associative array then this error is not reported.

taichi-ishitani commented 2 years ago

Following methods are re-defiend because they are not virtual.

taichi-ishitani commented 2 years ago

A lot of mismatch error is reported with VHDL env. I think there are some problem on border of SV and VHDL but not sure.