Agenda
-TCL Scripting support in quartus II Software
-Creating Projects
-Compiling Designs
-Accessing Report Data
-Analyzing
TCL Scripting Benefits
-Custom Analysis
Extract Only Report Information You Need
-Automation
Eliminate Manual Steps in Graphical User Interface(GUI)
Interface with Other Design Software
-Reproducibility
Easier Project Maintenance and Documentation
Quartus II TCL Support
-Quartus II Software Provides Extensive Tcl Scripting Support
-Four Command-Line Executables Include Tcl Interpreter
-Quartus II Tcl API Include Over 150 Commands in 14 Packages
TCL Packages
-TCL Commands Grouped by Function in Packages
-Subset of Available Packages is Preloaded
Reduces Memory Footprint
Load Packages as Necessary In TCL Script
-Not All Packages Available in All Command-Line Executables
Packages Align with Executable Functionality
Timeing Analysis Package Only in quartus_tan
Commonly Used Packages
name |
Description |
::quartus::project |
Create Projects,Make Assignments |
::quartus::flow |
Complie Projects,Run Common Flows |
::quartus::report |
Access Report Tables,Create Custom Reports |
::quartus::timing |
Compute and Report Timing Paths |
::quartus::timing_report |
List Timing Paths |
-Loading Packages
load_package <name> [-version <version>]
::quartus:: in Name is Optional
Alternately Use TCL package require Command
::quartus::project Package
-Create Projects and Make Assignments
-Some Commonly Used Commands
Project and Revision
project_new,project_open,project_close,create_revision,set_current_revision
General Assignment
set_global_assignment,set_instance_assignment
Specific Assignment
set_location_assignment,set_input_delay,set_output_delay,
set_multicycle_assignment,create_base_clock,timegroup
::quartus::project Example
-Create Project and Make Assignments
Use fir_filter Tutorial Files
Example:
project_new fir_filter -revision filtref -overwrite
set_global_assignment -name FAMILY Cyclone
set_global_assignment -name DEVICE EP1C6F256C6
set_global_assignment -name BDF_FILE filtref.bdf
set_global_assignment -name TOP_LEVEL_ENTITY filtref
set_location_assignment -to clk Pin_G1
create_base_clock -fmax "100 MHZ" -target clk clocka
create_relative_clock -base_clock clocka -divede 2 \
-offset "500 ps" -target clkx2 clockb
set_multicycle_assignment -from clk -to clkx2 2
project_close
Saving Assignments to QSF
-Assignments Not Automatically Saved to Quartus II setting File(QSF)
-Assignments Must Be Saved to QSF before Using Them
Before a System Call,for Example
-Some Command Save Assignments Automatically
-project_close,execute_flow,execute_module
-Use export_assignments Command for Manual Control
export_assignments Scenario
-Commandly Used Before A System Call for Command-line Executable
Example:
project_open $project_name
set_global_assignments -name FAMILY Stratix
#Before calling quartus_map,save the FAMILY assignment
export_assignemnts
#Now call quartus_map
qexec "quartus_map $project_name"
-Using execute_moudle -tool map instead of qexec Saves Assignments Automatically
::quartus::flow Package
-Compile Projects and Run Common Flows
-Two Commands
execute_flow <flow name>
compile,-check_ios,etc
execute_moudle -tool <tool>
map,fit,tan,etc
-Package Is Not Loaded by Default
Use load_package flow Before Either Command
::quartus::flow Example
-Open Project and Compile Design
Bulids on Previous Example
Example:
load_package flow
project_open fir_filter -revision filtref
execute_flow -compile
project_close
-Could Add execute_flow -compile Command to Previous Example
Create Project and Complie with One Script
Pop Quiz
-Write One Script that Creates and Compiles Project
-Combine Project Creation Script with Project Compilation Script
Pop Quiz Answer
load_package flow
project_new_filter -revision filtref -overwrite
set_global_assignment -name FAMILY Cyclone
set_global_assignment -name DEVICE EP1C6F256C6
set_global_assignment -name BDF_FILE filtref.bdf
set_global_assignment -name TOP_LEVEL_ENTITY filtref
set_location_assignment -to clk Pin_G1
create_base_clock -fmax "100 MHz" -target clk clocka
create_relative_clock -base_clock clocka -divide 2\
-offset "500 ps" -target clkx2 clockb
set_multicycle_assignment -from clk -to clkx2 2
execute_flow -compile
project_close
::quartus::report Package
-Access Report Tables and Create Custom Report
-Some Commonly Used Commands
Report Management
load_report,unload_report,create_report_panel
Information About Reports
get_report_panel_names,get_number_of_rows
Access Report Data
get_report_panel_row,get_report_panel_data,get_timing_analysis_summary_result
Report Structure
-Commands to Access Report Data Require Panel Name
-Panel Name is the Hierarchical Path to the Panel
-Hierarchy Uses || Characters
<Folder Name> || <Panel Name>
-Selected Report Panel Named "Timing Analyzer || Timing Analyzer Settings"
-First-Level Reports Have No ||
Flow Log Panel Named Flow Log
-Panels Are Tabular
Rows and Columns
-Refer to Rows and Columns by Number or Name
-Numbering Starts at Zero
-Row 0 Has Column Headings
Panel Structure Example
-row2
-row_name "Timing Models"
-col1
-col_name Setting
Example:
get_report_panel_data -name "Timing Analyzer||Timing Analyzer Settings"\
-row_name "Timing Models" -col_name Setting
::quartus::report Example
-Print Number of Failing Paths per Clock Domain
-Use Timing Analyzer Summary Panel
Failed Paths Column
-Print Number of Failing Path Per Clock Domain
Example:
load_package report
project_open fit_filter -revision filtref
load_report
set panel_name "Timing Analyzer||Timing Analyzer Summary"
set num_panel_rows [get_number_of_rows -name $panel_name]
for {set i 1} {$ < $num_panel_rows} {incr i}{
set summary_type [get_report_panel_data -name $panel_name \
-row $i -col_name Type]
if{[regexp {Clock Setup:(.*)}$summary_type match clk_name]}{
set num_failed_paths [get_report_panel_data -name $panel_name \
-row $i -col_name "Failed Paths"]
puts "Clock domain $clk_name has $num_failed_paths failing paths"
}
}
unload_report
project_close
Pop Quiz
-Print a Message Saying whether Project Meets Timing After Compilation
Assume Project is open
Hint:How many Paths Fail if Timing Is Met?
Pop Quiz Answer
#Assume project is open;don't forget to load the report load_report
if {0==[get_report_panel_data -name \
{Timing Analyzer||Timing Analyzer Summary} \
-row_name {Total number of failed paths} \
-col_name {Failed Paths}]}{
puts "Design meets timing"
}else{
puts "Design does not meets timing"
}
unload_report
::quartus::timing Package
-Compute and Report Timing Paths
Only Available in quartus_tan Executable
-Some Commonly Used Commands
create_timing_netlist
report_timing
delete_timing_netlist
Timing Netlist
-Timing Netlist Must Be Created before Reporting
-Use create_timing_netlist Command
-Options
Minimum Timing Analysis
Specify Speed Grade of Target Part
Specify Post-Synthesis Netlist
report_timing Command
-Computes and Reports Timing Paths on the Fly
Memory Efficient
Can Report Any Path in Design
includes Paths not in Timing Report Tables
-Examples
report_timing -tsu
report_timing -clock_setup -clock_filter clk
report_timing -tpd -npaths 5
::quartus::timing Example
-List Paths for All Failing Paths to Two Text Files
Clock Setup for Maximum Timing Analysis(Default)
Clock Hold for Minimum Timing Analysis
Example:
load_package timing
project_open fir_filter -revision filtref
create_timing_netlist
report_timing -clock_setup -src_clock_filter clk -clock_filter clkx2 \
-all_failures -file slow_corner_cross_domain_paths.txt
delete_timing_netlist
create_timing_netlist -fast_model
report_timing -clock_hold -src_clock_filter clk -clock_filter clkx2 \
-all_failures -file fast_corner_cross_domain_paths.txt
delete_timing_netlist
project_close
::quartus::timing_report Package
-List Timing Paths
Available in quartus_tan and GUI TCL Console
-One Command
list_path
-Reports Timing Paths in the Timing Analysis Report
Applies Only to Pre-computed Paths in Report
Paths not Shown Cannot Be Reported
-Similar Options as report_timing Command
Example:
list_path -from inst4 -to inst5* -stdout
Pop Quiz
-What Is the Different between These Two Commands?
report_timing
list_path
Pop Quiz Answer
-The list_path Command
Works Only for Paths in Timing Report Panels
-The report_timing Comand
Works for Any Path in Design Computes Reports Paths on the Fly
-Both Commands Have Similar Options
Conclusion
-Use Quartus II TCL API For Many Common Tasks
-Examples Demonstrate Common Uses
分享到:
相关推荐
FPGA - QuartusII 中文参考手册 FPGA - QuartusII 中文参考手册
FPGA教程--QuartusII入门指南FPGA教程-
1.FPGA核心板教材-QuartusII 12.0开发软件安装.zip
基于-QuartusII的数字时钟的设计.doc
小梅哥FPGA学习笔记之Quartus II 15.0中仿真DDR2 IP核.pdf
Altera quartusII开发过程,cpld及FPGA的结构,altera的ip工具
VHDL--QuartusII调用Modelsim进行仿真[汇编].pdf
FPGA密码锁程序,采用Quartus软件调试,VHDL语言编写,实现了密码的预设、更改、错误报警功能,密码的输入和确认来自4*4键盘
2-QuartusII软件使用指南和CPLD开发流程.pdf
专题3-Quartus-II-软件使用入门.ppt
FPGA资料该脚本可以使用运行将design.sv,fhw.sv,timing.tcl和run_fpga.tcl复制到新文件夹现在运行quartus_sh -t run_fpga.tcl -project(design_name)-board sockit design_name是不带.sv扩展名的Verilog设计的...
本手册针对的读者是QuartusII软件的初学者,它概述了可编程逻辑设计中QuartusII软件的功能。不过,本手册并不是详尽参考手册。相反,本手册只是一本指导书,它解释软件的功能以及显示这些功能如何帮助你进行FPGA和...
数电课程设计报告--quartus ll软件设计环境中利用一位全加d锁存器或者d触发器实现8位二进制加法器.docx数电课程设计报告--quartus ll软件设计环境中利用一位全加d锁存器或者d触发器实现8位二进制加法器.docx数电课程...
VHDL--Quartus-II调用Modelsim进行仿真设计.doc
如何学习FPGA verilog 学Quartus II+Verilog三步走
使用FPGA入门硬件DE2-115,开发环境为quartus,资料含指导步骤以及代码非常详细+高先生写的用fpga实现数字信号处理算法,写的很好,工程师写的比教师写的实在
matlab_Quartusii18平台下基于FPGA的PWM电机控制系统实现_源码
matlab_Quartusii18平台下基于FPGA的带死区的三相SPWM系统实现_源码
完美解释了QuartusII 如何利用 TCL 文本进行引脚的分配