attar 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- attar/__init__.py +11 -0
- attar/_slow_loop.py +58 -0
- attar/design.py +733 -0
- attar/evaluator.py +341 -0
- attar/facts.py +134 -0
- attar/hub.py +104 -0
- attar/io/__init__.py +1 -0
- attar/io/bookshelf.py +295 -0
- attar/io/deffile.py +498 -0
- attar/io/distill.py +316 -0
- attar/io/export.py +197 -0
- attar/io/fpformats.py +256 -0
- attar/io/lef.py +122 -0
- attar/io/liberty.py +350 -0
- attar/io/sdc.py +244 -0
- attar/io/st.py +41 -0
- attar/kernels.py +144 -0
- attar/metrics.py +101 -0
- attar/naive/__init__.py +19 -0
- attar/naive/bstar.py +183 -0
- attar/naive/floorplan.py +528 -0
- attar/naive/flow.py +75 -0
- attar/naive/gp.py +420 -0
- attar/naive/lg.py +812 -0
- attar/naive/macro_lp.py +222 -0
- attar/naive/rowops.py +100 -0
- attar/naive/space.py +182 -0
- attar/netlist.py +673 -0
- attar/paths.py +25 -0
- attar/rules/__init__.py +1 -0
- attar/rules/pdn.py +191 -0
- attar/rules/rails.py +159 -0
- attar/rules/routing.py +709 -0
- attar/status.py +183 -0
- attar/timing/__init__.py +1 -0
- attar/timing/csrc/pdtree.cpp +390 -0
- attar/timing/dmp.py +356 -0
- attar/timing/dmp_triton.py +623 -0
- attar/timing/ir.py +316 -0
- attar/timing/library.py +341 -0
- attar/timing/sizing.py +120 -0
- attar/timing/sta.py +1425 -0
- attar/timing/steiner.py +146 -0
- attar/timing/steiner_big.py +69 -0
- attar/timing/steiner_triton.py +350 -0
- attar/viz.py +492 -0
- attar-1.0.0.dist-info/LICENSE +21 -0
- attar-1.0.0.dist-info/METADATA +269 -0
- attar-1.0.0.dist-info/RECORD +51 -0
- attar-1.0.0.dist-info/WHEEL +5 -0
- attar-1.0.0.dist-info/top_level.txt +1 -0
attar/__init__.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Attar: a fast loop for physical design. Designs from any source become GPU tensors (Design), metrics evaluate
|
|
2
|
+
them (Evaluator), and a basic set of tensorized engines (attar.naive) makes them move. What a design can do follows
|
|
3
|
+
from the facts it has. See README.md."""
|
|
4
|
+
__version__ = '1.0.0'
|
|
5
|
+
|
|
6
|
+
from .design import Design, load, zoo
|
|
7
|
+
from .io.distill import distill
|
|
8
|
+
from .evaluator import Evaluator
|
|
9
|
+
from .hub import fetch
|
|
10
|
+
|
|
11
|
+
__all__ = ['Design', 'load', 'zoo', 'fetch', 'distill', 'Evaluator', '__version__']
|
attar/_slow_loop.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""Internal: handing a design back to the slow loop it came from (ORFS), for Attar's own validation.
|
|
2
|
+
|
|
3
|
+
Not part of the user API. Users take the result out with Design.export (a DEF) into their own flow (OpenROAD,
|
|
4
|
+
Innovus, ICC2, ...). Attar keeps this only to check itself against ORFS: tools/orfs_roundtrip.py (a placement into an
|
|
5
|
+
ORFS run), tools/orfs_handoff.py (a floorplan into ORFS 2_1) and their tests use it.
|
|
6
|
+
|
|
7
|
+
The fact 'slow_loop' says that a design comes from an ORFS stage on a platform ORFS knows; an engine that changes the
|
|
8
|
+
floorplan after ORFS built tapcells and PDN around it drops the fact (Design._floorplan_changed).
|
|
9
|
+
"""
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
from .facts import MissingFacts
|
|
13
|
+
|
|
14
|
+
# what a hand-off needs, beyond what export needs
|
|
15
|
+
CAPABILITIES = {
|
|
16
|
+
'orfs_handoff': {'cell_library', 'def_frame', 'slow_loop', 'floorplan.io', 'floorplan.macros', 'placement'},
|
|
17
|
+
'orfs_floorplan_handoff': {'cell_library', 'def_frame', 'slow_loop', 'floorplan.io', 'floorplan.macros'}, # 2_1
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def missing(d, capability='orfs_handoff'):
|
|
22
|
+
"""The facts a hand-off still needs (sorted)."""
|
|
23
|
+
return sorted(CAPABILITIES[capability] - d.present)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def can(d, capability='orfs_handoff'):
|
|
27
|
+
return not missing(d, capability)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def tier(d):
|
|
31
|
+
"""A: an ORFS hand-off is possible (given a placement); B: a cell library, so export onto a DEF; C: neither."""
|
|
32
|
+
if CAPABILITIES['orfs_handoff'] - {'placement'} <= set(d.facts):
|
|
33
|
+
return 'A'
|
|
34
|
+
return 'B' if 'cell_library' in d.facts else 'C'
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def handoff_command(d, out_def, run_dir=None):
|
|
38
|
+
"""The command that hands an exported DEF to an ORFS run of this design (run_dir: its WORK_HOME) and finishes the
|
|
39
|
+
flow there (spec 7.2). A floorplan (from ORFS 2_1) goes to ORFS only when it is legal (Design.floorplan_legal)."""
|
|
40
|
+
o = d.manifest.get('orfs')
|
|
41
|
+
fp = (o or {}).get('stage') == '2_1_floorplan'
|
|
42
|
+
cap = 'orfs_floorplan_handoff' if fp else 'orfs_handoff'
|
|
43
|
+
miss = missing(d, cap)
|
|
44
|
+
if miss:
|
|
45
|
+
raise MissingFacts(d.manifest.get('design', d.path), cap, miss)
|
|
46
|
+
if fp:
|
|
47
|
+
ok, issues = d.floorplan_legal()
|
|
48
|
+
if not ok:
|
|
49
|
+
raise ValueError('%s: the floorplan is not legal (%s); ORFS would not take it'
|
|
50
|
+
% (d.manifest.get('design'), '; '.join(issues)))
|
|
51
|
+
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
52
|
+
key = o['design'] if o.get('platform', 'asap7') == 'asap7' else '%s/%s' % (o['platform'], o['design'])
|
|
53
|
+
run = run_dir or '<ORFS WORK_HOME of %s>' % key
|
|
54
|
+
if fp: # the floorplan goes to ORFS, which places and routes from there
|
|
55
|
+
return 'python3 %s %s %s %s' % (os.path.relpath(os.path.join(root, 'tools', 'orfs_handoff.py')), key, run,
|
|
56
|
+
out_def)
|
|
57
|
+
return 'python3 %s %s %s def=%s --stage %s' % (os.path.relpath(os.path.join(root, 'tools', 'orfs_roundtrip.py')),
|
|
58
|
+
key, run, out_def, o['stage'])
|