• skip to content



flink-project

Universal Serial Interface to FPGA's

User Tools

  • Admin
  • Log In

Site Tools

  • Recent Changes
  • Media Manager
  • Sitemap
You are here: start » multiple_subdevices_with_the_same_number_of_ports

Sidebar

Navigation

  • Home
  • flink VHDL subdevices and interfaces
  • flink Linux Kernel Modules
  • flink Userspace Library
  • flink Library Lite
  • flink Utilities
  • flink Python Library
  • flink Java Library

  • flink First Steps
  • flink on a Phytec PCM032 Board
  • flink on a Digilent ZYBO

Table of Contents

Table of Contents

  • Error description
  • Cause
  • Solution
    • 1.) Generate the system in Qsys
    • 2.) Copy and modify the components
    • 3.) Modify the *.qib-file
    • 4.) Modify the main *.vhd-file
multiple_subdevices_with_the_same_number_of_ports

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

  • Go to the folder synthesis, where Qsys created the files for the system
  • For each group of subsystem with identical ports there is one *.vhd-file. For Example test01_gpio_block_0.vhd. In the following text this file(s) is/are called template.
  • For each member of such a group create a copy of the template(s) and renumber them accordingly. For Example: test01_gpio_block_0.vhd is the original and test01_gpio_block_1.vhd is the copy
  • In each copy 7 lines has to be modified:
  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

  • The main *.vhd-file has the same name as the Qsys. For example: system.test01.vhd
  • Search for the component declaration of your template(s)
  • Make a copy of the declaration for each copy made in step 2
  • Modify the names of the new declarations (first and last line of the declaration):
	component test01_gpio_block_1 is

		--... shortened ... 
		
	end component test01_gpio_block_1;
  • Find the port map for all blocks which belong to the new created components
gpio_block_1 : component test01_gpio_block_0
  • Adapt the component names
gpio_block_1 : component test01_gpio_block_1
multiple_subdevices_with_the_same_number_of_ports.txt · Last modified: 2016/02/25 13:32 by 127.0.0.1

Page Tools

  • Show pagesource
  • Old revisions
  • Back to top
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki