fft_256_ts201.tcl

来自「TigerSharc TS201 32-bit floating point F」· TCL 代码 · 共 48 行

TCL
48
字号
proc fft_256_TS201 { {target_name "TS201"} {test_name "test1"} } {

  cd "..\\"
	set benchmark_name "fft_fxp16_TS201"
	set outdata_name "int_buff"

	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
  dspwaitforhalt
  puts "program was executed"

	set buf_size 256
	set fid [open outputs\\outdata_256.dat w]
  puts $fid
	set memory [lindex [lindex [dspgetmeminfo] 0] 0]
	set outdata [dspgetmemblock $memory [dsplookupsymbol $outdata_name] $buf_size -format Hexadecimal]

  set index 0
  while {$index < $buf_size} {
    set cur [lindex $outdata $index]
    set cur [format "0x%08x" $cur]

    set msb [string range $cur 2 5]
    set lsb [string range $cur 6 9]

    puts $fid $lsb
    puts $fid $msb

    set index [expr $index+1]
  }


	close $fid
  cd "tcl_TS201"
  puts "Done\n"

#	dspprojectclose
}

⌨️ 快捷键说明

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