Skip to content

Commit

Permalink
Merge branch 'Xilinx:master' into b
Browse files Browse the repository at this point in the history
  • Loading branch information
eddieh-xlnx authored Nov 16, 2023
2 parents 64cbaaf + 172ee42 commit 8a09d81
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fpga-interchange-schema/interchange/capnp/java.capnp:

.PHONY: score-$(ROUTER)
score-$(ROUTER): $(addsuffix _$(ROUTER).wirelength, $(BENCHMARKS)) $(addsuffix _$(ROUTER).check, $(BENCHMARKS))
python ./compute-score.py $(addsuffix _$(ROUTER), $(BENCHMARKS))
python3 ./compute-score.py $(addsuffix _$(ROUTER), $(BENCHMARKS))

.PRECIOUS: %.device
%.device: | compile-java
Expand Down
2 changes: 1 addition & 1 deletion RapidWright
Submodule RapidWright updated 50 files
+2 −2 .classpath
+1 −1 .github/workflows/build.yml
+1 −1 CONTRIBUTING.md
+2 −2 Makefile
+59 −0 RELEASE_NOTES.TXT
+1 −0 build.gradle
+7 −7 interchange/README.md
+1 −1 python/setup.py
+1 −1 python/src/rapidwright/rapidwright.py
+82 −40 src/com/xilinx/rapidwright/design/DesignTools.java
+53 −7 src/com/xilinx/rapidwright/design/ModuleInst.java
+34 −40 src/com/xilinx/rapidwright/design/tools/RelocationTools.java
+305 −0 src/com/xilinx/rapidwright/eco/ECOPlacementHelper.java
+1,087 −0 src/com/xilinx/rapidwright/eco/ECOTools.java
+29 −5 src/com/xilinx/rapidwright/edif/EDIFNetlist.java
+26 −102 src/com/xilinx/rapidwright/examples/MultGenerator.java
+37 −30 src/com/xilinx/rapidwright/examples/PipelineGeneratorWithRouting.java
+56 −94 src/com/xilinx/rapidwright/examples/PolynomialGenerator.java
+16 −11 src/com/xilinx/rapidwright/gui/GUIModuleInst.java
+2 −3 src/com/xilinx/rapidwright/interchange/DcpToInterchange.java
+182 −10 src/com/xilinx/rapidwright/interchange/Interchange.java
+5 −1 src/com/xilinx/rapidwright/router/RouteNode.java
+70 −12 src/com/xilinx/rapidwright/router/RouteThruHelper.java
+5 −0 src/com/xilinx/rapidwright/router/UltraScaleClockRouting.java
+80 −47 src/com/xilinx/rapidwright/rwroute/PartialRouter.java
+109 −60 src/com/xilinx/rapidwright/rwroute/RWRoute.java
+51 −4 src/com/xilinx/rapidwright/rwroute/RWRouteConfig.java
+33 −25 src/com/xilinx/rapidwright/rwroute/RouterHelper.java
+1 −1 src/com/xilinx/rapidwright/rwroute/TimingAndWirelengthReport.java
+26 −7 src/com/xilinx/rapidwright/util/FileTools.java
+4 −3 src/com/xilinx/rapidwright/util/PerformanceExplorer.java
+1 −1 src/com/xilinx/rapidwright/util/ReportRouteStatusResult.java
+2 −1 src/com/xilinx/rapidwright/util/Utils.java
+46 −0 src/com/xilinx/rapidwright/util/VivadoTools.java
+1 −1 test/RapidWrightDCP
+2 −2 test/src/com/xilinx/rapidwright/design/TestDCPLoad.java
+25 −1 test/src/com/xilinx/rapidwright/design/TestDesign.java
+136 −0 test/src/com/xilinx/rapidwright/design/TestDesignTools.java
+42 −0 test/src/com/xilinx/rapidwright/design/TestModuleInst.java
+42 −35 test/src/com/xilinx/rapidwright/design/TestRelocationTools.java
+162 −0 test/src/com/xilinx/rapidwright/eco/TestECOPlacementHelper.java
+438 −0 test/src/com/xilinx/rapidwright/eco/TestECOTools.java
+25 −0 test/src/com/xilinx/rapidwright/edif/TestEDIFHierPortInst.java
+21 −0 test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java
+84 −0 test/src/com/xilinx/rapidwright/examples/TestPolynomialGenerator.java
+60 −0 test/src/com/xilinx/rapidwright/router/TestRouteNode.java
+89 −0 test/src/com/xilinx/rapidwright/router/TestRouteThruHelper.java
+83 −16 test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java
+42 −1 test/src/com/xilinx/rapidwright/rwroute/TestRouterHelper.java
+11 −0 test/src/com/xilinx/rapidwright/util/TestVivadoTools.java
5 changes: 5 additions & 0 deletions docs/score.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,17 @@ BEL input and output pins for each type of PhysCell.
|`RAMD32`, `RAMS32` | `O5` and `O6` <- `A0` to `A4` | Distributed Memory |
|`RAMD64E`, `RAMS64E` | `O6` <- `A0` to `A5` | Distributed Memory |
|`RAMB36E2`, `RAMB18E2` | (none) <- (none) | Block Memory |
|`URAM288` | (none) <- (none) | UltraRAM Memory |
|`MMCME4_ADV` | (none) <- (none) | Clock Manager |
|`LUT1`, `LUT2`, `LUT3`, `LUT4`, `LUT5`, `LUT6` | (all) <- (all) | Look Up Table |
|`CARRY8` | [see table CARRY8](#carry8-connectivity) | Fast Carry Logic |
|`MUXF7`, `MUXF8`, `MUXF9` | (all) <- (all) | Intrasite Mux |
|`IBUFCTRL` | (all) <- (all) | Input Buffer |
|`DSP_A_B_DATA`, `DSP_C_DATA`, `DSP_M_DATA`,<br>`DSP_PREADD_DATA`, `DSP_OUTPUT`, `DSP_ALU` | (none) <- (none) [see note](#dsp-cell-connectivity) | DSP Logic |
|`DSP_MULTIPLIER`, `DSP_PREADD` | (all) <- (all) [see note](#dsp-cell-connectivity) | DSP Logic |
|`PCIE40E4` | (none) <- (none) | PCIe Hard Macro |
|`GTYE4_CHANNEL`,`GTYE4_COMMON` | (none) <- (none) | Gigabit Transceiver Components |
|`STARTUPE3`,`ICAPE3` | (none) <- (none) | Device Configuration Components |

### CARRY8 Connectivity
| BEL output pin | BEL input pins |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,27 @@ public static void main(String[] args) throws IOException {
continue;
}
if (!net.hasPIPs()) {
// Route only nets with no PIPs
pinsToRoute.addAll(net.getSinkPins());
}
}

boolean softPreserve = false;
PartialRouter.routeDesignPartialNonTimingDriven(design, pinsToRoute, softPreserve);
PartialRouter.routeDesignWithUserDefinedArguments(design, new String[] {
// Same options as PartialRouter.routeDesignPartialTimingDriven()
"--fixBoundingBox",
"--useUTurnNodes",
"--nonTimingDriven",
"--verbose",
// These options are set to their default value, a subset of which are duplicated here
// to ease modification; full documentation is available in RWRouteConfig.java
"--maxIterations", "100",
"--wirelengthWeight", "0.8",
"--initialPresentCongestionFactor", "0.5",
"--presentCongestionMultiplier", "2",
"--historicalCongestionFactor", "1",
},
pinsToRoute, softPreserve);

// Write routed result to new Physical Netlist
PhysNetlistWriter.writePhysNetlist(design, args[1]);
Expand Down
18 changes: 9 additions & 9 deletions wirelength_analyzer/wa.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def __init__(self, netlist, verbosity=0):
xcvup = xcvupDeviceData()
self.cells = xcvup.cells
self.pips = xcvup.pips
self.tile_root_name_regex = xcvup.tile_root_name_regex
self.tile_types = xcvup.tile_types
self.global_net_drivers = xcvup.global_net_drivers
self.pip_cache = {}
self.tile_cache = {}
if self.verbosity > 0:
Expand All @@ -116,7 +119,6 @@ def __init__(self, netlist, verbosity=0):
self.placements = {}
for c in self.phys.placements:
self.placements[(c.site, c.bel)] = c
self.tile_root_name_regex = re.compile(r'(.+)_X\d+Y\d+')
self.add_all_nets_to_graph()

def tstart(self):
Expand Down Expand Up @@ -252,27 +254,25 @@ def segment_to_wirelength(self, seg):
wire1 = seg.pip.wire1
tile = seg.pip.tile
sl = self.phys.strList
wire1_name = sl[wire1]
tile_name = sl[tile]

is_int_tile = self.tile_cache.get(tile)
if is_int_tile is None:
tile_name = sl[tile]
is_int_tile = tile_name.startswith('INT_')
self.tile_cache[tile] = is_int_tile
if not is_int_tile and self.tile_root_name_regex.match(tile_name).group(1) not in \
('CLEL_R', 'CLEM', 'CLEM_R', 'BRAM', 'DSP',
'XIPHY_BYTE_L', 'HPIO_L', 'CMT_L'):
raise ValueError("Unrecognized tile on PIP: " + tile_name + ',' + sl[seg.pip.wire0] + ',' + sl[wire1])
if not is_int_tile and self.tile_root_name_regex.match(tile_name).group(1) not in self.tile_types:
raise ValueError("Unrecognized tile on PIP: " + tile_name + ',' + sl[seg.pip.wire0] + ',' + wire1_name)

if is_int_tile:
wl = self.pip_cache.get(wire1)
if wl is not None:
return wl
wire1_name = sl[wire1]
for p in self.pips:
if p[0].fullmatch(wire1_name):
self.pip_cache[wire1] = p[1]
return p[1]
assert False, "Found unrecognized pip wire1: "+wire1_name+" in tile: "+tile
assert False, "Found unrecognized pip wire1: "+wire1_name+" in tile: "+tile_name
else:
return 0
return 0
Expand Down Expand Up @@ -355,7 +355,7 @@ def add_all_nets_to_graph(self):
# Omit source (BELPins) that don't have any fanout
if len(branch.branches) == 0:
continue
if sl[branch.routeSegment.belPin.bel] in ('BUFCE'):
if sl[branch.routeSegment.belPin.bel] in self.global_net_drivers:
# don't analyze global (e.g. clk, rst) nets
if self.verbosity > 1:
print("Skipping global net:",this_net)
Expand Down
77 changes: 51 additions & 26 deletions wirelength_analyzer/xcvup_device_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def __contains__(self, item):

self.cells = {
# sequential
'FDRE': self.default_sequential,
'FDCE': self.default_sequential,
'FDSE': self.default_sequential,
'FDPE': self.default_sequential,
'FDRE': self.none_to_none,
'FDCE': self.none_to_none,
'FDSE': self.none_to_none,
'FDPE': self.none_to_none,

'SRL16E': self.srl16e,
'SRLC32E': self.srlc32e,
Expand All @@ -50,39 +50,50 @@ def __contains__(self, item):
'RAMD64E': self.ram_64e,
'RAMS64E': self.ram_64e,

'RAMB36E2': self.default_sequential,
'RAMB18E2': self.default_sequential,
'RAMB36E2': self.none_to_none,
'RAMB18E2': self.none_to_none,

'MMCME4_ADV': self.none_to_none,

'URAM288': self.none_to_none,

'GTYE4_CHANNEL': self.none_to_none,
'GTYE4_COMMON': self.none_to_none,
'PCIE40E4': self.none_to_none,

'STARTUPE3': self.none_to_none,
'ICAPE3': self.none_to_none,

# combinatorial
'LUT1': self.default_combinatorial,
'LUT2': self.default_combinatorial,
'LUT3': self.default_combinatorial,
'LUT4': self.default_combinatorial,
'LUT5': self.default_combinatorial,
'LUT6': self.default_combinatorial,
'LUT1': self.all_to_all,
'LUT2': self.all_to_all,
'LUT3': self.all_to_all,
'LUT4': self.all_to_all,
'LUT5': self.all_to_all,
'LUT6': self.all_to_all,

'CARRY8': self.carry8,

'MUXF7': self.default_combinatorial,
'MUXF8': self.default_combinatorial,
'MUXF9': self.default_combinatorial,
'MUXF7': self.all_to_all,
'MUXF8': self.all_to_all,
'MUXF9': self.all_to_all,

'IBUFCTRL': self.default_combinatorial,
'IBUFCTRL': self.all_to_all,

# The following cell types are BELs that make up a DSP macro.
# Such DSPs contains a number of optional pipelining registers,
# but to determine whether such registers are enabled currently
# requires examining the design's corresponding Logical Netlist.
# For the purpose of the FPGA24 Routing Contest, we optimistically
# assume that all BELs possessing a CLK pin are fully sequential.
'DSP_A_B_DATA': self.default_sequential,
'DSP_C_DATA': self.default_sequential,
'DSP_M_DATA': self.default_sequential,
'DSP_PREADD_DATA': self.default_sequential,
'DSP_OUTPUT': self.default_sequential,
'DSP_ALU': self.default_sequential,
'DSP_MULTIPLIER': self.default_combinatorial,
'DSP_PREADD': self.default_combinatorial,
'DSP_A_B_DATA': self.none_to_none,
'DSP_C_DATA': self.none_to_none,
'DSP_M_DATA': self.none_to_none,
'DSP_PREADD_DATA': self.none_to_none,
'DSP_OUTPUT': self.none_to_none,
'DSP_ALU': self.none_to_none,
'DSP_MULTIPLIER': self.all_to_all,
'DSP_PREADD': self.all_to_all,
}

# pip wirelengths are assigned based on the values provided in Table 1
Expand All @@ -97,6 +108,7 @@ def __contains__(self, item):
(re.compile(r'INT_NODE_GLOBAL_\d{1,2}_INT_OUT[01]'), 0),
(re.compile(r'IMUX_[EW]\d{1,2}'), 0),
(re.compile(r'IMUX_(CMT_)?XIPHY\d{1,2}'), 0),
(re.compile(r'IMUXOUT\d{1,2}'), 0),
(re.compile(r'CTRL_[EW][0-9]'), 0),
(re.compile(r'CLE_CLE_[LM]_SITE_0_[A-H](_O|MUX|Q(2)?)'), 0),
(re.compile(r'BYPASS_[EW]\d{1,2}'), 0),
Expand Down Expand Up @@ -135,15 +147,28 @@ def __contains__(self, item):
(re.compile(r'CLK_LEAF_SITES_\d_CLK_LEAF'), 0),
]

def default_sequential(self, o):
# recognized tile types and regex to strip tile location
self.tile_root_name_regex = re.compile(r'(.+)_X\d+Y\d+')
self.tile_types = {
'CLEL_R', 'CLEM', 'CLEM_R', 'BRAM', 'DSP', 'XIPHY_BYTE_L',
'HPIO_L', 'CMT_L', 'URAM_URAM_FT', 'URAM_URAM_DELAY_FT', 'GTY_L',
'GTY_R'
}

# bels that drive global nets
self.global_net_drivers = {
'BUFCE', 'BUFG_GT', 'BUFG_GT_SYNC'
}

def none_to_none(self, o):
"""
Default connectivity for combinatorial logic
The set of connections from all inputs to any output is the empty set
"""
return self.empty

def default_combinatorial(self, o):
def all_to_all(self, o):
"""
Default connectivity for combinatorial logic
Expand Down

0 comments on commit 8a09d81

Please sign in to comment.