Advertisement
mwmwmw09

Untitled

Mar 2nd, 2020
729
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # set default hw_server connection
  2. set HW_SERVER localhost:3121
  3.  
  4. open_hw_manager
  5. if {[llength [get_hw_servers]] == 0 } then {
  6.   connect_hw_server -quiet -url $HW_SERVER
  7.   set disconnect_en 1
  8. }
  9.  
  10. # update list of targets
  11. refresh_hw_server -quiet
  12.  
  13. # close open targets
  14. foreach TARGET [get_hw_targets] {
  15.   if { [get_property IS_OPENED $TARGET] } then {
  16.     close_hw_target -quiet $TARGET
  17.   }
  18. }
  19.  
  20. # loop for all open targets and get DNA values for all programmable FPGAs
  21. foreach TARGET [get_hw_targets] {
  22.   open_hw_target -quiet $TARGET
  23.   refresh_hw_target -quiet $TARGET
  24.   foreach DEVICE [get_hw_devices] {
  25.     refresh_hw_device -quiet $DEVICE
  26.     if { [get_property PROGRAM.IS_SUPPORTED $DEVICE] } then {
  27.       set DNA_HEX [get_property PROGRAM.HW_BITSTREAM $DEVICE]
  28.       puts "FPGA Bitstream: $TARGET=>$DEVICE =$DNA_HEX"
  29.     }
  30.   }
  31.   close_hw_target -quiet $TARGET
  32. }
  33.  
  34.  
  35. if {$disconnect_en == 1 } {
  36.   disconnect_hw_server -quiet
  37. }
Advertisement
RAW Paste Data Copied
Advertisement