Open RasmusGOlsen opened 1 year ago
I'm not into Verilog so much. I know there are sources (*.v
/*.sv
) and headers (*.vh
/*.svh
).
Are include files further files?
I would model it so:
E.g. the latter could be used in a VHDL context if a utils.pkg.vhdl
is added. It's an ordinary VHDL source file, but it contains a package, thus the file name. It could be marked with a key-value pair and multiple package files could be identified by a filtered search checking key-value pairs.
Typically you would give the Verilog include files the .vh / .svh file extension to easily distinguish them from regular Verilog files. A Verilog include file is not compiled by itself. The Verilog preprocessor will do text substitution, i.e. copy/paste the included file content into the Verilog files that include them. Some tools don't specify the included file at all, but instead, specify directories for the Verilog precompiler to search for included files. I think Verilog is inspired by the C language which also operates with a precompiler and include files.
I think I would prefer it's a boolean attribute to the VerilogSourceFile
and SystemVerilogSourceFile
classes since the file extension is not the determining factor.
Latest changes are on dev branch.
There should be a way to specify if the VerilogSourceFile or SystemVerilogSource file is an included file. I suggest this can be a property in the class or a new class.