-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9249d8d
commit 4b9cee3
Showing
23,018 changed files
with
3,564,938 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
import finalfile1 | ||
import matplotlib.pyplot as plt | ||
import mplcursors | ||
import re | ||
#func= "(A&!B&!C) | (!A&B&!C) | (!A&!B&C) | (A&B&C)" | ||
|
||
# Name = list(finalfile1.Cell.dic.keys()) | ||
def Area_vs_Leakage(func, dic): | ||
Area = [] | ||
Leakage = [] | ||
Function = [] | ||
rise_delay = [] | ||
area_list= [] | ||
leakage_list=[] | ||
name_list= [] | ||
delay =[] | ||
fall_delay=[] | ||
name_list= [] | ||
|
||
Name = list(dic.keys()) | ||
for i in dic.keys(): | ||
Area.append(dic[i]["area"]) | ||
Leakage.append(dic[i]["leakage"]) | ||
Function.append(dic[i]["function"]) | ||
|
||
index_pos_list = [ i for i in range(len(Function)) if Function[i] == func ] | ||
|
||
|
||
for i in index_pos_list: | ||
area_list.append(Area[i]) | ||
leakage_list.append(Leakage[i]) | ||
name_list.append(Name[i]) | ||
x = area_list | ||
y = leakage_list | ||
plt.plot(x, y,c="red", marker='o', linestyle = 'None') | ||
plt.title('Leakage vs Area', fontsize=14) | ||
plt.xlabel('Area(um)', fontsize=14) | ||
plt.ylabel('Leakage(nW)', fontsize=14) | ||
mplcursors.cursor(hover=True) | ||
|
||
for i,j,k in zip(area_list,leakage_list,name_list): | ||
|
||
if "sky" in k: | ||
plt.text(i,j,k.strip("sky130_fd_sc_hd__")) | ||
|
||
plt.show() | ||
|
||
|
||
def plot_area_vs_rise_delay(func, dic): | ||
Area = [] | ||
Leakage = [] | ||
Function = [] | ||
rise_delay = [] | ||
area_list= [] | ||
leakage_list=[] | ||
name_list= [] | ||
delay =[] | ||
fall_delay=[] | ||
name_list= [] | ||
Name = list(dic.keys()) | ||
|
||
for i in dic.keys(): | ||
rise_delay.append(dic[i]["Max Delay Value Rise"]) | ||
Area.append(dic[i]["area"]) | ||
Function.append(dic[i]["function"]) | ||
index_pos_list = [ i for i in range(len(Function)) if Function[i] == func ] | ||
for i in index_pos_list: | ||
area_list.append(Area[i]) | ||
delay.append(rise_delay[i]) | ||
name_list.append(Name[i]) | ||
|
||
x = area_list | ||
y = delay | ||
plt.plot(x, y, linestyle='None',c="red", marker='o') | ||
plt.title('Area vs Rise Delay', fontsize=14) | ||
plt.xlabel('Area(um)', fontsize=14) | ||
plt.ylabel('Rise_Delay(ns) ', fontsize=14) | ||
mplcursors.cursor(hover=True) | ||
|
||
for i,j,k in zip(area_list,delay,name_list): | ||
|
||
if "sky" in k: | ||
plt.text(i,j,k.strip("sky130_fd_sc_hd__")) | ||
|
||
plt.show() | ||
|
||
def plot_area_vs_fall_delay(func, dic): | ||
|
||
Area = [] | ||
Leakage = [] | ||
Function = [] | ||
rise_delay = [] | ||
area_list= [] | ||
leakage_list=[] | ||
name_list= [] | ||
delay =[] | ||
fall_delay=[] | ||
|
||
|
||
Name = list(dic.keys()) | ||
for i in dic.keys(): | ||
fall_delay.append(dic[i]["Max Delay Value Fall"]) | ||
Area.append(dic[i]["area"]) | ||
Function.append(dic[i]["function"]) | ||
index_pos_list = [ i for i in range(len(Function)) if Function[i] == func ] | ||
for i in index_pos_list: | ||
area_list.append(Area[i]) | ||
delay.append(fall_delay[i]) | ||
name_list.append(Name[i]) | ||
|
||
x = area_list | ||
y = delay | ||
plt.plot(x, y, linestyle='None',c="red", marker='o') | ||
plt.title('Area vs Fall Delay', fontsize=14) | ||
plt.xlabel('Area(um)', fontsize=14) | ||
plt.ylabel('Fall_Delay(ns) ', fontsize=14) | ||
mplcursors.cursor(hover=True) | ||
|
||
for i,j,k in zip(area_list,delay,name_list): | ||
|
||
if "sky" in k: | ||
plt.text(i,j,k.strip("sky130_fd_sc_hd__")) | ||
|
||
plt.show() | ||
|
||
|
||
def plot_leakage_vs_fall_delay(func, dic): | ||
Area = [] | ||
Leakage = [] | ||
Function = [] | ||
rise_delay = [] | ||
area_list= [] | ||
leakage_list=[] | ||
name_list= [] | ||
delay =[] | ||
fall_delay=[] | ||
Name = list(dic.keys()) | ||
for i in dic.keys(): | ||
Leakage.append(dic[i]["leakage"]) | ||
Function.append(dic[i]["function"]) | ||
fall_delay.append(dic[i]["Max Delay Value Fall"]) | ||
|
||
index_pos_list = [ i for i in range(len(Function)) if Function[i] == func ] | ||
for i in index_pos_list: | ||
leakage_list.append(Leakage[i]) | ||
delay.append(fall_delay[i]) | ||
name_list.append(Name[i]) | ||
x = leakage_list | ||
y = delay | ||
plt.plot(x, y, linestyle='None',c="red", marker='o') | ||
plt.title('Leakage vs Fall Delay', fontsize=14) | ||
plt.xlabel('Leakage(nW)', fontsize=14) | ||
plt.ylabel('Fall_Delay(ns) ', fontsize=14) | ||
mplcursors.cursor(hover=True) | ||
|
||
for i,j,k in zip(leakage_list,delay,name_list): | ||
|
||
if "sky" in k: | ||
plt.text(i,j,k.strip("sky130_fd_sc_hd__")) | ||
|
||
|
||
plt.show() | ||
def plot_leakage_vs_rise_delay(func, dic): | ||
Area = [] | ||
Leakage = [] | ||
Function = [] | ||
rise_delay = [] | ||
area_list= [] | ||
leakage_list=[] | ||
name_list= [] | ||
delay =[] | ||
fall_delay=[] | ||
Name = list(dic.keys()) | ||
for i in dic.keys(): | ||
Leakage.append(dic[i]["leakage"]) | ||
Function.append(dic[i]["function"]) | ||
rise_delay.append(dic[i]["Max Delay Value Rise"]) | ||
|
||
index_pos_list = [ i for i in range(len(Function)) if Function[i] == func ] | ||
for i in index_pos_list: | ||
leakage_list.append(Leakage[i]) | ||
delay.append(rise_delay[i]) | ||
name_list.append(Name[i]) | ||
x = leakage_list | ||
y = delay | ||
plt.plot(x, y, linestyle='None',c="red", marker='o') | ||
plt.title('Leakage vs Rise Delay', fontsize=14) | ||
plt.xlabel('Leakage(nW)', fontsize=14) | ||
plt.ylabel('Rise_Delay(ns) ', fontsize=14) | ||
mplcursors.cursor(hover=True) | ||
|
||
for i,j,k in zip(leakage_list,delay,name_list): | ||
if "sky" in k: | ||
plt.text(i,j,k.strip("sky130_fd_sc_hd__")) | ||
|
||
plt.show() | ||
|
||
|
||
def delay_vs_output_cap_graph(name_of_cell,cap_fall,cap_rise,del_fall,del_rise): | ||
name_list= [] | ||
print("hello") | ||
f = plt.figure() | ||
print(plt.title(name_of_cell)) | ||
f.set_figwidth(6) | ||
f.set_figheight(6) | ||
print(cap_fall,cap_rise) | ||
plt.plot(cap_fall,del_fall,color='blue',label='Cell Fall',marker='o',linestyle='dashed',markersize=12) | ||
plt.plot(cap_rise,del_rise,color='green',label='Cell Rise',marker='o',linestyle='dashed',markersize=12) | ||
plt.xlabel('Output Capacitance') | ||
plt.ylabel('Delay') | ||
mplcursors.cursor(hover=True) | ||
|
||
plt.legend(['CELL FALL','CELL RISE'],loc='upper left') | ||
plt.show() | ||
|
||
def delay_vs_input_trans_graph(name_of_cell,tran_fall,tran_rise,del_fall,del_rise): | ||
|
||
f = plt.figure() | ||
plt.title(name_of_cell) | ||
f.set_figwidth(6) | ||
f.set_figheight(6) | ||
plt.plot(tran_fall,del_fall,color='blue',label='Cell Fall',marker='o',linestyle='dashed',markersize=12) | ||
plt.plot(tran_rise,del_rise,color='green',label='Cell Rise',marker='o',linestyle='dashed',markersize=12) | ||
plt.xlabel('Input Transition') | ||
plt.ylabel('Delay') | ||
mplcursors.cursor(hover=True) | ||
|
||
plt.legend(['CELL FALL','CELL RISE'],loc='upper left') | ||
plt.show() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
from glob import glob | ||
import eel | ||
from eel import start, init | ||
from changeIndex import changeIndex | ||
from icecream import ic | ||
from across_gate_analysis import delay_vs_output_cap_graph, delay_vs_input_trans_graph | ||
if __name__ == "__main__": | ||
init("web") | ||
|
||
# global dic | ||
# dic = {} | ||
|
||
|
||
@eel.expose | ||
def keysLeKayAo(): | ||
file = open("extract_results_ref.json") | ||
import json | ||
global dic | ||
global dic_t | ||
dic = json.loads(file.read()) | ||
file.close() | ||
file = open("extract_results_tar.json") | ||
targetContent = file.read() | ||
if targetContent != "": | ||
dic_t = json.loads(targetContent) | ||
else: | ||
dic_t = {} | ||
file.close() | ||
ic(list(dic.keys())) | ||
eel.setCells(list(dic.keys())) | ||
eel.setCells2(list(dic_t.keys())) | ||
funcs = [dic[v]["function"] for v in list(dic.keys())] | ||
funcs = list(set(funcs)) | ||
eel.setFuncs(funcs) | ||
funcs2 = [dic_t[v]["function"] for v in list(dic_t.keys())] | ||
funcs2 = list(set(funcs2)) | ||
eel.setFuncs2(funcs2) | ||
file_file = open("files.txt") | ||
fileNames = file_file.read().split("\n") | ||
eel.changeFileNamess( fileNames[0], fileNames[1] ) | ||
file_file.close() | ||
|
||
@eel.expose | ||
def bringCellDetailsPaleez(cell): | ||
eel.takeCellDetailsOK(cell,dic[cell]["function"], dic[cell]["area"], dic[cell]["leakage"], dic[cell]["pin_name"]) | ||
|
||
@eel.expose | ||
def bringCellDetailsPaleez2(cell): | ||
eel.takeCellDetailsOK2(cell,dic_t[cell]["function"], dic_t[cell]["area"], dic_t[cell]["leakage"], dic_t[cell]["pin_name"]) | ||
|
||
@eel.expose | ||
def bringPinDetailsPaleez(celloo): | ||
cell,pin = celloo.split("-") | ||
indexOfPin = dic[cell]["pin_name"].index(pin) | ||
eel.takePinDetailsOK(dic[cell]["max_transition"][indexOfPin], dic[cell]["max_capacitance"][indexOfPin]) | ||
|
||
@eel.expose | ||
def bringPinDetailsPaleez2(celloo): | ||
cell,pin = celloo.split("-") | ||
indexOfPin = dic_t[cell]["pin_name"].index(pin) | ||
eel.takePinDetailsOK2(dic_t[cell]["max_transition"][indexOfPin], dic_t[cell]["max_capacitance"][indexOfPin]) | ||
|
||
|
||
@eel.expose | ||
def doFuncThing(func,typee, name_of_file): | ||
if name_of_file == "ref": | ||
obj = dic | ||
elif name_of_file == "tar": | ||
obj = dic_t | ||
from across_gate_analysis import Area_vs_Leakage, plot_area_vs_rise_delay, plot_area_vs_fall_delay, plot_leakage_vs_fall_delay, plot_leakage_vs_rise_delay | ||
if typee == "avd": | ||
Area_vs_Leakage(func, obj) | ||
elif typee == "avrd": | ||
plot_area_vs_rise_delay(func, obj) | ||
elif typee == "avfd": | ||
plot_area_vs_fall_delay(func, obj) | ||
elif typee == "lvfd": | ||
plot_leakage_vs_fall_delay(func, obj) | ||
elif typee == "lvrd": | ||
plot_leakage_vs_rise_delay(func, obj) | ||
|
||
|
||
@eel.expose | ||
def MakeGraphPlease(graphType, name_of_cell, name_of_file): | ||
ic(graphType, name_of_cell) | ||
if name_of_file == "ref": | ||
obj = dic | ||
elif name_of_file == "tar": | ||
obj = dic_t | ||
cap_fall = obj[name_of_cell]["Output Capacitance Fall"] | ||
cap_rise = obj[name_of_cell]["Output Capacitance Rise"] | ||
del_fall = obj[name_of_cell]["Delay Fall"] | ||
del_rise = obj[name_of_cell]["Delay Rise"] | ||
tran_fall = obj[name_of_cell]['Input Transition Fall'] | ||
tran_rise = obj[name_of_cell]['Input Transition Rise'] | ||
if graphType == "mtd": | ||
delay_vs_input_trans_graph(name_of_cell,tran_fall,tran_rise,del_fall,del_rise) | ||
elif graphType == "mcd": | ||
delay_vs_output_cap_graph(name_of_cell,cap_fall,cap_rise,del_fall,del_rise) | ||
|
||
@eel.expose | ||
def goToHome(): | ||
eel.finishLoading() | ||
import os | ||
os.system("./startmain.sh") | ||
|
||
|
||
changeIndex("box") | ||
|
||
|
||
|
||
start('box.html', mode='custom', cmdline_args=['node_modules/electron/dist/electron', '.'], port=8008) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
def changeIndex(whichOne): | ||
file = open("index.js", "r") | ||
contents = file.readlines() | ||
file.close() | ||
|
||
if whichOne == "box": | ||
contents[11] = "win.loadURL('http://localhost:8008/box.html');\n" | ||
elif whichOne == "mainpage": | ||
contents[11] = "win.loadURL('http://localhost:8007/mainpage.html');\n" | ||
|
||
|
||
filW = open("index.js", "w") | ||
filW.write("".join(contents)) | ||
filW.close() | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.