Commit 678a5bc5 by sakundu

Merge branch 'main' of github.com:TILOS-AI-Institute/MacroPlacement into flow_scripts

parents 2cedf80b 29a44d1c
...@@ -43,6 +43,7 @@ class Clustering: ...@@ -43,6 +43,7 @@ class Clustering:
self.RePlace = RePlace self.RePlace = RePlace
self.placement_density = placement_density self.placement_density = placement_density
self.GUI = GUI self.GUI = GUI
self.grid_width = grid_width
### Print Information ### Print Information
print("[INFO] step_threshold : ", self.step_threshold) print("[INFO] step_threshold : ", self.step_threshold)
...@@ -90,8 +91,6 @@ class Clustering: ...@@ -90,8 +91,6 @@ class Clustering:
# for innovus command # for innovus command
self.cluster_file = cadence_result_dir + "/" + self.design self.cluster_file = cadence_result_dir + "/" + self.design
self.cluster_file += "_cluster_" + str(self.Nparts) + ".tcl" self.cluster_file += "_cluster_" + str(self.Nparts) + ".tcl"
self.solution_file = self.hypergraph_file + ".part." + str(self.Nparts) # defined by hemtis automatically
self.cluster_lef_file = openroad_result_dir + "/clusters.lef" self.cluster_lef_file = openroad_result_dir + "/clusters.lef"
self.cluster_def_file = openroad_result_dir + "/clustered_netlist.def" self.cluster_def_file = openroad_result_dir + "/clustered_netlist.def"
self.blob_def_file = openroad_result_dir + "/blob.def" self.blob_def_file = openroad_result_dir + "/blob.def"
...@@ -115,19 +114,25 @@ class Clustering: ...@@ -115,19 +114,25 @@ class Clustering:
self.GenerateHypergraph() # Extract netlist information from lef/def/v self.GenerateHypergraph() # Extract netlist information from lef/def/v
self.RemoveLargetNet() # Remove large nets self.RemoveLargetNet() # Remove large nets
self.ConvertFixFile() # Convert fixed file self.ConvertFixFile() # Convert fixed file
self.cluster_file += "_cluster_" + str(self.Nparts) + ".tcl"
self.solution_file = self.hypergraph_file + ".part." + str(self.Nparts)
# defined by hemtis automatically
self.hMetisPartitioner() # Partition the hypergraph self.hMetisPartitioner() # Partition the hypergraph
self.BreakClusters() # Break clusters spreading apart self.BreakClusters() # Break clusters spreading apart
print("[INFO] After finishing BreakClusters(), ", end = "") print("[INFO] After finishing BreakClusters(), ", end = "")
print("num_clusters = ", len(self.vertices_in_cluster)) print("num_clusters = ", len(self.vertices_in_cluster))
print("\n\n")
self.MergeSmallClusters() # Merge small clusters with its neighbors self.MergeSmallClusters() # Merge small clusters with its neighbors
print("[INFO] After finishing MergeSmallClusters(), ", end = "") print("[INFO] After finishing MergeSmallClusters(), ", end = "")
print("num_clusters = ", len(self.vertices_in_cluster))
print("\n\n")
self.GenerateSoftMacros() self.GenerateSoftMacros()
ProBufFormat(self.io_name_file, self.macro_pin_file, \ ProBufFormat(self.io_name_file, self.macro_pin_file, \
self.instance_name_file, self.outline_file, \ self.instance_name_file, self.outline_file, \
self.net_file, self.soft_macros, \ self.net_file, self.soft_macros, \
self.pbf_file, self.net_size_threshold, 1.0) self.pbf_file, self.net_size_threshold, self.grid_width)
self.CreateInvsCluster() # Generate Innovus Clustering Commands self.CreateInvsCluster() # Generate Innovus Clustering Commands
...@@ -228,6 +233,7 @@ class Clustering: ...@@ -228,6 +233,7 @@ class Clustering:
with open(self.fixed_file) as f: with open(self.fixed_file) as f:
content = f.read().splitlines() content = f.read().splitlines()
f.close() f.close()
self.Nparts += len(content)
# read the grouping information # read the grouping information
for i in range(len(content)): for i in range(len(content)):
...@@ -236,6 +242,8 @@ class Clustering: ...@@ -236,6 +242,8 @@ class Clustering:
for vertex in vertices: for vertex in vertices:
fixed_part[self.vertex_map[vertex]] = i fixed_part[self.vertex_map[vertex]] = i
f = open(self.hypergraph_fix_file, "w") f = open(self.hypergraph_fix_file, "w")
for part in fixed_part: for part in fixed_part:
f.write(str(part) + "\n") f.write(str(part) + "\n")
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,7 +12,7 @@ if __name__ == '__main__': ...@@ -12,7 +12,7 @@ if __name__ == '__main__':
parser.add_argument("--fixed_file", help="fixed file generated by grouping", type = str, default = "./fix_files_grouping/ariane.fix.old") parser.add_argument("--fixed_file", help="fixed file generated by grouping", type = str, default = "./fix_files_grouping/ariane.fix.old")
parser.add_argument("--step_threshold", help = "threshold (x and y) to break clusters (in um)", type = float, default = 400.0) parser.add_argument("--step_threshold", help = "threshold (x and y) to break clusters (in um)", type = float, default = 400.0)
parser.add_argument("--distance", help="distance for merge clusters", type = float, default = 200.0) parser.add_argument("--distance", help="distance for merge clusters", type = float, default = 200.0)
parser.add_argument("--grid_width", help="grid width, the width of soft macro", type = int, default = 30.0) parser.add_argument("--grid_width", help="grid width, the width of soft macro", type = int, default = 100.0)
parser.add_argument("--max_num_vertices", help="threshold for samller clusters", type = int, default = 100) parser.add_argument("--max_num_vertices", help="threshold for samller clusters", type = int, default = 100)
parser.add_argument("--net_size_threshold", help = "large net threshold", type = int, default = 300) parser.add_argument("--net_size_threshold", help = "large net threshold", type = int, default = 300)
parser.add_argument("--Nparts", help = "number of clusters (only for hmetis, default = 500)", type = int, default = 500) parser.add_argument("--Nparts", help = "number of clusters (only for hmetis, default = 500)", type = int, default = 500)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -19,6 +19,9 @@ setup_file = "setup.tcl" ...@@ -19,6 +19,9 @@ setup_file = "setup.tcl"
design = "ariane" design = "ariane"
macro_lefs = ["./lefs/fakeram45_256x16.lef"] macro_lefs = ["./lefs/fakeram45_256x16.lef"]
"""
############################################## ##############################################
### Call Gridding Function ### Call Gridding Function
############################################## ##############################################
...@@ -36,6 +39,11 @@ gridding = GriddingLefDefInterface(gridding_src_dir, design, setup_file, toleran ...@@ -36,6 +39,11 @@ gridding = GriddingLefDefInterface(gridding_src_dir, design, setup_file, toleran
max_rows_times_cols) max_rows_times_cols)
num_rows = gridding.GetNumRows() num_rows = gridding.GetNumRows()
num_cols = gridding.GetNumCols() num_cols = gridding.GetNumCols()
"""
num_rows = 19
num_cols = 19
############################################## ##############################################
### Call Grouping Function ### Call Grouping Function
...@@ -59,13 +67,19 @@ os.system(cmd) ...@@ -59,13 +67,19 @@ os.system(cmd)
fixed_file = grouping_rpt_dir + "/" + design + ".fix.old" fixed_file = grouping_rpt_dir + "/" + design + ".fix.old"
exit()
############################################## ##############################################
### Call Clustering Function ### Call Clustering Function
############################################## ##############################################
clustering_src_dir = '../Clustering/src' clustering_src_dir = '../Clustering/src'
chip_width = gridding.GetChipWidth() #chip_width = gridding.GetChipWidth()
chip_height = gridding.GetChipHeight() #chip_height = gridding.GetChipHeight()
num_std_cells = gridding.GetNumStdCells() #num_std_cells = gridding.GetNumStdCells()
chip_width = 1599.99
chip_height = 1600.06
num_std_cells = 87452
grid_width = chip_width / num_cols grid_width = chip_width / num_cols
Nparts = 500 Nparts = 500
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
# PlacementCost
*Circuit Training Open Source* is an effort to open-source the entire framework for generating chip floor plans
with distributed deep reinforcement learning. This framework is originally reproduces the
methodology published in the Nature 2021 paper:
*[A graph placement methodology for fast chip design.](https://www.nature.com/articles/s41586-021-03544-w)
Azalia Mirhoseini, Anna Goldie, Mustafa Yazgan, Joe Wenjie Jiang, Ebrahim
Songhori, Shen Wang, Young-Joon Lee, Eric Johnson, Omkar Pathak, Azade Nazi,
Jiwoo Pak, Andy Tong, Kavya Srinivasa, William Hang, Emre Tuncer, Quoc V. Le,
James Laudon, Richard Ho, Roger Carpenter & Jeff Dean, 2021. Nature, 594(7862),
pp.207-212.
[[PDF]](https://www.nature.com/articles/s41586-021-03544-w.epdf?sharing_token=tYaxh2mR5EozfsSL0WHZLdRgN0jAjWel9jnR3ZoTv0PW0K0NmVrRsFPaMa9Y5We9O4Hqf_liatg-lvhiVcYpHL_YQpqkurA31sxqtmA-E1yNUWVMMVSBxWSp7ZFFIWawYQYnEXoBE4esRDSWqubhDFWUPyI5wK_5B_YIO-D_kS8%3D)*
## Quick Start
Under `MACROPLACEMENT` main directory, run the following command:
```shell
# Copies the placement cost binary to /usr/local/bin and makes it executable.
sudo curl https://storage.googleapis.com/rl-infra-public/circuit-training/placement_cost/plc_wrapper_main \
-o /usr/local/bin/plc_wrapper_main
# Run plc testbench
python -m Plc_client.plc_client_os_test
```
## What do we open-source here?
The current Circuit Training framework requires user to download an executable binary <em>plc_wrapper_main</em> in order to run. The <em>plc_wrapper_main</em> is not open-sourced and not documented anywhere publically. [plc_client.py](https://github.com/google-research/circuit_training/blob/main/circuit_training/environment/plc_client.py) then talks to this binary excutable for crtical information to build a training environment, extract a state observation and even call a force-directed placer. This is an attempt to open-source this "last piece" to the puzzle and hopefully reproduce a fully transparent framework to the public.
## How do I open-source?
All current progress can be reviewed [here](https://github.com/TILOS-AI-Institute/MacroPlacement/blob/plc_client-open-source/Plc_client/plc_client_os.py). I have generated numerous testcases, varying from a few macros to hundreds of different modules. The purpose of these testcases is to study the behavior of <em>plc_wrapper_main</em> in a scalable way. I have also set up testbench to compare my result to the result from [plc_client.py](https://github.com/google-research/circuit_training/blob/main/circuit_training/environment/plc_client.py).
## What is the end-goal?
The first step and the current step of this open-source effor is to reproduce similar results to Google's <em>plc_wrapper_main</em> in the testbench. The final step will be plugging [plc_client_os.py](https://github.com/TILOS-AI-Institute/MacroPlacement/blob/plc_client-open-source/Plc_client/plc_client_os.py) into the Circuit Training Framework and reproduce a quality training.
## Reference
```
@article{mirhoseini2021graph,
title={A graph placement methodology for fast chip design},
author={Mirhoseini, Azalia and Goldie, Anna and Yazgan, Mustafa and Jiang, Joe
Wenjie and Songhori, Ebrahim and Wang, Shen and Lee, Young-Joon and Johnson,
Eric and Pathak, Omkar and Nazi, Azade and Pak, Jiwoo and Tong, Andy and
Srinivasa, Kavya and Hang, William and Tuncer, Emre and V. Le, Quoc and
Laudon, James and Ho, Richard and Carpenter, Roger and Dean, Jeff},
journal={Nature},
volume={594},
number={7862},
pages={207--212},
year={2021},
publisher={Nature Publishing Group}
}
```
```
@misc{CircuitTraining2021,
title = {{Circuit Training}: An open-source framework for generating chip
floor plans with distributed deep reinforcement learning.},
author = {Guadarrama, Sergio and Yue, Summer and Boyd, Toby and Jiang, Joe
Wenjie and Songhori, Ebrahim and Tam, Terence and Mirhoseini, Azalia},
howpublished = {\url{https://github.com/google_research/circuit_training}},
url = "https://github.com/google_research/circuit_training",
year = 2021,
note = "[Online; accessed 21-December-2021]"
}
```
# coding=utf-8
# Copyright 2021 The Circuit Training Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""PlacementCost client class."""
import json
import socket
import subprocess
import tempfile
from typing import Any, Text
from absl import flags
from absl import logging
flags.DEFINE_string('plc_wrapper_main', 'plc_wrapper_main',
'Path to plc_wrapper_main binary.')
FLAGS = flags.FLAGS
class PlacementCost(object):
"""PlacementCost object wrapper."""
BUFFER_LEN = 1024 * 1024
MAX_RETRY = 10
def __init__(self,
netlist_file: Text,
macro_macro_x_spacing: float = 0.0,
macro_macro_y_spacing: float = 0.0) -> None:
"""Creates a PlacementCost client object.
It creates a subprocess by calling plc_wrapper_main and communicate with
it over an `AF_UNIX` channel.
Args:
netlist_file: Path to the netlist proto text file.
macro_macro_x_spacing: Macro-to-macro x spacing in microns.
macro_macro_y_spacing: Macro-to-macro y spacing in microns.
"""
# if not FLAGS.plc_wrapper_main:
# raise ValueError('FLAGS.plc_wrapper_main should be specified.')
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
address = tempfile.NamedTemporaryFile().name
self.sock.bind(address)
self.sock.listen(1)
args = [
FLAGS.plc_wrapper_main, #
'--uid=',
'--gid=',
f'--pipe_address={address}',
f'--netlist_file={netlist_file}',
f'--macro_macro_x_spacing={macro_macro_x_spacing}',
f'--macro_macro_y_spacing={macro_macro_y_spacing}',
]
self.process = subprocess.Popen([str(a) for a in args])
self.conn, _ = self.sock.accept()
# See circuit_training/environment/plc_client_test.py for the supported APIs.
def __getattr__(self, name) -> Any:
# snake_case to PascalCase.
name = name.replace('_', ' ').title().replace(' ', '')
def f(*args) -> Any:
json_args = json.dumps({'name': name, 'args': args})
self.conn.send(json_args.encode('utf-8'))
json_ret = b''
retry = 0
# The stream from the unix socket can be incomplete after a single call
# to `recv` for large (200kb+) return values, e.g. GetMacroAdjacency. The
# loop retries until the returned value is valid json. When the host is
# under load ~10 retries have been needed. Adding a sleep did not seem to
# make a difference only added latency. b/210838186
while True:
part = self.conn.recv(PlacementCost.BUFFER_LEN)
json_ret += part
if len(part) < PlacementCost.BUFFER_LEN:
json_str = json_ret.decode('utf-8')
try:
output = json.loads(json_str)
break
except json.decoder.JSONDecodeError as e:
logging.warn('JSONDecode Error for %s \n %s', name, e)
if retry < PlacementCost.MAX_RETRY:
logging.info('Looking for more data for %s on connection:%s/%s',
name, retry, PlacementCost.MAX_RETRY)
retry += 1
else:
raise e
if isinstance(output, dict):
if 'ok' in output and not output['ok']: # Status::NotOk
raise ValueError(
f"Error in calling {name} with {args}: {output['message']}.")
elif '__tuple__' in output: # Tuple
output = tuple(output['items'])
return output
return f
def __del__(self) -> None:
self.conn.close()
self.process.kill()
self.process.wait()
self.sock.close()
import unittest
import os
from Plc_client import plc_client_os as plc_client_os
from Plc_client import plc_client as plc_client
class CircuitDataBaseTest(unittest.TestCase):
# NETLIST_PATH = "./Plc_client/test/ariane_hard2soft/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/ariane_soft2hard/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/ariane_port2soft/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/sample_clustered_nomacro/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/sample_clustered_macroxy/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/ariane/netlist.pb.txt"
def test_proxy_cost(self):
# Google's Binary Executable
self.plc = plc_client_os.PlacementCost(self.NETLIST_PATH)
# Open-sourced Implementation
self.plc_os = plc_client_os.PlacementCost(netlist_file=self.NETLIST_PATH,
macro_macro_x_spacing = 50,
macro_macro_y_spacing = 50)
assert int(self.plc_os.get_wirelength()) == int(self.plc.get_wirelength())
def test_metadata(self):
# Google's Binary Executable
self.plc = plc_client_os.PlacementCost(self.NETLIST_PATH)
# Open-sourced Implementation
self.plc_os = plc_client_os.PlacementCost(netlist_file=self.NETLIST_PATH,
macro_macro_x_spacing = 50,
macro_macro_y_spacing = 50)
assert self.plc_os.get_block_name() == self.plc_os.get_block_name()
assert self.plc_os.get_project_name() == self.plc_os.get_project_name()
assert int(self.plc_os.get_area()) == int(self.plc_os.get_area())
self.plc.set_routes_per_micron(1.0, 2.0)
self.plc_os.set_routes_per_micron(1.0, 2.0)
assert self.plc.get_routes_per_micron() == self.plc_os.get_routes_per_micron()
self.plc.set_overlap_threshold(2.0)
self.plc_os.set_overlap_threshold(2.0)
assert self.plc.get_overlap_threshold() == self.plc_os.get_overlap_threshold()
self.plc.set_congestion_smooth_range(2.0)
self.plc_os.set_congestion_smooth_range(2.0)
assert self.plc.get_congestion_smooth_range() == self.plc_os.get_congestion_smooth_range()
self.plc.set_macro_routing_allocation(3.0, 4.0)
self.plc_os.set_macro_routing_allocation(3.0, 4.0)
assert self.plc.get_macro_routing_allocation() == self.plc_os.get_macro_routing_allocation()
assert self.plc.get_macro_adjacency() == self.plc_os.get_macro_adjacency()
def test_miscellaneous(self):
# Google's Binary Executable
self.plc = plc_client_os.PlacementCost(self.NETLIST_PATH)
# Open-sourced Implementation
self.plc_os = plc_client_os.PlacementCost(netlist_file=self.NETLIST_PATH,
macro_macro_x_spacing = 50,
macro_macro_y_spacing = 50)
if __name__ == '__main__':
unittest.main()
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
# proto-file: tensorflow/core/framework/graph.proto
# proto-message: tensorflow.GraphDef
node {
name: "rst_ni"
input: "Grp_1204/Pinput"
input: "Grp_1203/Pinput"
input: "Grp_791/Pinput"
input: "Grp_729/Pinput"
input: "Grp_654/Pinput"
input: "Grp_573/Pinput"
input: "Grp_408/Pinput"
input: "Grp_347/Pinput"
input: "Grp_145/Pinput"
attr {
key: "side"
value {
placeholder: "BOTTOM"
}
}
attr {
key: "type"
value {
placeholder: "PORT"
}
}
attr {
key: "x"
value {
f: 216.676
}
}
attr {
key: "y"
value {
f: 0.1975
}
}
}
node {
name: "Grp_1204"
attr {
key: "height"
value {
f: 0.87276214
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 119.31816
}
}
attr {
key: "y"
value {
f: 46.898712
}
}
}
node {
name: "Grp_1204/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_1204"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 119.31816
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 46.898712
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_1203"
attr {
key: "height"
value {
f: 0.013427109
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 270.3795
}
}
attr {
key: "y"
value {
f: 55.56
}
}
}
node {
name: "Grp_1203/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_1203"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 270.3795
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 55.56
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_791"
attr {
key: "height"
value {
f: 5.384271
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 209.91792
}
}
attr {
key: "y"
value {
f: 13.782457
}
}
}
node {
name: "Grp_791/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_791"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 209.91792
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 13.782457
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_729"
attr {
key: "height"
value {
f: 10.0945015
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 212.21855
}
}
attr {
key: "y"
value {
f: 77.724434
}
}
}
node {
name: "Grp_729/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_729"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 212.21855
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 77.724434
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_654"
attr {
key: "height"
value {
f: 7.755499
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 225.82556
}
}
attr {
key: "y"
value {
f: 84.97305
}
}
}
node {
name: "Grp_654/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_654"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 225.82556
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 84.97305
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_573"
attr {
key: "height"
value {
f: 7.223785
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 167.68932
}
}
attr {
key: "y"
value {
f: 34.91934
}
}
}
node {
name: "Grp_573/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_573"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 167.68932
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 34.91934
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_408"
attr {
key: "height"
value {
f: 9.369437
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 144.78984
}
}
attr {
key: "y"
value {
f: 42.249233
}
}
}
node {
name: "Grp_408/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_408"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 144.78984
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 42.249233
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_347"
attr {
key: "height"
value {
f: 5.2446294
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 134.50482
}
}
attr {
key: "y"
value {
f: 72.23737
}
}
}
node {
name: "Grp_347/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_347"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 134.50482
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 72.23737
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_145"
attr {
key: "height"
value {
f: 2.1214833
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 203.82744
}
}
attr {
key: "y"
value {
f: 40.768833
}
}
}
node {
name: "Grp_145/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_145"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 203.82744
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 40.768833
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
\ No newline at end of file
# proto-file: tensorflow/core/framework/graph.proto
# proto-message: tensorflow.GraphDef
node {
name: "i_ariane/i_frontend/i_icache/sram_block_0__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2/D[1]"
attr {
key: "macro_name"
value {
placeholder: "i_ariane/i_frontend/i_icache/sram_block_0__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x"
value {
f: 297.996
}
}
attr {
key: "x_offset"
value {
f: -14.5635
}
}
attr {
key: "y"
value {
f: 86.68
}
}
attr {
key: "y_offset"
value {
f: 0.01
}
}
}
node {
name: "i_ariane/i_frontend/i_icache/sram_block_1__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2/D[1]"
attr {
key: "macro_name"
value {
placeholder: "i_ariane/i_frontend/i_icache/sram_block_1__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x"
value {
f: 298.732
}
}
attr {
key: "x_offset"
value {
f: -14.5635
}
}
attr {
key: "y"
value {
f: 67.420006
}
}
attr {
key: "y_offset"
value {
f: 0.01
}
}
}
node {
name: "i_ariane/i_frontend/i_icache/sram_block_2__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2/D[1]"
attr {
key: "macro_name"
value {
placeholder: "i_ariane/i_frontend/i_icache/sram_block_2__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x"
value {
f: 326.2815
}
}
attr {
key: "x_offset"
value {
f: -14.5635
}
}
attr {
key: "y"
value {
f: 115.664505
}
}
attr {
key: "y_offset"
value {
f: 0.01
}
}
}
node {
name: "i_ariane/i_frontend/i_icache/sram_block_3__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2/D[1]"
attr {
key: "macro_name"
value {
placeholder: "i_ariane/i_frontend/i_icache/sram_block_3__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x"
value {
f: 327.3775
}
}
attr {
key: "x_offset"
value {
f: -14.563
}
}
attr {
key: "y"
value {
f: 80.4385
}
}
attr {
key: "y_offset"
value {
f: 0.0095
}
}
}
node {
name: "Grp_11"
attr {
key: "height"
value {
f: 2.2826085
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 10.188343
}
}
attr {
key: "x"
value {
f: 326.52057
}
}
attr {
key: "y"
value {
f: 53.713078
}
}
}
node {
name: "i_ariane/i_frontend/i_icache/sram_block_0__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2"
attr {
key: "height"
value {
f: 19.26
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "width"
value {
f: 29.355
}
}
attr {
key: "x"
value {
f: 312.5595
}
}
attr {
key: "y"
value {
f: 86.67
}
}
}
node {
name: "i_ariane/i_frontend/i_icache/sram_block_1__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2"
attr {
key: "height"
value {
f: 19.26
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "width"
value {
f: 29.355
}
}
attr {
key: "x"
value {
f: 313.2955
}
}
attr {
key: "y"
value {
f: 67.41
}
}
}
node {
name: "i_ariane/i_frontend/i_icache/sram_block_2__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2"
attr {
key: "height"
value {
f: 19.26
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "width"
value {
f: 29.355
}
}
attr {
key: "x"
value {
f: 340.845
}
}
attr {
key: "y"
value {
f: 115.6545
}
}
}
node {
name: "i_ariane/i_frontend/i_icache/sram_block_3__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2"
attr {
key: "height"
value {
f: 19.26
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "width"
value {
f: 29.355
}
}
attr {
key: "x"
value {
f: 341.9405
}
}
attr {
key: "y"
value {
f: 80.429
}
}
}
node {
name: "Grp_11/Poutput_multi_5"
input: "i_ariane/i_frontend/i_icache/sram_block_0__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2/D[1]"
input: "i_ariane/i_frontend/i_icache/sram_block_1__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2/D[1]"
input: "i_ariane/i_frontend/i_icache/sram_block_2__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2/D[1]"
input: "i_ariane/i_frontend/i_icache/sram_block_3__tag_sram/mem/mem_inst_mem_256x45_256x16_0x2/D[1]"
attr {
key: "macro_name"
value {
placeholder: "Grp_11"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 326.52057
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 53.713078
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
\ No newline at end of file
# Placement file for Circuit Training
# Source input file(s) : circuit_training/environment/test_data/sample_clustered/netlist.pb.txt
# This file : circuit_training/environment/test_data/sample_clustered/initial.plc
# Date : 2022-03-13 09:30:00
# Columns : 2 Rows : 2
# Width : 600.000 Height : 600.000
# Area : 17603.53279986302
# Wirelength : 0.0
# Wirelength cost : 0.0
# Congestion cost : 0.0
# Density cost : 0.2305
# Project : circuit_training
# Block : sample_clustered
# Routes per micron, hor : 70.33 ver : 74.51
# Routes used by macros, hor : 51.79 ver : 51.79
# Smoothing factor : 2
# Overlap threshold : 0.004
#
#
#
# Counts of node types:
# HARD_MACROs : 2
# HARD_MACRO_PINs : 4
# MACROs : 3
# MACRO_PINs : 6
# PORTs : 2
# SOFT_MACROs : 1
# SOFT_MACRO_PINs : 2
# STDCELLs : 0
#
# node_index x y orientation fixed
0 0 100 - 1
1 499 499 - 1
2 125 375 N 0
3 375 375 N 0
8 170 310 N 0
# proto-file: tensorflow/core/framework/graph.proto
# proto-message: tensorflow.GraphDef
node {
name: "P0"
input: "Grp_2/Pinput"
input: "M0/P0"
attr {
key: "side"
value {
placeholder: "LEFT"
}
}
attr {
key: "type"
value {
placeholder: "PORT"
}
}
attr {
key: "x"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 100
}
}
}
node {
name: "P1"
attr {
key: "side"
value {
placeholder: "TOP"
}
}
attr {
key: "type"
value {
placeholder: "PORT"
}
}
attr {
key: "x"
value {
f: 499
}
}
attr {
key: "y"
value {
f: 499
}
}
}
node {
name: "M0"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 200
}
}
attr {
key: "y"
value {
f: 200
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M1"
attr {
key: "height"
value {
f: 40
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 100
}
}
attr {
key: "y"
value {
f: 100
}
}
attr {
key: "width"
value {
f: 40
}
}
}
node {
name: "M0/P0"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: -50
}
}
attr {
key: "y_offset"
value {
f: 50
}
}
attr {
key: "x"
value {
f: 150
}
}
attr {
key: "y"
value {
f: 250
}
}
}
node {
name: "M0/P1"
input: "Grp_2/Pinput"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 50
}
}
attr {
key: "y_offset"
value {
f: 50
}
}
attr {
key: "x"
value {
f: 250
}
}
attr {
key: "y"
value {
f: 250
}
}
}
node {
name: "M1/P0"
attr {
key: "macro_name"
value {
placeholder: "M1"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: -20
}
}
attr {
key: "y_offset"
value {
f: 20
}
}
attr {
key: "x"
value {
f: 80
}
}
attr {
key: "y"
value {
f: 120
}
}
}
node {
name: "M1/P1"
input: "P1"
attr {
key: "macro_name"
value {
placeholder: "M1"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 20
}
}
attr {
key: "y_offset"
value {
f: 20
}
}
attr {
key: "x"
value {
f: 120
}
}
attr {
key: "y"
value {
f: 120
}
}
}
node {
name: "Grp_2"
attr {
key: "height"
value {
f: 0.20625865
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 17.128008
}
}
attr {
key: "x"
value {
f: 20
}
}
attr {
key: "y"
value {
f: 45
}
}
}
node {
name: "Grp_2/Poutput_single_0"
input: "M1/P0"
attr {
key: "macro_name"
value {
placeholder: "Grp_2"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 20
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 45
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_2/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_2"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 20
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 45
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
# Placement file for Circuit Training
# Source input file(s) : circuit_training/environment/test_data/sample_clustered/netlist.pb.txt
# This file : circuit_training/environment/test_data/sample_clustered/initial.plc
# Date : 2022-03-13 09:30:00
# Columns : 2 Rows : 2
# Width : 600.000 Height : 600.000
# Area : 17603.53279986302
# Wirelength : 0.0
# Wirelength cost : 0.0
# Congestion cost : 0.0
# Density cost : 0.2305
# Project : circuit_training
# Block : sample_clustered
# Routes per micron, hor : 70.33 ver : 74.51
# Routes used by macros, hor : 51.79 ver : 51.79
# Smoothing factor : 2
# Overlap threshold : 0.004
#
#
#
# Counts of node types:
# HARD_MACROs : 2
# HARD_MACRO_PINs : 4
# MACROs : 3
# MACRO_PINs : 6
# PORTs : 2
# SOFT_MACROs : 1
# SOFT_MACRO_PINs : 2
# STDCELLs : 0
#
# node_index x y orientation fixed
0 0 100 - 1
1 499 499 - 1
2 125 375 N 0
3 375 375 N 0
8 170 310 N 0
# proto-file: tensorflow/core/framework/graph.proto
# proto-message: tensorflow.GraphDef
node {
name: "P0"
input: "Grp_2/Pinput"
input: "P1"
attr {
key: "side"
value {
placeholder: "LEFT"
}
}
attr {
key: "type"
value {
placeholder: "PORT"
}
}
attr {
key: "x"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 100
}
}
}
node {
name: "P1"
attr {
key: "side"
value {
placeholder: "TOP"
}
}
attr {
key: "type"
value {
placeholder: "PORT"
}
}
attr {
key: "x"
value {
f: 499
}
}
attr {
key: "y"
value {
f: 499
}
}
}
node {
name: "Grp_2"
attr {
key: "height"
value {
f: 0.20625865
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 17.128008
}
}
attr {
key: "x"
value {
f: 20
}
}
attr {
key: "y"
value {
f: 45
}
}
}
node {
name: "Grp_2/Poutput_single_0"
input: "P0"
attr {
key: "macro_name"
value {
placeholder: "Grp_2"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 20
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 45
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
node {
name: "Grp_2/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_2"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 20
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 45
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment