Table of Contents

Multiple subdevices with the same number of ports

If multiple subdevices of the same type, same number of ports and different unique_id in addition to a subdevice of the same type and different number of ports is used, an error occurs. The following pages explain, how this error can be resolved.

Error description

The synthesis of the system throws following, or similar, errors in Quartus:

 Error (10652): VHDL Assertion Statement at test01_gpio_block_0.vhd(55): assertion is false - report "Supplied generics do not match expected generics" (FAILURE or ERROR) 
Error (12152): Can't elaborate user hierarchy "test01_gpio_block_0:gpio_block_1"

Cause

Because the ports of the subdevice are identical, Qsys creates only one component (block) and uses multiple instances of this component. But each subdevice has a unique id, which is why each subdevice needs a different component. Qsys generates an *.vhd file for each component with a name like test01_gpio_block_0.vhd.

Solution

Create the missing components manually and integrate them in the generated system. An existing component can be copied and modified.

1.) Generate the system in Qsys

Generate the system in Qsys

2.) Copy and modify the components

  1. The name of the entity at the beginning of the entity declaration
    test01_gpio_block_1 is
  2. The unique_id (in this example it is changed to ‘2’)
    unique_id       : std_logic_vector(31 downto 0) := "00000000000000000000000000000010"
  3. The name of the entity at the end of the entity declaration
    end entity test01_gpio_block_1;
  4. The name of the architecture at the beginning of the architecture declaration
    architecture rtl of test01_gpio_block_1 is
  5. The unique_id at the unique_id_check (in this example it is changed to ‘2’)
    unique_id_check : if unique_id /= "00000000000000000000000000000010" generate
  6. The name of the component at the start of the component declaration:
     gpio_block_0  component avalon_gpio_interface
  7. The unique_id in the generic map of the component decleration (in this example it is changed to ‘2’)
    unique_id       => "00000000000000000000000000000010"

3.) Modify the *.qib-file

At approximately line 10 add a new line for each copy created in the last step. The name and the number of the block have to be adapted.

set_global_assignment -library "test01" -name VHDL_FILE [file join $::quartus(qip_path) "test01_gpio_block_1.vhd"]

4.) Modify the main *.vhd-file

	component test01_gpio_block_1 is

		--... shortened ... 
		
	end component test01_gpio_block_1;
gpio_block_1 : component test01_gpio_block_0
gpio_block_1 : component test01_gpio_block_1