Open olofk opened 7 years ago
Yeah, I'd definitely like to replace the calling of GHDL by a parser too, but it's a really big task!
Extracting the hierarchy wouldn't be too hard. The difficult bit would be resolving the generic parameters. In VHDL the generic parameters can be produced by arbitrary functions so we'd basically need full-blown elaboration in python. I know the VUnit parser isn't up to this task because I'm using it for another project, but @paebbels has one that I'm meaning to look into sometime.
Cool. Sounds like you've done your homework :)
VHDL is notoriously hard to parse
Without having checked this myself, I believe there is Python code in either HDLMake or VUnit for parsing Verilog/VHDL modules/entities. No idea how hard they will be to extract though.