Commit a9e01189 by Dinple

updates

parent 3b030ffd
...@@ -19,4 +19,16 @@ CodeElements/EvalCT/saved_policy/run_00/111/train/* ...@@ -19,4 +19,16 @@ CodeElements/EvalCT/saved_policy/run_00/111/train/*
CodeElements/EvalCT/saved_policy/run_00/111/snapshot*.plc CodeElements/EvalCT/saved_policy/run_00/111/snapshot*.plc
CodeElements/EvalCT/saved_policy/run_00/111/rl*.plc CodeElements/EvalCT/saved_policy/run_00/111/rl*.plc
CodeElements/EvalCT/saved_policy/run_os_64128_g657_ub5_nruns10_c5_r3_v3_rc1 CodeElements/EvalCT/saved_policy/run_os_64128_g657_ub5_nruns10_c5_r3_v3_rc1
CodeElements/epoch_*.plc
CodeElements/FDPlacement/test/*
CodeElements/Plc_client/placement_util*.py
CodeElements/StatTest/test/ariane/*_vs_*
CodeElements/StatTest/test/flow2_68_1.3_ct/*
CodeElements/StatTest/test/ariane/*.plc
CodeElements/*/__pycache__/*
CodeElements/*.png
CodeElements/StatTest/*.csv
CodeElements/os.txt
CodeElements/EvalCT/test/ariane/*.plc
CodeElements/FDPlacement/fd.txt
CodeElements/StatTest/test/ariane/*.pb.txt
...@@ -79,6 +79,18 @@ Example: ...@@ -79,6 +79,18 @@ Example:
--marv 5\ --marv 5\
--smooth 2 --smooth 2
$ python3 -m Plc_client.plc_client_os_test --netlist ./Plc_client/test/ariane_fd/ariane.pb.txt\
--plc ./Plc_client/test/ariane_fd/ariane.plc\
--width 1599.99\
--height 1598.8\
--col 27\
--row 23\
--rpmh 70.330\
--rpmv 74.510\
--marh 51.790\
--marv 51.790\
--smooth 2
Todo: Todo:
* Clean up code * Clean up code
* Extract argument from command line * Extract argument from command line
...@@ -247,6 +259,7 @@ class PlacementCostTest(): ...@@ -247,6 +259,7 @@ class PlacementCostTest():
self.plc_os.set_canvas_size(self.CANVAS_WIDTH, self.CANVAS_HEIGHT) self.plc_os.set_canvas_size(self.CANVAS_WIDTH, self.CANVAS_HEIGHT)
self.plc_os.set_placement_grid(self.GRID_COL, self.GRID_ROW) self.plc_os.set_placement_grid(self.GRID_COL, self.GRID_ROW)
# show canvas # show canvas
self.plc_os.make_soft_macros_square()
self.plc_os.display_canvas(annotate=False, amplify=False) self.plc_os.display_canvas(annotate=False, amplify=False)
...@@ -854,6 +867,42 @@ class PlacementCostTest(): ...@@ -854,6 +867,42 @@ class PlacementCostTest():
self.plc_util_os.display_canvas(annotate=False) self.plc_util_os.display_canvas(annotate=False)
def test_fd(self):
print("############################ TEST GOOGLE's FD Placer ############################")
self.plc_util = placement_util.create_placement_cost(
plc_client=plc_client,
netlist_file=self.NETLIST_PATH,
init_placement=self.PLC_PATH
)
self.plc_util_os = placement_util.create_placement_cost(
plc_client=plc_client_os,
netlist_file=self.NETLIST_PATH,
init_placement=self.PLC_PATH
)
self.plc_util.set_routes_per_micron(self.RPMH, self.RPMV)
self.plc_util_os.set_routes_per_micron(self.RPMH, self.RPMV)
self.plc_util.set_macro_routing_allocation(self.MARH, self.MARV)
self.plc_util_os.set_macro_routing_allocation(self.MARH, self.MARV)
self.plc_util.set_congestion_smooth_range(self.SMOOTH)
self.plc_util_os.set_congestion_smooth_range(self.SMOOTH)
self.plc_util.set_canvas_size(self.CANVAS_WIDTH, self.CANVAS_HEIGHT)
self.plc_util.set_placement_grid(self.GRID_COL, self.GRID_ROW)
self.plc_util_os.set_canvas_size(self.CANVAS_WIDTH, self.CANVAS_HEIGHT)
self.plc_util_os.set_placement_grid(self.GRID_COL, self.GRID_ROW)
placement_util.fd_placement_schedule(self.plc_util)
for node_index in placement_util.nodes_of_types(self.plc_util, ['MACRO']):
x_pos, y_pos = self.plc_util.get_node_location(node_index)
self.plc_util_os.set_soft_macro_position(node_index, x_pos, y_pos)
self.plc_util_os.display_canvas(annotate=False, amplify=False)
def test_environment(self): def test_environment(self):
print("############################ TEST ENVIRONMENT ############################") print("############################ TEST ENVIRONMENT ############################")
env = environment.CircuitEnv( env = environment.CircuitEnv(
...@@ -942,6 +991,8 @@ class PlacementCostTest(): ...@@ -942,6 +991,8 @@ class PlacementCostTest():
placement_util.fd_placement_schedule(self.plc_util_os) placement_util.fd_placement_schedule(self.plc_util_os)
self.plc_util_os.display_canvas(annotate=False, amplify=False)
def parse_flags(argv): def parse_flags(argv):
parser = argparse_flags.ArgumentParser( parser = argparse_flags.ArgumentParser(
description='An argparse + app.run example') description='An argparse + app.run example')
...@@ -1007,9 +1058,10 @@ def main(args): ...@@ -1007,9 +1058,10 @@ def main(args):
# PCT.test_place_node() # PCT.test_place_node()
# PCT.test_miscellaneous() # PCT.test_miscellaneous()
# PCT.test_observation_extractor() # PCT.test_observation_extractor()
PCT.view_canvas() # PCT.view_canvas()
# PCT.test_fd()
# PCT.test_environment() # PCT.test_environment()
# PCT.test_fd_placement() PCT.test_fd_placement()
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -10,7 +10,22 @@ import pandas as pd ...@@ -10,7 +10,22 @@ import pandas as pd
SHEET_ID = '1dtG4uHzdw-Lfe_Vcm5uBRNjjxXNA4gmVarTr86hjYVo' SHEET_ID = '1dtG4uHzdw-Lfe_Vcm5uBRNjjxXNA4gmVarTr86hjYVo'
SHEET_NAME = 'Proxy_Cost_Comparison' SHEET_NAME = 'Proxy_Cost_Comparison'
url = f'https://docs.google.com/spreadsheets/d/{SHEET_ID}/gviz/tq?tqx=out:csv&sheet={SHEET_NAME}' url = f'https://docs.google.com/spreadsheets/d/{SHEET_ID}/gviz/tq?tqx=out:csv&sheet={SHEET_NAME}'
df = pd.read_csv(url) proxy_df = pd.read_csv(url)
print(df.head()) proxy_df = proxy_df.loc[:, ~proxy_df.isnull().all()]
print(proxy_df.columns)
proxy_df['postCTS_Congestion (V)'] = proxy_df['postCTS_Congestion (V)'].str.rstrip('%').astype('float') / 100.0
# compute correlation between postRouteOpt_std_cell_area and density_cost
print("postRoute_std_cell_area VS. Density_Cost",
proxy_df["postRoute_std_cell_area (um^2)"].corr(proxy_df["Density_Cost"]))
print("postRouteOpt_std_cell_area VS. Density_Cost",
proxy_df["postRouteOpt_std_cell_area (um^2)"].corr(proxy_df["Density_Cost"]))
# compute correlation between ??? # compute correlation between postRouteOpt_wirelength (um) and wirelength_cost
\ No newline at end of file print("postRoute_wirelength VS. Wirelength_Cost",
proxy_df["postRoute_wirelength (um)"].corr(proxy_df["Wirelength_Cost"]))
print("postRouteOpt_wirelength VS. Wirelength_Cost",
proxy_df["postRouteOpt_wirelength (um)"].corr(proxy_df["Wirelength_Cost"]))
# compute correlation between postCTS_Congestion and congestion_cost
print("postCTS_Congestion VS. Congestion_Cost",
proxy_df["postCTS_Congestion (V)"].corr(proxy_df["Congestion_Cost"]))
\ No newline at end of file
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