No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GPIO_demo.tcl 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. proc start_step { step } {
  2. set stopFile ".stop.rst"
  3. if {[file isfile .stop.rst]} {
  4. puts ""
  5. puts "*** Halting run - EA reset detected ***"
  6. puts ""
  7. puts ""
  8. return -code error
  9. }
  10. set beginFile ".$step.begin.rst"
  11. set platform "$::tcl_platform(platform)"
  12. set user "$::tcl_platform(user)"
  13. set pid [pid]
  14. set host ""
  15. if { [string equal $platform unix] } {
  16. if { [info exist ::env(HOSTNAME)] } {
  17. set host $::env(HOSTNAME)
  18. }
  19. } else {
  20. if { [info exist ::env(COMPUTERNAME)] } {
  21. set host $::env(COMPUTERNAME)
  22. }
  23. }
  24. set ch [open $beginFile w]
  25. puts $ch "<?xml version=\"1.0\"?>"
  26. puts $ch "<ProcessHandle Version=\"1\" Minor=\"0\">"
  27. puts $ch " <Process Command=\".planAhead.\" Owner=\"$user\" Host=\"$host\" Pid=\"$pid\">"
  28. puts $ch " </Process>"
  29. puts $ch "</ProcessHandle>"
  30. close $ch
  31. }
  32. proc end_step { step } {
  33. set endFile ".$step.end.rst"
  34. set ch [open $endFile w]
  35. close $ch
  36. }
  37. proc step_failed { step } {
  38. set endFile ".$step.error.rst"
  39. set ch [open $endFile w]
  40. close $ch
  41. }
  42. set_msg_config -id {HDL 9-1061} -limit 100000
  43. set_msg_config -id {HDL 9-1654} -limit 100000
  44. start_step write_bitstream
  45. set ACTIVE_STEP write_bitstream
  46. set rc [catch {
  47. create_msg_db write_bitstream.pb
  48. open_checkpoint GPIO_demo_routed.dcp
  49. set_property webtalk.parent_dir C:/Users/Hp/Documents/Compteur8BitsBasys3/proj/GPIO.cache/wt [current_project]
  50. catch { write_mem_info -force GPIO_demo.mmi }
  51. write_bitstream -force -no_partial_bitfile GPIO_demo.bit
  52. catch { write_sysdef -hwdef GPIO_demo.hwdef -bitfile GPIO_demo.bit -meminfo GPIO_demo.mmi -file GPIO_demo.sysdef }
  53. catch {write_debug_probes -quiet -force debug_nets}
  54. close_msg_db -file write_bitstream.pb
  55. } RESULT]
  56. if {$rc} {
  57. step_failed write_bitstream
  58. return -code error $RESULT
  59. } else {
  60. end_step write_bitstream
  61. unset ACTIVE_STEP
  62. }