2
0

pins.tcl 528 B

1234567891011121314151617
  1. # Read all .pins files in the project and create pin assignments
  2. set source_file_coll [get_all_global_assignments -name SOURCE_FILE]
  3. foreach_in_collection file_asgn $source_file_coll {
  4. set file [lindex $file_asgn 2]
  5. if {[string match -nocase *.pins $file]} {
  6. set fd [open $file RDONLY]
  7. while {[gets $fd line] >= 0} {
  8. set pin [string toupper [lindex $line 0]]
  9. set signal [lindex $line 1]
  10. if {[string match {[0-9A-Z]*} $pin]} {
  11. set_location_assignment PIN_$pin -to $signal
  12. }
  13. }
  14. close $fd
  15. }
  16. }