Questa/Modelsim: don't force compilation unit settings
See original GitHub issueI discovered an issue today while trying to simulate a medium-sized project (several files) which uses SystemVerilog packages for constant and property definitions; it complained about multiple declarations of the same properties through wildcard imports.
# ** Error: /path/to/file.sv(line): Identifier 'C_ABCDE' is not directly visible.
# Found multiple Declaration of 'C_ABCDE' through wildcard imports from these packages : component_defs, component_defs, component_defs, component_defs, component_defs, component_defs, component_defs, component_defs, component_defs, component_defs, component_defs, component_defs
I fixed this by modifying the cocotb/makefiles/simulators/Makefile.questa
file to remove the -mfcu
option at line 98, allowing QuestaSim to treat each file as a separate compile unit (using the -sfcu
option instead). If you want I could submit a pull request with this change.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
ModelSim User's Manual - Microsemi
The vcom command compiles VHDL design units. You must compile VHDL files in the order necessitate to any design requirements. Projects may assist...
Read more >Compile and Run Options - EDA Playground Documentation
Option, Description. -2002, Forces the compiler to conform to VHDL 2002 (IEEE Std 1076™-2002). This is the default mode of operation.
Read more >ModelSim SE User's Manual
ModelSim's compiler for VHDL design units is vcom (CR-311). ... simplify interaction with ModelSim; you don't need to understand the ...
Read more >ModelSim® User's Manual
ModelSim ® User's Manual, v10.5b ... Macro Definitions and Compiler Directives in Compilation Unit Scope . ... Force and Release Statements in Verilog...
Read more >ModelSim User's Manual - UCSD CSE
Modes of Operation. ModelSim User's Manual, v6.5e. 35. • force ... Library window — Shows design libraries and compiled design units. To update...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One small UX comment here - intuitively, I would have assumed that just by setting
COMPILE_ARGS
, I would completely overrideDEFAULT_COMPILE_ARGS
, while your code example does not do this. Of course, one can get used to it, but this may be a small trap for users.@mciepluc Just to clarify: I did not set
VSIM_ARGS
, it was correctly applied from theEXTRA_ARGS
variable in the makefile so that problem has already been solved.Using overridable
DEFAULT_COMPILE_ARGS
could be an idea.@forensicgarlic I agree, it’s a mystery to me why it was deemed necessary to set the defaults like this - possibly to ensure consistent behavior across different compiler/simulator backends?
However it is a bit problematic as long as the compiler freaks out if both opposing arguments are applied at the same time, failing to execute instead of allowing the user to override the (perhaps wrongfully assumed) cocotb defaults.