Hello Brian, commercial simulators seem to have a common internal representation, independent of the VHDL language version and at some point independent from VHDL or Verilog (mixed language simulation).
Yes, compiling one entity/architecture with different standards leads to two *.cf file entries: - one the in *-obj93.cf file and - one in the *-obj08.cf file. As you noted, the object file *.o is overwritten. Elaborating such a design, which uses mixed object files will cause an error or a crash at runtime! We had the problem in our PoC-Library, where a user can switch VHDL standards for each testbench run. If one entity or package was not replaced, and an "old" one was reused, it was emitting an error. Why is that so? VHDL files are compiled to object files like in C for linking with ld (binutils) (at least for the gcc and llvm backends). I assume, due to changes in the VHDL standard (e.g. protected types), the generated *.o files and data structures are not fully compatible between the generated files. How to solve this? GHDL 0.34dev has a new (additional) lookup strategy for libraries referenced by the -P switch Example: ghdl -a --std=93 --work=goo -Pfoo example.vhdl Will search in: - ./foo -> as usual - ./foo/goo/v93 -> new behavior So you can now compile your entities into a specific folder ghdl -a -o foo/goo/v93/test.o --std=93 --work=goo test.vhdl or use another working dir to do so. This solves the overwriting problem, but does not solve the mixed version problem. Regards Patrick ----------------------------------- Wissenschaftliche Hilfskraft Technische Universität Dresden Fakultät Informatik Institut für Technische Informatik Lehrstuhl VLSI-Entwurfssysteme, Diagnostik und Architektur 01062 Dresden Tel.: +49 351 463-38451 Fax: +49 351 463-38324 Raum: APB-1020 E-Mail: patrick.lehm...@tu-dresden.de WWW: http://vlsi-eda.inf.tu-dresden.de -----Original Message----- From: Ghdl-discuss [mailto:ghdl-discuss-boun...@gna.org] On Behalf Of Brian Drummond Sent: Thursday, July 07, 2016 2:51 PM To: ghdl-discuss@gna.org Subject: [Ghdl-discuss] GHDL and different VHDL standards? One project I am working on, has apparently been designed with different compilation units written to different VHDL language standards, and I guess this is inevitable on large projects developed over time, reusing old code. GHDL allows compilation of each source file to its appropriate standard, and these compilations are recorded in the appropriate "obj- std.cf" files. However at elaboration, what are the rules for elaborating a unit compiled with one standard, but whose components are compiled to another? Is this illegal as per the LRM? Some commercial simulators seem to allow it. If I compile a unit with the default (93) and recompile it with (08) it is in both .cf files. The older object file has presumably been replaced, so an attempt to elaborate the unit with -93 should fail timestamp/hash checks) ghdl -e --std=xx allows me to select either for elaboration, but any required units that are only compiled to another standard, are simply reported as missing, instead of instantiated after searching other libraries. Are there incompatibilities in the object files that would prevent an elaboration mixing versions? Are there any use cases for mixing versions to allow reuse of older code? I'm not asking for an "enhancement" to ghdl to allow this, just exploring the space. (And for the current project, building everything for VHDL-2008 simply works). -- Brian _______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss