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

How to import assignment files by command?

NuvKFC
New Contributor I
519 Views

I already have a CSV file for assignment. Does there exist a command to import the CSV file into my projects? Could you please tell me? Thank you very much.

0 Kudos
6 Replies
SyafieqS
Moderator
490 Views

Hi KfC,


You can import it via import assignment dialog box in Quartus menu. To do this, click Assignments | Import Assignments... click on the button labelled "..." and select the file.csv file. Click OK and then click OK again to import the assignments.


NuvKFC
New Contributor I
482 Views

Hi SyafieqS_Intel

       Thank you, SyafieqS_Intel, very much. Unfortunately, the same design has different pin assignment in each Quartus project for different verification engineers because the same pin has different functions. Could I use some command to add the file.csv in qsf file or in qip file? So, I can directly identify which assignment file is using.

SyafieqS
Moderator
387 Views

Hi KfC,


In qsf file, most of the flow is in tcl and quartus support tcl compiler, thus, importing csv using normal tcl command should be working. You may look at below link for details tcl read and write.


https://wiki.tcl-lang.org/page/How+do+I+read+and+write+files+in+Tcl



NuvKFC
New Contributor I
375 Views

Hi SyafieqS_Intel

     Thank you, SyafieqS_Intel, very much. I will try it latter.

     (1)Before that, could Quartus auto execute .tcl files by adding .tcl files into the project as follows picture?

          NuvKFC_0-1637140994917.png

 

     (2)And the means about you said "importing csv using normal Tcl command" is mean that Quartus exist a command to import .csv file? Could you tell me what command is? I can't find it.

 

     Thank you very much.

SyafieqS
Moderator
349 Views

Hi KfC,


It is best to use csv package in Tcllib as it can handle weird cases in that format. You may refer to link below for example. 


https://stackoverflow.com/questions/55205075/tcl-read-first-line-of-a-csv-file


https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tcllib/files/modules/csv/csv.md



NuvKFC
New Contributor I
332 Views

Hi SyafieqS_Intel

    Thank you, SyafieqS_Intel, very much. I will try it. Thank you very, very, much.

Reply