#!/usr/local/bin/perl ## ## xor ## ## Usage: xor_high ## Example xor_high eac1 xori.dat xoro.dat 200 ## returns two 200x200 files with current values - 1 for lla input, 1 for lla output ## ## ## bhimebau 9/9/04 - script creation if (@ARGV != 4) { print "\nUSAGE: xor_high \n"; print "EXAMPLE: xor_high eac1 xori.dat xoro.dat 200\n"; print "returns two 200x200 files with samples (mA) - 1 for lla input, 1 for lla output\n\n"; exit; } $eac=shift; $lla_input=shift; $lla_output=shift; $steps=shift; $max_current = .5; $lla_func=0; open (LLA_IN,">$lla_input") || die "Could not open lla data file -> $lla_input\n"; open (LLA_OUT,">$lla_output") || die "Could not open lla data file -> $lla_output\n"; $step_size = $max_current/$steps; print"Using $max_current mA as logic 1 for $eac\n"; $row=0; $col=0; `./write_lla_function $eac $lla_func 18`; `./write_lla_function $eac 1 3`; while ($col<=$max_current) { `./write_dac_current $eac 1 $col`; while ($row<=$max_current) { `./write_dac_current $eac 0 $row`; $row+=$step_size; $samples=`./report_lla_current $eac $lla_func`; $_=$samples; @currents=split(/ /); print LLA_IN "$currents[0] "; $samples=`./report_lla_current $eac 1`; $_=$samples; @currents=split(/ /); print LLA_OUT "$currents[0] "; } print LLA_IN "\n"; print LLA_OUT "\n"; $row=0; $col+=$step_size; } close (LLA_IN); close (LLA_OUT);