Use this flow when there are only a few variants of a specific IP core file used in your design.
- Generate several static IP cores with the Vivado IP catalog to cover all variants.
- Use generate statements to conditionally instantiate the corresponding Vivado IP core.
This is an example of the content of the wrapper that conditionally instantiates the correct configurations of the RAM:
entity RAM_A is
generic (DATAWIDTH: integer := 8);
port (...);
end RAM_A;
architecture RTL of RAM_A is
begin
8_BIT: if DATAWIDTH=8 generate
RAM_A8_i: entity work.RAM_A8
port map
(...);
end generate 8_BIT;
16_BIT: if DATAWIDTH=16 generate
RAM_A16_i: entity work.RAM_A16
port map
(...);
end generate 16_BIT;
Typically, this method is used for FIFOs and memories with ECC, which cannot be inferred.