I want to make two FPGA builds using the same source code but with a slight variation.
The variation is defined in terms of a constant defined in the library file. Some instances are enabled or disabled based on this setting.
For one build I need something like this:
constant CONFIG_EN : std_logic_vector(3 downto 0) := "1001"
and the other build I need this setting:
constant CONFIG_EN : std_logic_vector(3 downto 0) := "1111"
What is the best way to implement it?
Can I do something like the following in the library file?:
-- User-defined before each build
build1 = 0
if(build1) then
constant CONFIG_EN : std_logic_vector(3 downto 0) := "1001"
else
constant CONFIG_EN : std_logic_vector(3 downto 0) := "1111"
If no, what is the best way to go about this?