Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

qip generator

Altera_Forum
Honored Contributor II
3,800 Views

Does anyone have a qip generator script that they can share? I am looking to create a script that will scan my source folder for all the verilog, system verilog, vhdl and sdc sources and make a qip file. 

 

I am not familiar with the tags used in the qip and any existing script may be a good headstart for me. 

 

Thank you. 

Best regards, 

Sanjay
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
2,403 Views

qip generator, q2_make_qip.tcl: 

 

# !/bin/sh # exec tclsh "$0" "$@" # # Making quartus <file>.qip file # There are 2 way to usage: 1- run with intput parameters, 2- run with internal parameters # Parameters: # <file_name> - output file name # <path> - path to find files (valid range: "./" or "./ core" or "core1 ../core2", etc.) # # Example usage: # q2_make_qip.tcl all.qip ./ # q2_make_qip.tcl all.qip "./ ../core2" # source q2_make_qip.tcl (for example from Quartus tcl console) # exec tclsh q2_make_qip.tcl all.qip "./ ../core2" (for example from Quartus tcl console) # or edit code: EDIT HERE...END; and run q2_make_qip.tcl # if {>0} { puts "-------------------------------------------------------" puts "Input parameters:" set file_name set path puts " file name : '$file_name'" puts " path : '$path'" } else { # EDIT HERE: set file_name "all.qip" set path "./" # END; } set p_file set cnt 0 proc find { path pattern key_word } { foreach i { puts $::p_file "set_global_assignment -name $key_word \" global cnt incr cnt } } proc find_in_path { path } { find $path *.sv SYSTEMVERILOG_FILE find $path *.svh SYSTEMVERILOG_FILE find $path *.v VERILOG_FILE find $path *.sdc SDC_FILE find $path *.vhd VHDL_FILE find $path *.vhdl VHDL_FILE find $path *.tdf AHDL_FILE } foreach p $path { find_in_path $p puts $::p_file "" } close $p_file puts "-------------------------------------------------------" puts " Find $cnt files" puts " Making file '$file_name'" puts " Press 'Enter' to exit ..." gets stdin
0 Kudos
Altera_Forum
Honored Contributor II
2,403 Views

This is great yura-w. Thank you so much.

0 Kudos
Altera_Forum
Honored Contributor II
2,403 Views

you are welcome

0 Kudos
Altera_Forum
Honored Contributor II
2,403 Views

 

--- Quote Start ---  

you are welcome 

--- Quote End ---  

 

 

Hi yura-w, 

 

What is the QIP generator's usage? Do you mean that i can use this script to enclose my source code files into a quaruts ip? And i can only add that qip file into my project and reuse those source codes?
0 Kudos
Altera_Forum
Honored Contributor II
2,403 Views

 

--- Quote Start ---  

Hi yura-w, 

What is the QIP generator's usage? Do you mean that i can use this script to enclose my source code files into a quaruts ip? And i can only add that qip file into my project and reuse those source codes? 

--- Quote End ---  

 

Hi, 

This script only makes new qip file, to easy add group of files in project (Useful for you own "ip").
0 Kudos
Altera_Forum
Honored Contributor II
2,403 Views

 

--- Quote Start ---  

Hi, 

This script only makes new qip file, to easy add group of files in project (Useful for you own "ip"). 

--- Quote End ---  

 

 

hello, 

 

Thanks, i see. It means we can only one qip file into our project, and this qip file will help to "add" all source files into the project, instead of adding all files one by one.
0 Kudos
Altera_Forum
Honored Contributor II
2,403 Views

Jerry, 

 

I would like to use the qip file to make it easy to integrate various reusable modules. In my environment, each module is in its own folder. There could be more than one file for each module. e.g. sub-modules, sdc files, etc. As the modules are reusable their folders get copied around. And adding each file to the Quartus QSF is a hassle. QIP makes it easy as it is just one file. 

 

A script to create the QIP file makes it even easier. 

 

Sanjay 

 

 

--- Quote Start ---  

hello, 

 

Thanks, i see. It means we can only one qip file into our project, and this qip file will help to "add" all source files into the project, instead of adding all files one by one. 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
2,403 Views

 

--- Quote Start ---  

Jerry, 

 

I would like to use the qip file to make it easy to integrate various reusable modules. In my environment, each module is in its own folder. There could be more than one file for each module. e.g. sub-modules, sdc files, etc. As the modules are reusable their folders get copied around. And adding each file to the Quartus QSF is a hassle. QIP makes it easy as it is just one file. 

 

A script to create the QIP file makes it even easier. 

 

Sanjay 

--- Quote End ---  

 

Hi fpgabuilder: 

 

Thanks for you reply! Now it's clear for me.
0 Kudos
Reply