User Tools

Site Tools


Running LegUp with QSYS or SOPC

parameter in makefile.config specifies which builder to use for makefile.common


parameter in legup.tcl specifies builder to use for SwOnly.cpp

  set_parameter USE_QSYS 0

0 for SOPC, 1 for QSYS

Implementing LegUp to run with Qsys

Files changed


added parameter “BUILDER” to specify which software to use (SOPC builder or QSYS)


hybridGenerateSOPC: added scripts to generate qsys system and testbench

clean: cleantiger cleanpcie added legup_qsys.tcl to files to remove


added parameter USE_QSYS set to 0 for SOPC, 1 for QSYS


for QSYS, changed (in 3 places)

  associatedReset reset




Functions Added

  void printQSYSFileInitial(raw_ostream &qsys);
  void printQSYSFileAPIcores(raw_ostream &qsys);
  void printQSYSFile(raw_ostream &qsys, Function * F, unsigned long long baseAddr, int AccelCount);

tcl file changes

  void printCacheHWtcl()
  void SwOnly::initWaveFile(...)

added if statement to distinguish btw sopc and qsys

data_cache_hw.tcl: qsys system changed bursts to pipelined qsys testbench uses different instance naming scheme

sopc/qsys tcl script

sopc module = qsys instance

add module/instance:

in sopc

  add_module type module_name
  Ex. add_module data_cache data_cache_0

equivalent to qsys

  add_instance instance_name type
  Ex. add_instance data_cache_0 data_cache

setting base address:

in sopc

  set_avalon_base_address instance.interface "0x0" 

equivalent to qsys

  set_connection_parameter_value instance_0.interface_0/instance_1.interface_1 baseAddress "0x0"


  • baseAddress can be set to desired value, not necessarily 0x0 (this is used here for simplicity)
  • instance_0.interface_0 and instance_1.interface_1 indicate the two connection points for which the baseAddress is set
    • For example, from example 'matrixmultiply' in 'legup-3.0/examples/matrixmultiply'
    • change

set_avalon_base_address multiply_0.s1 “0x0”

  • to

set_connection_parameter_value pipeline_bridge_PERIPHERALS.m0/multiply_0.s1 baseAddress “0x0”

need to add for every instance:

  add_connection clk.clk_reset instance.clockreset_reset

to load a system

need to first have tiger.qsys in the tiger sub-directory

  load_system tiger/tiger.qsys

to save a system


saves system to the same file that was opened with 'load_system'

  save_system file_name.qsys

saves system to the name specified here Note: must save system to a .qsys file, otherwise will cause Error

generating a system

Do not need 'generate_system' in the tcl file, as was needed for sopc. The 'ip-generate' script in Makefile.common will run the tcl script through qsys and generate the .v file


for all instances of:


change to:


(change 1's to 0's)


Testbench top level module


all other files in


qsys generated testbench uses system verilog files, need to have full version of Modelsim to run simulation

Significant Changes

QSYS uses QuartusII 13.0 instead of 11.1 SOPC still supported. tiger processor directory:


QSYS system changed burst to pipelined

sopc_to_qsys.txt · Last modified: 2013/06/24 14:28 by emily.miao