normal_acq.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #! /bin/bash
  2. export PCILIB_MODEL=ipedma
  3. #!/bin/sh
  4. # A POSIX variable
  5. OPTIND=1 # Reset in case getopts has been used previously in the shell.
  6. # Initialize our own variables:
  7. output_file="temp.bin"
  8. while getopts "f:" opt; do
  9. case "$opt" in
  10. f) output_file=$OPTARG
  11. ;;
  12. esac
  13. done
  14. shift $((OPTIND-1))
  15. [ "$1" = "--" ] && shift
  16. echo "output_file='$output_file'"
  17. rm $output_file
  18. echo "Number of acquisitions to acquire (Slow Trig.)= 1"
  19. pci -w 0x9024 0x1
  20. sleep 0.001
  21. echo "Number of acquisitions to skip (Slow Trig.)= 0"
  22. pci -w 0x902C 0x0
  23. sleep 0.1
  24. #./tx_trig_adcs.sh #!/bin/sh
  25. #sleep 0.1
  26. #echo "Number of frame to acquire (Fast Trig.)= 1024"
  27. #pci -w 0x9020 0x800
  28. #sleep 0.0001
  29. echo "reset TOP/BOTTOM"
  30. pci -w 0x904C 0x2
  31. sleep 0.001
  32. pci -w 0x904C 0x0
  33. sleep 0.001
  34. pci -w 0x9024 0x0
  35. sleep 0.001
  36. echo "ADD Reset DDR"
  37. #pci -w 0x9040 0x10210F50 # was 0x10210F40
  38. pci -w 0x9040 0x10210F50
  39. sleep 0.01
  40. pci -w 0x9040 0x10210F00
  41. sleep 0.01
  42. echo "Start Normal acquisition + ENABLE Readout to DDR + HEADER"
  43. pci -w 0x9040 0x1021FF00
  44. sleep 0.5
  45. #./status.sh
  46. echo "IDLE"
  47. pci -w 0x9040 0x10210F00
  48. sleep 0.5
  49. #./status.sh
  50. echo $output_file
  51. echo "*DMA: Reading data..."
  52. pci -r dma0 --multipacket -o $output_file --timeout=1000000
  53. #pci -r dma0 --multipacket -o test_data.out --timeout=1000000
  54. #./status.sh
  55. #./dumpFile.sh bench.out