Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verilog needs library, and include file information #63

Open
RasmusGOlsen opened this issue Oct 17, 2023 · 1 comment
Open

Verilog needs library, and include file information #63

RasmusGOlsen opened this issue Oct 17, 2023 · 1 comment

Comments

@RasmusGOlsen
Copy link

RasmusGOlsen commented Oct 17, 2023

The VerilogSourceFile and SystemVerilogSourceFile need a library attribute, the same as in the VHDLSourceFile. Could you add this to the HDLSourceFile class and remove it from the VHDLSourceFile class? This way, the VerilogSourceFile and SystemVerilogSourceFile will also inherit the library attribute. When you have the Verilog version it is also not necessary to have both a VerilogSourceFile and SystemVerilogSourceFile class. There needs to be either a Verilog include attribute or a VerilogIncludeFile class to handle Verilog include files.

class HDLIncludeFile(SourceFile):
    pass

class VerilogIncludeFile(HDLIncludeFile, HumanReadableContent):
    pass

class HDLSourceFile(SourceFile):
    _library: HDLLibrary

class VHDLSourceFile(HDLSourceFile, HumanReadableContent):
    _version: VHDLVersion

class VerilogSourceFile(HDLSourceFile, HumanReadableContent):
    _version: VerilogVersion
@RasmusGOlsen
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant