⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mg8lh_resc.tcl

📁 实现简单CPU功能的源码
💻 TCL
字号:
load_package report
project_open mg8lh
load_report
set report_panel_name	"Analysis & Synthesis Resource Usage Summary"
set rsc_file 	[open mg8lh.rsc w]

foreach panel_name [get_report_panel_names] {
	if { [string match "*$report_panel_name*" "$panel_name"] } {
		set header_row [get_report_panel_row $panel_name -row 0]
		for { set row 1 } { $row < [get_number_of_rows $panel_name] } { incr row } {
			set row_data [get_report_panel_row $panel_name -row $row]
			for { set col 0 } { $col < [llength $row_data] } {incr col } {
				set field [lindex $row_data $col]
				incr col
				set actual_value [lindex $row_data $col]
				if { $actual_value > 0 } {
					if { [string compare $field "Total DLLs"] == 0 } {
						puts $rsc_file "$actual_value DLL"
					}
					if { [string compare $field "Total PLLs"] == 0 } {
						puts $rsc_file "$actual_value PLL"
					}
					if { [string compare $field "Total memory bits"] == 0 } {
						puts $rsc_file "$actual_value ram_bits"
					}
					if { [string compare $field "SERDES transmitters"] == 0 } {
						puts $rsc_file "$actual_value SERDES TX"
					}
					if { [string compare $field "SERDES receivers"] == 0 } {
						puts $rsc_file "$actual_value SERDES RX"
					}
					if { [string compare $field "DSP block 18-bit elements"] == 0 } {
						puts $rsc_file "$actual_value dsp_18bit"
					}
					if { [string compare $field "DSP block 9-bit elements"] == 0 } {
						puts $rsc_file "$actual_value dsp_9bit"
					}
					if { [string compare $field "Total logic elements"] == 0 } {
						puts $rsc_file "$actual_value lut"
					}
				}
			}
		}
	}
}

unload_report
project_close

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -