D
Dave Miller
Guest
Hello all --
I have seen several posts with questions regarding techniques for
conditional compiles. I have a similar question, but I don't want to
conditionally generate hardware or multiple configurations. I just want to
have multiple sets of constants in my package, and select a set depending on
whether I am running a simulation, or compiling hardware. For example
(using C preprocessor directives)
#ifdef simulation
constant PixelsPerLine : integer := 32;
constant LinesPerFrame : integer := 16;
#else
constant PixelsPerLine : integer := 1024
constant LinesPerFrame : integer := 512;
#endif
This way I can just define "simulation" in my testbench, and I don't have to
modify my package definitions depending on what I am doing. I have seen
suggestion that I just use a C preprocessor, but I sure would like to do it
all in VHDL so I can stay within my Xilinx environment. Is there any way to
do this?
Thanks in advance
Dave Miller
Tecolote Development
I have seen several posts with questions regarding techniques for
conditional compiles. I have a similar question, but I don't want to
conditionally generate hardware or multiple configurations. I just want to
have multiple sets of constants in my package, and select a set depending on
whether I am running a simulation, or compiling hardware. For example
(using C preprocessor directives)
#ifdef simulation
constant PixelsPerLine : integer := 32;
constant LinesPerFrame : integer := 16;
#else
constant PixelsPerLine : integer := 1024
constant LinesPerFrame : integer := 512;
#endif
This way I can just define "simulation" in my testbench, and I don't have to
modify my package definitions depending on what I am doing. I have seen
suggestion that I just use a C preprocessor, but I sure would like to do it
all in VHDL so I can stay within my Xilinx environment. Is there any way to
do this?
Thanks in advance
Dave Miller
Tecolote Development