2020-05-06 06:05:23 +02:00
|
|
|
# Copyright (C) 2017-2020 The Project X-Ray Authors
|
|
|
|
|
#
|
|
|
|
|
# Use of this source code is governed by a ISC-style
|
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
|
# https://opensource.org/licenses/ISC
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: ISC
|
2018-12-19 05:03:28 +01:00
|
|
|
proc route_via { net nodes {assert 1} } {
|
2018-12-06 00:21:58 +01:00
|
|
|
# Route a simple source to dest net via one or more intermediate nodes
|
|
|
|
|
# the nodes do not have have to be directly reachable from each other
|
|
|
|
|
# net: net name string
|
|
|
|
|
# nodes: list of node or wires strings?
|
|
|
|
|
# Returns 1 on success (previously would silently failed with antenna nets)
|
|
|
|
|
|
2018-12-06 01:52:20 +01:00
|
|
|
set net [get_nets $net]
|
|
|
|
|
# fixed_route: list of nodes in the full route
|
|
|
|
|
# Begins at implicit node
|
|
|
|
|
set fixed_route [get_nodes -of_objects [get_site_pins -filter {DIRECTION == OUT} -of_objects $net]]
|
|
|
|
|
# Implicit end node. Route it at the end
|
|
|
|
|
lappend nodes [get_nodes -of_objects [get_site_pins -filter {DIRECTION == IN} -of_objects $net]]
|
2017-11-11 01:26:05 +01:00
|
|
|
|
2018-12-06 01:52:20 +01:00
|
|
|
puts "Routing net $net:"
|
2017-11-11 02:33:02 +01:00
|
|
|
|
2018-12-06 01:52:20 +01:00
|
|
|
foreach to_node $nodes {
|
|
|
|
|
# convert wire string to node object
|
|
|
|
|
set to_node [get_nodes -of_objects [get_wires $to_node]]
|
|
|
|
|
# Start at the last point
|
|
|
|
|
set from_node [lindex $fixed_route end]
|
|
|
|
|
# Make vivado do the hard work
|
2018-12-19 05:03:28 +01:00
|
|
|
puts " set route \[find_routing_path -quiet -from $from_node -to $to_node\]"
|
2018-12-06 01:52:20 +01:00
|
|
|
set route [find_routing_path -quiet -from $from_node -to $to_node]
|
|
|
|
|
# TODO: check for this
|
|
|
|
|
if {$route == ""} {
|
|
|
|
|
# This can also happen if you try to route to a node already in the route
|
|
|
|
|
if { [ lsearch $route $to_node ] >= 0 } {
|
2018-12-19 05:03:28 +01:00
|
|
|
puts " WARNING: route_via loop. $to_node is already in the path, ignoring"
|
2018-12-06 01:52:20 +01:00
|
|
|
} else {
|
|
|
|
|
puts " $from_node -> $to_node: no route found - assuming direct PIP"
|
|
|
|
|
lappend fixed_route $to_node
|
|
|
|
|
}
|
|
|
|
|
} {
|
|
|
|
|
puts " $from_node -> $to_node: $route"
|
|
|
|
|
set fixed_route [concat $fixed_route [lrange $route 1 end]]
|
|
|
|
|
}
|
|
|
|
|
set_property -quiet FIXED_ROUTE $fixed_route $net
|
|
|
|
|
}
|
2017-11-11 01:26:05 +01:00
|
|
|
|
2018-12-06 00:21:58 +01:00
|
|
|
# Earlier check should catch this now
|
|
|
|
|
set status [get_property ROUTE_STATUS $net]
|
|
|
|
|
if { $status != "ROUTED" } {
|
2018-12-19 05:03:28 +01:00
|
|
|
puts " Failed to route net $net, status $status, route: $fixed_route"
|
|
|
|
|
if { $assert } {
|
|
|
|
|
error "Failed to route net"
|
|
|
|
|
}
|
|
|
|
|
return 0
|
2018-12-06 00:21:58 +01:00
|
|
|
}
|
|
|
|
|
|
2018-12-06 01:52:20 +01:00
|
|
|
set_property -quiet FIXED_ROUTE $fixed_route $net
|
|
|
|
|
puts ""
|
2018-12-06 00:21:58 +01:00
|
|
|
return 1
|
2017-11-10 21:07:20 +01:00
|
|
|
}
|
|
|
|
|
|
2017-11-13 23:05:49 +01:00
|
|
|
proc tile_wire_pairs {tile1 tile2} {
|
2018-12-06 01:52:20 +01:00
|
|
|
set tile1 [get_tiles $tile1]
|
|
|
|
|
set tile2 [get_tiles $tile2]
|
2017-11-13 23:05:49 +01:00
|
|
|
|
2018-12-06 01:52:20 +01:00
|
|
|
foreach wire1 [lsort [get_wires -of_objects $tile1]] {
|
|
|
|
|
set wire2 [get_wires -quiet -filter "TILE_NAME == $tile2" -of_objects [get_nodes -quiet -of_objects $wire1]]
|
|
|
|
|
if {$wire2 != ""} {puts "$wire1 $wire2"}
|
|
|
|
|
}
|
2017-11-13 23:05:49 +01:00
|
|
|
}
|
|
|
|
|
|
2017-11-11 07:37:02 +01:00
|
|
|
proc randsample_list {num lst} {
|
2018-12-06 01:52:20 +01:00
|
|
|
set rlst {}
|
|
|
|
|
for {set i 0} {$i<$num} {incr i} {
|
|
|
|
|
set j [expr {int(rand()*[llength $lst])}]
|
|
|
|
|
lappend rlst [lindex $lst $j]
|
|
|
|
|
set lst [lreplace $lst $j $j]
|
|
|
|
|
}
|
|
|
|
|
return $rlst
|
2017-11-11 07:37:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
proc randplace_pblock {num pblock} {
|
2018-12-06 01:52:20 +01:00
|
|
|
set sites [randsample_list $num [get_sites -filter {SITE_TYPE == SLICEL || SITE_TYPE == SLICEM} -of_objects [get_pblocks $pblock]]]
|
|
|
|
|
set cells [randsample_list $num [get_cells -hierarchical -filter "PBLOCK == [get_pblocks $pblock] && REF_NAME == LUT6"]]
|
|
|
|
|
for {set i 0} {$i<$num} {incr i} {
|
|
|
|
|
set site [lindex $sites $i]
|
|
|
|
|
set cell [lindex $cells $i]
|
|
|
|
|
set_property LOC $site $cell
|
|
|
|
|
}
|
2017-11-11 07:37:02 +01:00
|
|
|
}
|
|
|
|
|
|
2017-12-24 19:39:23 +01:00
|
|
|
proc roi_tiles {} {
|
|
|
|
|
return [get_tiles -filter "GRID_POINT_X >= $::env(XRAY_ROI_GRID_X1) && \
|
|
|
|
|
GRID_POINT_X < $::env(XRAY_ROI_GRID_X2) && \
|
|
|
|
|
GRID_POINT_Y >= $::env(XRAY_ROI_GRID_Y1) && \
|
2018-12-06 01:52:20 +01:00
|
|
|
GRID_POINT_Y < $::env(XRAY_ROI_GRID_Y2)"]
|
2017-12-24 19:39:23 +01:00
|
|
|
}
|
|
|
|
|
|
2017-11-14 01:55:24 +01:00
|
|
|
proc pblock_tiles {pblock} {
|
2018-12-06 01:52:20 +01:00
|
|
|
set clb_tiles [get_tiles -of_objects [get_sites -of_objects [get_pblocks $pblock]]]
|
|
|
|
|
set int_tiles [get_tiles [regsub -all {CLBL[LM]} $clb_tiles INT]]
|
|
|
|
|
return [get_tiles "$clb_tiles $int_tiles"]
|
2017-11-14 01:55:24 +01:00
|
|
|
}
|
|
|
|
|
|
2019-04-01 21:11:36 +02:00
|
|
|
# returns list of unique tile types
|
|
|
|
|
proc get_tile_types {} {
|
|
|
|
|
set all_tiles [get_tiles]
|
|
|
|
|
set types {}
|
|
|
|
|
foreach tile $all_tiles {
|
|
|
|
|
set type [get_property TYPE $tile]
|
|
|
|
|
#ignore empty tiles
|
|
|
|
|
if {$type == "NULL"} { continue }
|
|
|
|
|
if {[lsearch -exact $types $type] == -1} {lappend types $type}
|
|
|
|
|
}
|
|
|
|
|
return $types
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-14 04:43:57 +01:00
|
|
|
proc lintersect {lst1 lst2} {
|
2018-12-06 01:52:20 +01:00
|
|
|
set rlst {}
|
|
|
|
|
foreach el $lst1 {
|
|
|
|
|
set idx [lsearch $lst2 $el]
|
|
|
|
|
if {$idx >= 0} {lappend rlst $el}
|
|
|
|
|
}
|
|
|
|
|
return $rlst
|
2017-11-14 04:43:57 +01:00
|
|
|
}
|
|
|
|
|
|
2017-11-10 21:07:20 +01:00
|
|
|
proc putl {lst} {
|
2018-12-06 01:52:20 +01:00
|
|
|
foreach line $lst {puts $line}
|
2017-11-10 21:07:20 +01:00
|
|
|
}
|
2019-02-05 02:45:05 +01:00
|
|
|
|
|
|
|
|
proc write_pip_txtdata {filename} {
|
virtex7: HP-bank glue codified end-to-end + open-flow validation
The open-flow (Yosys → nextpnr-xilinx → FASM → bitstream) now produces
silicon-functional bits on VC707 xc7vx485tffg1761-2 for:
- rst_to_led (IBUF↔OBUF passthrough)
- counter_skewfree (button-clocked 8b counter, general routing)
- counter_sw_bufr (button → BUFR → 8b counter)
- counter_bufr (200 MHz LVDS sysclk → IBUFDS → BUFR → 8b counter)
- counter_2bufg (2× BUFGCTRL on the same source)
- vc707_telegraph (125 MHz crystal → IBUFDS_GTE2 → BUFG → UART smoke test)
- vc707_picosoc (picorv32 + simpleuart + BRAM @ 125 MHz; UART prints
'PicoSoC alive on VC707 @ 125 MHz' on /dev/ttyUSB0)
Highlights of this drop:
utils/fasm2frames.py (+223 net):
- Bank-glue auto-injection for HP-bank IOB18 — IBUF/OBUF (Y0+Y1) +
IBUFDS differential pair. Fires off the FASM-level direction
heuristic (.IN/.IN_ONLY/IBUFDISABLE for IBUF, .DRIVE. for OBUF,
.IN_DIFF for IBUFDS; .SLEW. is unreliable as a marker — gets emitted
on default-state IOBs too).
- INT_L_X32Y49 DCI cascade / bank-active markers when any LIOB18_X81
Y1 OBUF is present.
- PUDC_B emission rewritten for HP-bank IOSTANDARDs (10 features
cover Y0 + Y1 default-state; all 9 historic 'PUDC_B glue' bits
flow naturally from the existing IOSTANDARD segbits).
- HCLK_L per-BUFRCLK-channel 'active' marker — currently codified
for BUFRCLK3 (the channel exercised by counter_sw_bufr).
- GFAN T-tie root glue — INT_L_X62Y(N+10).GFAN_TIE_ROOT_GLUE when
INT_L_X62Y(N).GFAN0.GND_WIRE appears (OBUF.T → GND routing).
- PUDC_B tile excluded from the bank-glue walk (its IN features are
virtual; injecting OBUF_HP_BANK_GLUE on it produces spurious bits).
utils/utils.tcl (+47):
- write_pip_txtdata bulk-fetch — replaces per-net foreach pip with
bulk get_pips + bulk get_property IS_DIRECTIONAL + cached
dst_wire_to_num_pips. ~4× speed-up on xc7vx485t (per-spec time on
041-clk-hrow-pips / 045-hclk-cmt-pips drops from ~1.5 h to ~25 min).
utils/mergedb.sh (+15):
- LIOI / LIOI_TBYTESRC / LIOI_TBYTETERM / LIOB18 / mask_liob18 sed
rewrites for the L-side IOI/IOB18 tiles on HP-only parts (xc7vx485t
uses left-side IOB18 too; upstream kintex7 mergedb only knew the
right side).
11 fuzzers patched for virtex7 readiness:
- 030-iob18 Makefile: split DB target for virtex7 (HP-only); the BUFR
HP-bank results come from the actual fuzzer rather than HR-side sed.
- 037-iob18-pips: L-side mirror tiles (LIOI / LIOI_TBYTESRC /
LIOI_TBYTETERM) added to segdata glob; *_SING tiles excluded;
EXCLUDE_RE updated for L-side prefixes.
- 039-hclk-config: split virtex7 vs kintex7 (HCLK_IOI vs HCLK_IOI3);
XRAY_IOSTANDARD env var; IOB18M/IOB33M alternation.
- 047a-hclk-idelayctrl-pips: accepts both HCLK_IOI and HCLK_IOI3.
- 041, 045, 034, 034b, 043, 044, 046: removed local
write_pip_txtdata override that shadowed the patched utils.tcl
bulk-fetch (was re-introducing the slow per-net Tcl path).
README.md (+86):
- 'Virtex-7 Port Status (virtex7-support branch)' section —
achievements, goals, work-in-progress, constraints.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:13:53 +02:00
|
|
|
# Output format (unchanged): TILE PIP SRC_WIRE DST_WIRE NUM_PIPS DIR
|
|
|
|
|
# TILE e.g. INT_R_X107Y144
|
|
|
|
|
# PIP e.g. INT_R_X107Y144/INT_R.GND_WIRE->>GFAN1
|
|
|
|
|
# SRC_WIRE e.g. INT_R_X107Y144/GND_WIRE
|
|
|
|
|
# DST_WIRE e.g. INT_R_X107Y144/GFAN1
|
|
|
|
|
# NUM_PIPS count of input pips at dst node (used by int_generate.py
|
|
|
|
|
# to skip trivial fan-ins via 'pnum == 1' filter)
|
|
|
|
|
# DIR IS_DIRECTIONAL bool (1 = directional, 0 = bidirectional)
|
|
|
|
|
#
|
|
|
|
|
# The kintex7-era implementation iterated foreach net foreach pip and
|
|
|
|
|
# called get_tiles/get_wires/get_nodes once per pip — fine on small parts
|
|
|
|
|
# but on virtex7 xc7vx485tffg1761 (~12M pips across 1320 nets) that's
|
|
|
|
|
# 1-2 h of Tcl overhead per specimen, with most of it spent rediscovering
|
|
|
|
|
# information the pip name already encodes. Optimisations:
|
|
|
|
|
# 1) Bulk-fetch all pips with one get_pips call.
|
|
|
|
|
# 2) Bulk-fetch IS_DIRECTIONAL as a list.
|
|
|
|
|
# 3) Parse tile/src/dst names directly from the pip name (saves
|
|
|
|
|
# 3*N Tcl object queries; format is "TILE/TILE_TYPE.SRC->{>}DST").
|
|
|
|
|
# 4) Cache num_pips per dst_wire string — same dst is reused by many
|
|
|
|
|
# pips so its node-fanin only needs computing once.
|
|
|
|
|
# Output format and content are bit-identical to the old implementation
|
|
|
|
|
# on parseable pip names; un-parseable pips (none seen on virtex7 so far)
|
|
|
|
|
# fall through to the original per-pip query path.
|
2019-02-05 02:45:05 +01:00
|
|
|
puts "FUZ([pwd]): Writing $filename."
|
|
|
|
|
set fp [open $filename w]
|
virtex7: HP-bank glue codified end-to-end + open-flow validation
The open-flow (Yosys → nextpnr-xilinx → FASM → bitstream) now produces
silicon-functional bits on VC707 xc7vx485tffg1761-2 for:
- rst_to_led (IBUF↔OBUF passthrough)
- counter_skewfree (button-clocked 8b counter, general routing)
- counter_sw_bufr (button → BUFR → 8b counter)
- counter_bufr (200 MHz LVDS sysclk → IBUFDS → BUFR → 8b counter)
- counter_2bufg (2× BUFGCTRL on the same source)
- vc707_telegraph (125 MHz crystal → IBUFDS_GTE2 → BUFG → UART smoke test)
- vc707_picosoc (picorv32 + simpleuart + BRAM @ 125 MHz; UART prints
'PicoSoC alive on VC707 @ 125 MHz' on /dev/ttyUSB0)
Highlights of this drop:
utils/fasm2frames.py (+223 net):
- Bank-glue auto-injection for HP-bank IOB18 — IBUF/OBUF (Y0+Y1) +
IBUFDS differential pair. Fires off the FASM-level direction
heuristic (.IN/.IN_ONLY/IBUFDISABLE for IBUF, .DRIVE. for OBUF,
.IN_DIFF for IBUFDS; .SLEW. is unreliable as a marker — gets emitted
on default-state IOBs too).
- INT_L_X32Y49 DCI cascade / bank-active markers when any LIOB18_X81
Y1 OBUF is present.
- PUDC_B emission rewritten for HP-bank IOSTANDARDs (10 features
cover Y0 + Y1 default-state; all 9 historic 'PUDC_B glue' bits
flow naturally from the existing IOSTANDARD segbits).
- HCLK_L per-BUFRCLK-channel 'active' marker — currently codified
for BUFRCLK3 (the channel exercised by counter_sw_bufr).
- GFAN T-tie root glue — INT_L_X62Y(N+10).GFAN_TIE_ROOT_GLUE when
INT_L_X62Y(N).GFAN0.GND_WIRE appears (OBUF.T → GND routing).
- PUDC_B tile excluded from the bank-glue walk (its IN features are
virtual; injecting OBUF_HP_BANK_GLUE on it produces spurious bits).
utils/utils.tcl (+47):
- write_pip_txtdata bulk-fetch — replaces per-net foreach pip with
bulk get_pips + bulk get_property IS_DIRECTIONAL + cached
dst_wire_to_num_pips. ~4× speed-up on xc7vx485t (per-spec time on
041-clk-hrow-pips / 045-hclk-cmt-pips drops from ~1.5 h to ~25 min).
utils/mergedb.sh (+15):
- LIOI / LIOI_TBYTESRC / LIOI_TBYTETERM / LIOB18 / mask_liob18 sed
rewrites for the L-side IOI/IOB18 tiles on HP-only parts (xc7vx485t
uses left-side IOB18 too; upstream kintex7 mergedb only knew the
right side).
11 fuzzers patched for virtex7 readiness:
- 030-iob18 Makefile: split DB target for virtex7 (HP-only); the BUFR
HP-bank results come from the actual fuzzer rather than HR-side sed.
- 037-iob18-pips: L-side mirror tiles (LIOI / LIOI_TBYTESRC /
LIOI_TBYTETERM) added to segdata glob; *_SING tiles excluded;
EXCLUDE_RE updated for L-side prefixes.
- 039-hclk-config: split virtex7 vs kintex7 (HCLK_IOI vs HCLK_IOI3);
XRAY_IOSTANDARD env var; IOB18M/IOB33M alternation.
- 047a-hclk-idelayctrl-pips: accepts both HCLK_IOI and HCLK_IOI3.
- 041, 045, 034, 034b, 043, 044, 046: removed local
write_pip_txtdata override that shadowed the patched utils.tcl
bulk-fetch (was re-introducing the slow per-net Tcl path).
README.md (+86):
- 'Virtex-7 Port Status (virtex7-support branch)' section —
achievements, goals, work-in-progress, constraints.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:13:53 +02:00
|
|
|
set all_pips [get_pips -of_objects [get_nets -hierarchical]]
|
|
|
|
|
set npips [llength $all_pips]
|
|
|
|
|
puts "FUZ([pwd]): bulk-fetched $npips pips, fetching IS_DIRECTIONAL..."
|
|
|
|
|
set dir_props [get_property IS_DIRECTIONAL $all_pips]
|
|
|
|
|
puts "FUZ([pwd]): writing rows..."
|
|
|
|
|
array set dst_wire_to_num_pips {}
|
|
|
|
|
set i 0
|
|
|
|
|
foreach pip $all_pips dir_prop $dir_props {
|
|
|
|
|
incr i
|
|
|
|
|
if {($i % 100000) == 0 } {
|
|
|
|
|
puts "FUZ([pwd]): pip $i / $npips"
|
2019-02-05 02:45:05 +01:00
|
|
|
}
|
virtex7: HP-bank glue codified end-to-end + open-flow validation
The open-flow (Yosys → nextpnr-xilinx → FASM → bitstream) now produces
silicon-functional bits on VC707 xc7vx485tffg1761-2 for:
- rst_to_led (IBUF↔OBUF passthrough)
- counter_skewfree (button-clocked 8b counter, general routing)
- counter_sw_bufr (button → BUFR → 8b counter)
- counter_bufr (200 MHz LVDS sysclk → IBUFDS → BUFR → 8b counter)
- counter_2bufg (2× BUFGCTRL on the same source)
- vc707_telegraph (125 MHz crystal → IBUFDS_GTE2 → BUFG → UART smoke test)
- vc707_picosoc (picorv32 + simpleuart + BRAM @ 125 MHz; UART prints
'PicoSoC alive on VC707 @ 125 MHz' on /dev/ttyUSB0)
Highlights of this drop:
utils/fasm2frames.py (+223 net):
- Bank-glue auto-injection for HP-bank IOB18 — IBUF/OBUF (Y0+Y1) +
IBUFDS differential pair. Fires off the FASM-level direction
heuristic (.IN/.IN_ONLY/IBUFDISABLE for IBUF, .DRIVE. for OBUF,
.IN_DIFF for IBUFDS; .SLEW. is unreliable as a marker — gets emitted
on default-state IOBs too).
- INT_L_X32Y49 DCI cascade / bank-active markers when any LIOB18_X81
Y1 OBUF is present.
- PUDC_B emission rewritten for HP-bank IOSTANDARDs (10 features
cover Y0 + Y1 default-state; all 9 historic 'PUDC_B glue' bits
flow naturally from the existing IOSTANDARD segbits).
- HCLK_L per-BUFRCLK-channel 'active' marker — currently codified
for BUFRCLK3 (the channel exercised by counter_sw_bufr).
- GFAN T-tie root glue — INT_L_X62Y(N+10).GFAN_TIE_ROOT_GLUE when
INT_L_X62Y(N).GFAN0.GND_WIRE appears (OBUF.T → GND routing).
- PUDC_B tile excluded from the bank-glue walk (its IN features are
virtual; injecting OBUF_HP_BANK_GLUE on it produces spurious bits).
utils/utils.tcl (+47):
- write_pip_txtdata bulk-fetch — replaces per-net foreach pip with
bulk get_pips + bulk get_property IS_DIRECTIONAL + cached
dst_wire_to_num_pips. ~4× speed-up on xc7vx485t (per-spec time on
041-clk-hrow-pips / 045-hclk-cmt-pips drops from ~1.5 h to ~25 min).
utils/mergedb.sh (+15):
- LIOI / LIOI_TBYTESRC / LIOI_TBYTETERM / LIOB18 / mask_liob18 sed
rewrites for the L-side IOI/IOB18 tiles on HP-only parts (xc7vx485t
uses left-side IOB18 too; upstream kintex7 mergedb only knew the
right side).
11 fuzzers patched for virtex7 readiness:
- 030-iob18 Makefile: split DB target for virtex7 (HP-only); the BUFR
HP-bank results come from the actual fuzzer rather than HR-side sed.
- 037-iob18-pips: L-side mirror tiles (LIOI / LIOI_TBYTESRC /
LIOI_TBYTETERM) added to segdata glob; *_SING tiles excluded;
EXCLUDE_RE updated for L-side prefixes.
- 039-hclk-config: split virtex7 vs kintex7 (HCLK_IOI vs HCLK_IOI3);
XRAY_IOSTANDARD env var; IOB18M/IOB33M alternation.
- 047a-hclk-idelayctrl-pips: accepts both HCLK_IOI and HCLK_IOI3.
- 041, 045, 034, 034b, 043, 044, 046: removed local
write_pip_txtdata override that shadowed the patched utils.tcl
bulk-fetch (was re-introducing the slow per-net Tcl path).
README.md (+86):
- 'Virtex-7 Port Status (virtex7-support branch)' section —
achievements, goals, work-in-progress, constraints.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:13:53 +02:00
|
|
|
if {[regexp {^([^/]+)/[^.]+\.(.+?)->>?(.+)$} $pip _ tile src_name dst_name]} {
|
|
|
|
|
set src_wire "$tile/$src_name"
|
|
|
|
|
set dst_wire "$tile/$dst_name"
|
|
|
|
|
} else {
|
|
|
|
|
# Fallback for unexpected pip-name formats: slow per-pip query.
|
2019-02-05 02:45:05 +01:00
|
|
|
set tile [get_tiles -of_objects $pip]
|
|
|
|
|
set src_wire [get_wires -uphill -of_objects $pip]
|
|
|
|
|
set dst_wire [get_wires -downhill -of_objects $pip]
|
|
|
|
|
}
|
virtex7: HP-bank glue codified end-to-end + open-flow validation
The open-flow (Yosys → nextpnr-xilinx → FASM → bitstream) now produces
silicon-functional bits on VC707 xc7vx485tffg1761-2 for:
- rst_to_led (IBUF↔OBUF passthrough)
- counter_skewfree (button-clocked 8b counter, general routing)
- counter_sw_bufr (button → BUFR → 8b counter)
- counter_bufr (200 MHz LVDS sysclk → IBUFDS → BUFR → 8b counter)
- counter_2bufg (2× BUFGCTRL on the same source)
- vc707_telegraph (125 MHz crystal → IBUFDS_GTE2 → BUFG → UART smoke test)
- vc707_picosoc (picorv32 + simpleuart + BRAM @ 125 MHz; UART prints
'PicoSoC alive on VC707 @ 125 MHz' on /dev/ttyUSB0)
Highlights of this drop:
utils/fasm2frames.py (+223 net):
- Bank-glue auto-injection for HP-bank IOB18 — IBUF/OBUF (Y0+Y1) +
IBUFDS differential pair. Fires off the FASM-level direction
heuristic (.IN/.IN_ONLY/IBUFDISABLE for IBUF, .DRIVE. for OBUF,
.IN_DIFF for IBUFDS; .SLEW. is unreliable as a marker — gets emitted
on default-state IOBs too).
- INT_L_X32Y49 DCI cascade / bank-active markers when any LIOB18_X81
Y1 OBUF is present.
- PUDC_B emission rewritten for HP-bank IOSTANDARDs (10 features
cover Y0 + Y1 default-state; all 9 historic 'PUDC_B glue' bits
flow naturally from the existing IOSTANDARD segbits).
- HCLK_L per-BUFRCLK-channel 'active' marker — currently codified
for BUFRCLK3 (the channel exercised by counter_sw_bufr).
- GFAN T-tie root glue — INT_L_X62Y(N+10).GFAN_TIE_ROOT_GLUE when
INT_L_X62Y(N).GFAN0.GND_WIRE appears (OBUF.T → GND routing).
- PUDC_B tile excluded from the bank-glue walk (its IN features are
virtual; injecting OBUF_HP_BANK_GLUE on it produces spurious bits).
utils/utils.tcl (+47):
- write_pip_txtdata bulk-fetch — replaces per-net foreach pip with
bulk get_pips + bulk get_property IS_DIRECTIONAL + cached
dst_wire_to_num_pips. ~4× speed-up on xc7vx485t (per-spec time on
041-clk-hrow-pips / 045-hclk-cmt-pips drops from ~1.5 h to ~25 min).
utils/mergedb.sh (+15):
- LIOI / LIOI_TBYTESRC / LIOI_TBYTETERM / LIOB18 / mask_liob18 sed
rewrites for the L-side IOI/IOB18 tiles on HP-only parts (xc7vx485t
uses left-side IOB18 too; upstream kintex7 mergedb only knew the
right side).
11 fuzzers patched for virtex7 readiness:
- 030-iob18 Makefile: split DB target for virtex7 (HP-only); the BUFR
HP-bank results come from the actual fuzzer rather than HR-side sed.
- 037-iob18-pips: L-side mirror tiles (LIOI / LIOI_TBYTESRC /
LIOI_TBYTETERM) added to segdata glob; *_SING tiles excluded;
EXCLUDE_RE updated for L-side prefixes.
- 039-hclk-config: split virtex7 vs kintex7 (HCLK_IOI vs HCLK_IOI3);
XRAY_IOSTANDARD env var; IOB18M/IOB33M alternation.
- 047a-hclk-idelayctrl-pips: accepts both HCLK_IOI and HCLK_IOI3.
- 041, 045, 034, 034b, 043, 044, 046: removed local
write_pip_txtdata override that shadowed the patched utils.tcl
bulk-fetch (was re-introducing the slow per-net Tcl path).
README.md (+86):
- 'Virtex-7 Port Status (virtex7-support branch)' section —
achievements, goals, work-in-progress, constraints.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:13:53 +02:00
|
|
|
if {![info exists dst_wire_to_num_pips($dst_wire)]} {
|
|
|
|
|
set wireobj [get_wires $dst_wire]
|
|
|
|
|
if {$wireobj ne ""} {
|
|
|
|
|
set node [get_nodes -of_objects $wireobj]
|
|
|
|
|
if {$node ne ""} {
|
|
|
|
|
set dst_wire_to_num_pips($dst_wire) [llength [get_nodes -uphill -of_objects $node]]
|
|
|
|
|
} else {
|
|
|
|
|
set dst_wire_to_num_pips($dst_wire) 0
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
set dst_wire_to_num_pips($dst_wire) 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
set num_pips $dst_wire_to_num_pips($dst_wire)
|
|
|
|
|
puts $fp "$tile $pip $src_wire $dst_wire $num_pips $dir_prop"
|
2019-02-05 02:45:05 +01:00
|
|
|
}
|
|
|
|
|
close $fp
|
virtex7: HP-bank glue codified end-to-end + open-flow validation
The open-flow (Yosys → nextpnr-xilinx → FASM → bitstream) now produces
silicon-functional bits on VC707 xc7vx485tffg1761-2 for:
- rst_to_led (IBUF↔OBUF passthrough)
- counter_skewfree (button-clocked 8b counter, general routing)
- counter_sw_bufr (button → BUFR → 8b counter)
- counter_bufr (200 MHz LVDS sysclk → IBUFDS → BUFR → 8b counter)
- counter_2bufg (2× BUFGCTRL on the same source)
- vc707_telegraph (125 MHz crystal → IBUFDS_GTE2 → BUFG → UART smoke test)
- vc707_picosoc (picorv32 + simpleuart + BRAM @ 125 MHz; UART prints
'PicoSoC alive on VC707 @ 125 MHz' on /dev/ttyUSB0)
Highlights of this drop:
utils/fasm2frames.py (+223 net):
- Bank-glue auto-injection for HP-bank IOB18 — IBUF/OBUF (Y0+Y1) +
IBUFDS differential pair. Fires off the FASM-level direction
heuristic (.IN/.IN_ONLY/IBUFDISABLE for IBUF, .DRIVE. for OBUF,
.IN_DIFF for IBUFDS; .SLEW. is unreliable as a marker — gets emitted
on default-state IOBs too).
- INT_L_X32Y49 DCI cascade / bank-active markers when any LIOB18_X81
Y1 OBUF is present.
- PUDC_B emission rewritten for HP-bank IOSTANDARDs (10 features
cover Y0 + Y1 default-state; all 9 historic 'PUDC_B glue' bits
flow naturally from the existing IOSTANDARD segbits).
- HCLK_L per-BUFRCLK-channel 'active' marker — currently codified
for BUFRCLK3 (the channel exercised by counter_sw_bufr).
- GFAN T-tie root glue — INT_L_X62Y(N+10).GFAN_TIE_ROOT_GLUE when
INT_L_X62Y(N).GFAN0.GND_WIRE appears (OBUF.T → GND routing).
- PUDC_B tile excluded from the bank-glue walk (its IN features are
virtual; injecting OBUF_HP_BANK_GLUE on it produces spurious bits).
utils/utils.tcl (+47):
- write_pip_txtdata bulk-fetch — replaces per-net foreach pip with
bulk get_pips + bulk get_property IS_DIRECTIONAL + cached
dst_wire_to_num_pips. ~4× speed-up on xc7vx485t (per-spec time on
041-clk-hrow-pips / 045-hclk-cmt-pips drops from ~1.5 h to ~25 min).
utils/mergedb.sh (+15):
- LIOI / LIOI_TBYTESRC / LIOI_TBYTETERM / LIOB18 / mask_liob18 sed
rewrites for the L-side IOI/IOB18 tiles on HP-only parts (xc7vx485t
uses left-side IOB18 too; upstream kintex7 mergedb only knew the
right side).
11 fuzzers patched for virtex7 readiness:
- 030-iob18 Makefile: split DB target for virtex7 (HP-only); the BUFR
HP-bank results come from the actual fuzzer rather than HR-side sed.
- 037-iob18-pips: L-side mirror tiles (LIOI / LIOI_TBYTESRC /
LIOI_TBYTETERM) added to segdata glob; *_SING tiles excluded;
EXCLUDE_RE updated for L-side prefixes.
- 039-hclk-config: split virtex7 vs kintex7 (HCLK_IOI vs HCLK_IOI3);
XRAY_IOSTANDARD env var; IOB18M/IOB33M alternation.
- 047a-hclk-idelayctrl-pips: accepts both HCLK_IOI and HCLK_IOI3.
- 041, 045, 034, 034b, 043, 044, 046: removed local
write_pip_txtdata override that shadowed the patched utils.tcl
bulk-fetch (was re-introducing the slow per-net Tcl path).
README.md (+86):
- 'Virtex-7 Port Status (virtex7-support branch)' section —
achievements, goals, work-in-progress, constraints.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 11:13:53 +02:00
|
|
|
puts "FUZ([pwd]): wrote $npips rows."
|
2019-02-05 02:45:05 +01:00
|
|
|
}
|
2019-02-13 01:43:02 +01:00
|
|
|
|
|
|
|
|
# Generic non-ROI'd generate.tcl template
|
|
|
|
|
proc generate_top {} {
|
|
|
|
|
create_project -force -part $::env(XRAY_PART) design design
|
|
|
|
|
read_verilog top.v
|
|
|
|
|
synth_design -top top
|
|
|
|
|
|
|
|
|
|
set_property CFGBVS VCCO [current_design]
|
|
|
|
|
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
|
|
|
|
set_property BITSTREAM.GENERAL.PERFRAMECRC YES [current_design]
|
|
|
|
|
|
|
|
|
|
place_design
|
|
|
|
|
route_design
|
|
|
|
|
|
|
|
|
|
write_checkpoint -force design.dcp
|
|
|
|
|
write_bitstream -force design.bit
|
|
|
|
|
}
|
2021-03-19 14:43:03 +01:00
|
|
|
|
|
|
|
|
# Dumps all pins of a site, with the direction info (clock, input, output)
|
|
|
|
|
proc dump_pins {file_name site_prefix} {
|
|
|
|
|
set fp [open $file_name w]
|
|
|
|
|
|
|
|
|
|
puts $fp "name,is_input,is_output,is_clock"
|
|
|
|
|
set site [lindex [get_sites $site_prefix*] 0]
|
|
|
|
|
set bel [get_bels -of_objects $site]
|
|
|
|
|
set bel_pins [get_bel_pins -of_objects $bel]
|
|
|
|
|
|
|
|
|
|
set bel_pins_dict [dict create]
|
|
|
|
|
foreach pin $bel_pins {
|
|
|
|
|
set pin_name [lindex [split $pin "/"] 2]
|
|
|
|
|
set is_clock [get_property IS_CLOCK $pin]
|
|
|
|
|
dict set bel_pins_dict $pin_name $is_clock
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set site_pins [get_site_pins -of_objects $site]
|
|
|
|
|
foreach pin $site_pins {
|
|
|
|
|
set connected_pip [get_pips -of_objects [get_nodes -of_objects $pin]]
|
|
|
|
|
|
|
|
|
|
if { $connected_pip == "" } {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set pin_name [lindex [split $pin "/"] 1]
|
|
|
|
|
set is_input [get_property IS_INPUT $pin]
|
|
|
|
|
set is_output [get_property IS_OUTPUT $pin]
|
|
|
|
|
set is_clock [dict get $bel_pins_dict $pin_name]
|
|
|
|
|
|
|
|
|
|
puts $fp "$pin_name,$is_input,$is_output,$is_clock"
|
|
|
|
|
}
|
|
|
|
|
close $fp
|
|
|
|
|
}
|