Open RasmusGOlsen opened 1 year ago
I wondering about the _version attribute. If you have the _version attribute maybe you don't need VHDL or Verilog classes but just the HDL class.
class HDLIncludeFile(SourceFile):
pass
class HDLSourceFile(SourceFile):
_version: HDLVersion
_library: HDLLibrary
If you just wish multiple classes then may drop the _version and implement multiple classes for VHDL and Verilog.
class HDLIncludeFile(SourceFile):
pass
class HDLSourceFile(SourceFile):
_library: HDLLibrary
class VerilogIncludeFile(HDLIncludeFile, HumanReadable):
pass
class Verilog(HDLSourceFile, HumanReadable):
pass
class VerilogSourceFile95(Verilog):
pass
class VerilogSourceFile2001(Verilog):
pass
class SystemVerilogSourceFile(Verilog):
pass
class SystemVerilogSourceFile2005(SystemVerilog):
pass
class SystemVerilogSourceFile2009(SystemVerilog):
pass
class VHDLSourceFile(HDLSourceFile, HumanReadable):
pass
class VHDLSourceFile87(VHDLSourceFile):
pass
class VHDLSourceFile93(VHDLSourceFile):
pass
class VHDLSourceFile2008(VHDLSourceFile):
pass
The
VerilogSourceFile
andSystemVerilogSourceFile
need a library attribute, the same as in the VHDLSourceFile. Could you add this to theHDLSourceFile
class and remove it from theVHDLSourceFile
class? This way, theVerilogSourceFile
andSystemVerilogSourceFile
will also inherit the library attribute. When you have the Verilog version it is also not necessary to have both aVerilogSourceFile
andSystemVerilogSourceFile
class. There needs to be either a Verilog include attribute or aVerilogIncludeFile
class to handle Verilog include files.