David Rogoff
2015-02-05 05:59:53 UTC
Hi all.
Getting back into some VHDL verification after many years of SystemVerilog. Question about packages and deferred definitions.
Test environment has main test split into separate entity and architecture files so that 1) entity can be compiled once with RTL and only architecture file needs to be recompiled when changes, and 2) multiple architecture files can be configured to the single entity.
This works great. I'm now trying to extend this concept with a package to be used by this test file. Again, I'm setting up the package and package body in separate files so the test entity can "use" the package file and multiple package body files (each corresponding to the test architecture files) would have the local definitions of things.
This is fine for constants and procedures since I can put the prototype in the package file and then the deferred constant assignment and procedure bodies in the package body files. So far, so good.
However, it all dies for the type definitions. Each package body needs to define its own version of the types. It doesn't look like there's such a thing as deferred type declarations.
Am I missing something? Another way to implement this concept? I can brute-force a Verilog/C-like `define by using the compile script to concatenate the package body file (minus the package body/end package body lines) and the architecture file into one (inserting the "package" after the "architecture xx of yy is" line) and compiling that. Ugly, but it should work.
Help!
Thanks,
David
Getting back into some VHDL verification after many years of SystemVerilog. Question about packages and deferred definitions.
Test environment has main test split into separate entity and architecture files so that 1) entity can be compiled once with RTL and only architecture file needs to be recompiled when changes, and 2) multiple architecture files can be configured to the single entity.
This works great. I'm now trying to extend this concept with a package to be used by this test file. Again, I'm setting up the package and package body in separate files so the test entity can "use" the package file and multiple package body files (each corresponding to the test architecture files) would have the local definitions of things.
This is fine for constants and procedures since I can put the prototype in the package file and then the deferred constant assignment and procedure bodies in the package body files. So far, so good.
However, it all dies for the type definitions. Each package body needs to define its own version of the types. It doesn't look like there's such a thing as deferred type declarations.
Am I missing something? Another way to implement this concept? I can brute-force a Verilog/C-like `define by using the compile script to concatenate the package body file (minus the package body/end package body lines) and the architecture file into one (inserting the "package" after the "architecture xx of yy is" line) and compiling that. Ugly, but it should work.
Help!
Thanks,
David