Cocotb: Recommend checking for TOPLEVEL

Created on 21 Jan 2021  路  3Comments  路  Source: cocotb/cocotb

If TOPLEVEL is not set iverilog fails with an obscure error message because there is nothing after the -s option. I recommend that Makefile.sim check for TOPLEVEL and (and other required variables) and give a clean error message.

categoryproject-automation categoryicarus categoryverilator good first issue bug

All 3 comments

This issue is specific to Icarus. Other simulators allow TOPLEVEL to be empty, which in cocotb will return the root handle as the dut object, and not some entity.

This issue is specific to Icarus. Other simulators allow TOPLEVEL to be empty, which in cocotb will return the root handle as the dut object, and not some entity.

@ktbarrett I tried running it without setting TOPLEVEL for verilator as well, and it failed too because of missing toplevel module name for option --top-module in verilator command.

Thanks to @haroonshafique-10xe this was closed by #2547.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markusdd picture markusdd  路  8Comments

ktbarrett picture ktbarrett  路  7Comments

jwprice100 picture jwprice100  路  9Comments

marlonjames picture marlonjames  路  8Comments

ktbarrett picture ktbarrett  路  9Comments