bkfir_flp32_ts201.tcl

来自「本源程序是用于数字信号处理中32位的傅立叶变换的程序」· TCL 代码 · 共 47 行

TCL
47
字号
proc bkfir_flp32_TS201 { {target_name "TS201"} {test_name "test1"} } {
	set benchmark_name "bkfir_flp32_TS201"
	set outdata_name "output"
  set indata_name "input_matrix"

	puts [format "Testing %s (%s) on target: %s" $benchmark_name $test_name $target_name]


  # build the program
	catch { dspprojectclose }
  dspprojectload [format "%s.dpj" $benchmark_name]
	dspprojectbuild Debug -all -wait

	# run the program
  #load the executable
  dspload [format "debug\\%s.dxe" $benchmark_name]  -wait
	dsprun -wait
  puts "program was executed"

	set buf_size 200
	set fid [open "output.dat" w]
  puts $fid
	set memory [lindex [lindex [dspgetmeminfo] 0] 0]
	set outdata [dspgetmemblock $memory [dsplookupsymbol $outdata_name] $buf_size -format "Floating Point 32 bit"]

    set index 0
    while {$index < $buf_size} {
            set cur00 [lindex $outdata $index]
                set index [expr $index+1]

          puts  $fid [format "%f" $cur00]

  }



	close $fid





  puts "Done\n"

#	dspprojectclose
}

⌨️ 快捷键说明

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