
Лабы 1-2 / ВЯПиВ Лаб 1-2 Колесников К ИВТ-15М
.docxЛабораторная работа № 1-2
«Расчет задержек библиотечных элементов с использованием языка высокого уровня Python3»
1) Написать скрипт, рассчитывающий выходную задержку и время выходного фронта в зависимости от нагрузки и времени входного фронта в соответствии с вариантом. В случае, если значение выходной емкости и времени входного фронта не совпадают с индексными значениями, округлить их до ближайшего индексного значения.
2) Добавить в существующий скрипт расчет с использованием билинейной интерполяции.
Вариант 4: INV, p
Код:
import numpy as np
import pandas as pd
import re
import sys
flag_sit = 0;
flag_coc = 0;
flag_inv = 0;
flag_capacitance = 0;
flag_cell_fall = 0;
flag_cell_rise = 0;
flag_fall_transition = 0;
flag_rise_transition = 0;
capacitance = 0.0
data_cell_fall = []
data_cell_rise = []
data_fall_transition = []
data_rise_trainsition = []
with open('lab1.lib', 'r', encoding='utf-8') as infile:
for line in infile:
# print(line)
# обработка флагов
if (flag_sit):
# строка обрабатывается
sit = line;
# флаг сбрасывается
flag_sit = 0;
if (flag_coc):
coc = line
flag_coc = 0;
if (flag_inv):
if(flag_capacitance):
capacitance = float(line);
flag_capacitance = 0;
if(flag_cell_fall):
if(line.strip()!=""):
data_cell_fall.append(line)
else:
flag_cell_fall = 0
if(flag_cell_rise):
if(line.strip()!=""):
data_cell_rise.append(line)
else:
flag_cell_rise = 0
if(flag_fall_transition):
if(line.strip()!=""):
data_fall_transition.append(line)
else:
flag_fall_transition = 0
if(flag_rise_transition):
if(line.strip()!=""):
data_rise_trainsition.append(line)
else:
flag_rise_transition = 0
flag_inv = 0
# выставление флагов
if (re.match('string_input_transtion', line)):
# if (line == 'string_input_transtion \n'):
flag_sit = 1;
if (re.match('column_output_capacitance', line)):
flag_coc = 1;
if (re.match('INV', line)):
flag_inv = 1;
if(flag_inv):
if (re.match('capacitance', line)):
flag_capacitance = 1;
if (re.match('cell_fall', line)):
flag_cell_fall = 1;
if (re.match('cell_rise', line)):
flag_cell_rise = 1;
if (re.match('fall_transition', line)):
flag_fall_transition = 1;
if (re.match('rise_transition', line)):
flag_rise_transition = 1;
sit = sit.replace("\n", "").split(",")
coc = coc.replace("\n", "").split(",")
df_cell_fall = pd.DataFrame(columns = coc)
df_cell_rise = pd.DataFrame(columns = coc)
df_fall_transition = pd.DataFrame(columns = coc)
df_rise_transition = pd.DataFrame(columns = coc)
for i in data_cell_fall:
df_cell_fall.loc[len(df_cell_fall.index)] = i.replace("\n", "").split(",")
for i in data_cell_rise:
df_cell_rise.loc[len(df_cell_rise.index)] = i.replace("\n", "").split(",")
for i in data_fall_transition:
df_fall_transition.loc[len(df_fall_transition.index)] = i.replace("\n", "").split(",")
for i in data_rise_trainsition:
df_rise_transition.loc[len(df_rise_transition.index)] = i.replace("\n", "").split(",")
df_cell_fall.index = sit[0:len(df_cell_fall.index)]
df_cell_rise.index = sit[0:len(df_cell_rise.index)]
df_fall_transition.index = sit[0:len(df_fall_transition.index)]
df_rise_transition.index = sit[0:len(df_rise_transition.index)]
output_capacitance = float(input("Введите нагрузку: "))
input_transition = float(input("Введите входную задержку: "))
y1 = 0.0
y2 = 0.0
x1 = 0.0
x2 = 0.0
it_index1 = 0
it_index2 = 0
oc_index1 = 0
oc_index2 = 0
if(float(sit[0]) > input_transition):
print("Ошибка: введенное значение входной задержки слишком мало")
sys.exit(1);
if(float(coc[0]) > output_capacitance):
print("Ошибка: введенное значение выходной нагрузки слишком мало")
sys.exit(1);
it_diff = abs(float(sit[0]) - input_transition)
oc_diff = abs(float(coc[0]) - output_capacitance)
for i in coc[1:]:
if( abs(float(i) - output_capacitance) < oc_diff):
oc_diff = abs(float(i) - output_capacitance)
oc_index1 = oc_index1 + 1
else:
x1 = float(coc[oc_index1])
x2 = float(i)
oc_index2 = oc_index1 + 1
break
if(oc_index1+1 == len(coc)):
print("Ошибка: введенное значение выходной нагрузки слишком велико")
sys.exit(1);
for i in sit[1:]:
if( abs(float(i) - input_transition) < it_diff):
it_diff = abs(float(i) - input_transition)
it_index1 = it_index1 + 1
else:
y1 = float(sit[it_index1])
y2 = float(i)
it_index2 = it_index1 + 1
break
if(it_index1+1 == len(sit)):
print("Ошибка: введенное значение входной задержки слишком велико")
sys.exit(1);
print("Расчет выходной задержки:")
Q11_delay = df_cell_rise.iat[it_index1,oc_index1]
Q12_delay = df_cell_rise.iat[it_index2,oc_index1]
Q21_delay = df_cell_rise.iat[it_index1,oc_index2]
Q22_delay = df_cell_rise.iat[it_index2,oc_index2]
print("x1: "+str(x1))
print("x2: "+str(x2))
print("y1: "+str(y1))
print("y2: "+str(y2))
print("Q11: "+Q11_delay)
print("Q12: "+Q12_delay)
print("Q21: "+Q21_delay)
print("Q22: "+Q22_delay)
f_R1_delay = (x2 - output_capacitance)/(x2 - x1)*float(Q11_delay) + (output_capacitance - x1)/(x2 - x1)*float(Q21_delay)
print("f(R1): "+ str(f_R1_delay))
f_R2_delay = (x2 - output_capacitance)/(x2 - x1)*float(Q12_delay) + (output_capacitance - x1)/(x2 - x1)*float(Q22_delay)
print("f(R2): "+ str(f_R2_delay))
f_P_delay = (y2 - input_transition)/(y2 - y1)*f_R1_delay + (input_transition - y1)/(y2 - y1)*f_R2_delay
print("f(P): "+ str(f_P_delay))
print("Расчет времени выходного фронта:")
Q11_transition = df_rise_transition.iat[it_index1,oc_index1]
Q12_transition = df_rise_transition.iat[it_index2,oc_index1]
Q21_transition = df_rise_transition.iat[it_index1,oc_index2]
Q22_transition = df_rise_transition.iat[it_index2,oc_index2]
print("x1: "+str(x1))
print("x2: "+str(x2))
print("y1: "+str(y1))
print("y2: "+str(y2))
print("Q11: "+Q11_transition)
print("Q12: "+Q12_transition)
print("Q21: "+Q21_transition)
print("Q22: "+Q22_transition)
f_R1_transition = (x2 - output_capacitance)/(x2 - x1)*float(Q11_transition) + (output_capacitance - x1)/(x2 - x1)*float(Q21_transition)
print("f(R1): "+ str(f_R1_transition))
f_R2_transition = (x2 - output_capacitance)/(x2 - x1)*float(Q12_transition) + (output_capacitance - x1)/(x2 - x1)*float(Q22_transition)
print("f(R2): "+ str(f_R2_transition))
f_P_transition = (y2 - input_transition)/(y2 - y1)*f_R1_transition + (input_transition - y1)/(y2 - y1)*f_R2_transition
print("f(P): "+ str(f_P_transition))
Результат:
Введите нагрузку: 12.7
Введите входную задержку: 15.1
Расчет выходной задержки:
x1: 12.6117
x2: 25.1487
y1: 15.0
y2: 30.0
Q11: 12.874671
Q12: 16.729628
Q21: 21.321752
Q22: 25.164040
f(R1): 12.934165077713965
f(R2): 16.789032848017868
f(P): 12.959864196182657
Расчет времени выходного фронта:
x1: 12.6117
x2: 25.1487
y1: 15.0
y2: 30.0
Q11: 18.110970
Q12: 21.171462
Q21: 33.766792
Q22: 35.875921
f(R1): 18.221236338246786
f(R2): 21.275027743774427
f(P): 18.24159494761697
3) Переписать код, оформив класс Gate с методами get_delay(edge, tr_in, c_out), get_transition(edge, tr_in, c_out), propagate(edge, tr_in, c_out).
Код:
class Gate:
capacitance = 0.0
sit = []
coc = []
df_cell_fall = pd.DataFrame()
df_cell_rise = pd.DataFrame()
df_fall_transition = pd.DataFrame()
df_rise_transition = pd.DataFrame()
def __init__(self,name):
flag_sit = 0;
flag_coc = 0;
flag_inv = 0;
flag_capacitance = 0;
flag_cell_fall = 0;
flag_cell_rise = 0;
flag_fall_transition = 0;
flag_rise_transition = 0;
data_cell_fall = []
data_cell_rise = []
data_fall_transition = []
data_rise_trainsition = []
with open('lab1.lib', 'r', encoding='utf-8') as infile:
for line in infile:
# print(line)
# обработка флагов
if (flag_sit):
# строка обрабатывается
sit = line;
# флаг сбрасывается
flag_sit = 0;
if (flag_coc):
coc = line
flag_coc = 0;
if (flag_inv):
if(flag_capacitance):
self.capacitance = float(line);
flag_capacitance = 0;
if(flag_cell_fall):
if(line.strip()!=""):
data_cell_fall.append(line)
else:
flag_cell_fall = 0
if(flag_cell_rise):
if(line.strip()!=""):
data_cell_rise.append(line)
else:
flag_cell_rise = 0
if(flag_fall_transition):
if(line.strip()!=""):
data_fall_transition.append(line)
else:
flag_fall_transition = 0
if(flag_rise_transition):
if(line.strip()!=""):
data_rise_trainsition.append(line)
else:
flag_rise_transition = 0
flag_inv = 0
# выставление флагов
if (re.match('string_input_transtion', line)):
# if (line == 'string_input_transtion \n'):
flag_sit = 1;
if (re.match('column_output_capacitance', line)):
flag_coc = 1;
if (re.match(name, line)):
flag_inv = 1;
if(flag_inv):
if (re.match('capacitance', line)):
flag_capacitance = 1;
if (re.match('cell_fall', line)):
flag_cell_fall = 1;
if (re.match('cell_rise', line)):
flag_cell_rise = 1;
if (re.match('fall_transition', line)):
flag_fall_transition = 1;
if (re.match('rise_transition', line)):
flag_rise_transition = 1;
self.sit = sit.replace("\n", "").split(",")
self.coc = coc.replace("\n", "").split(",")
sit = sit.replace("\n", "").split(",")
coc = coc.replace("\n", "").split(",")
self.df_cell_fall = pd.DataFrame(columns = coc)
self.df_cell_rise = pd.DataFrame(columns = coc)
self.df_fall_transition = pd.DataFrame(columns = coc)
self.df_rise_transition = pd.DataFrame(columns = coc)
for i in data_cell_fall:
self.df_cell_fall.loc[len(self.df_cell_fall.index)] = i.replace("\n", "").split(",")
for i in data_cell_rise:
self.df_cell_rise.loc[len(self.df_cell_rise.index)] = i.replace("\n", "").split(",")
for i in data_fall_transition:
self.df_fall_transition.loc[len(self.df_fall_transition.index)] = i.replace("\n", "").split(",")
for i in data_rise_trainsition:
self.df_rise_transition.loc[len(self.df_rise_transition.index)] = i.replace("\n", "").split(",")
self.df_cell_fall.index = sit[0:len(self.df_cell_fall.index)]
self.df_cell_rise.index = sit[0:len(self.df_cell_rise.index)]
self.df_fall_transition.index = sit[0:len(self.df_fall_transition.index)]
self.df_rise_transition.index = sit[0:len(self.df_rise_transition.index)]
def get_delay(self,edge, tr_in, c_out):
y1 = 0.0
y2 = 0.0
x1 = 0.0
x2 = 0.0
it_index1 = 0
it_index2 = 0
oc_index1 = 0
oc_index2 = 0
if(float(self.sit[0]) > tr_in):
print("Ошибка: введенное значение входной задержки слишком мало")
return -1;
if(float(self.coc[0]) > c_out):
print("Ошибка: введенное значение выходной нагрузки слишком мало")
return -1;
it_diff = abs(float(self.sit[0]) - tr_in)
oc_diff = abs(float(self.coc[0]) - c_out)
for i in self.coc[1:]:
if( abs(float(i) - c_out) < oc_diff):
oc_diff = abs(float(i) - c_out)
oc_index1 = oc_index1 + 1
else:
x1 = float(self.coc[oc_index1])
x2 = float(i)
oc_index2 = oc_index1 + 1
break
if(oc_index1+1 == len(self.coc)):
print("Ошибка: введенное значение выходной нагрузки слишком велико")
return -1;
for i in self.sit[1:]:
if( abs(float(i) - tr_in) < it_diff):
it_diff = abs(float(i) - tr_in)
it_index1 = it_index1 + 1
else:
y1 = float(self.sit[it_index1])
y2 = float(i)
it_index2 = it_index1 + 1
break
if(it_index1+1 == len(self.sit)):
print("Ошибка: введенное значение входной задержки слишком велико")
return -1;
if(edge=='p'):
Q11_delay = self.df_cell_rise.iat[it_index1,oc_index1]
Q12_delay = self.df_cell_rise.iat[it_index2,oc_index1]
Q21_delay = self.df_cell_rise.iat[it_index1,oc_index2]
Q22_delay = self.df_cell_rise.iat[it_index2,oc_index2]
if(edge=='n'):
Q11_delay = self.df_cell_fall.iat[it_index1,oc_index1]
Q12_delay = self.df_cell_fall.iat[it_index2,oc_index1]
Q21_delay = self.df_cell_fall.iat[it_index1,oc_index2]
Q22_delay = self.df_cell_fall.iat[it_index2,oc_index2]
f_R1_delay = (x2 - c_out)/(x2 - x1)*float(Q11_delay) + (c_out - x1)/(x2 - x1)*float(Q21_delay)
f_R2_delay = (x2 - c_out)/(x2 - x1)*float(Q12_delay) + (c_out - x1)/(x2 - x1)*float(Q22_delay)
f_P_delay = (y2 - tr_in)/(y2 - y1)*f_R1_delay + (tr_in - y1)/(y2 - y1)*f_R2_delay
return f_P_delay
def get_transition(self,edge, tr_in, c_out):
y1 = 0.0
y2 = 0.0
x1 = 0.0
x2 = 0.0
it_index1 = 0
it_index2 = 0
oc_index1 = 0
oc_index2 = 0
if(float(self.sit[0]) > tr_in):
print("Ошибка: введенное значение входной задержки слишком мало")
return -1;
if(float(self.coc[0]) > c_out):
print("Ошибка: введенное значение выходной нагрузки слишком мало")
return -1;
it_diff = abs(float(self.sit[0]) - tr_in)
oc_diff = abs(float(self.coc[0]) - c_out)
for i in self.coc[1:]:
if( abs(float(i) - c_out) < oc_diff):
oc_diff = abs(float(i) - c_out)
oc_index1 = oc_index1 + 1
else:
x1 = float(self.coc[oc_index1])
x2 = float(i)
oc_index2 = oc_index1 + 1
break
if(oc_index1+1 == len(self.coc)):
print("Ошибка: введенное значение выходной нагрузки слишком велико")
return -1;
for i in self.sit[1:]:
if( abs(float(i) - tr_in) < it_diff):
it_diff = abs(float(i) - tr_in)
it_index1 = it_index1 + 1
else:
y1 = float(self.sit[it_index1])
y2 = float(i)
it_index2 = it_index1 + 1
break
if(it_index1+1 == len(self.sit)):
print("Ошибка: введенное значение входной задержки слишком велико")
return -1;
if(edge=='p'):
Q11_transition = self.df_rise_transition.iat[it_index1,oc_index1]
Q12_transition = self.df_rise_transition.iat[it_index2,oc_index1]
Q21_transition = self.df_rise_transition.iat[it_index1,oc_index2]
Q22_transition = self.df_rise_transition.iat[it_index2,oc_index2]
if(edge=='n'):
Q11_transition = self.df_fall_transition.iat[it_index1,oc_index1]
Q12_transition = self.df_fall_transition.iat[it_index2,oc_index1]
Q21_transition = self.df_fall_transition.iat[it_index1,oc_index2]
Q22_transition = self.df_fall_transition.iat[it_index2,oc_index2]
f_R1_transition = (x2 - c_out)/(x2 - x1)*float(Q11_transition) + (c_out - x1)/(x2 - x1)*float(Q21_transition)
f_R2_transition = (x2 - c_out)/(x2 - x1)*float(Q12_transition) + (c_out - x1)/(x2 - x1)*float(Q22_transition)
f_P_transition = (y2 - tr_in)/(y2 - y1)*f_R1_transition + (tr_in - y1)/(y2 - y1)*f_R2_transition
return f_P_transition
def propagate(self,edge, tr_in, c_out):
y1 = 0.0
y2 = 0.0
x1 = 0.0
x2 = 0.0
it_index1 = 0
it_index2 = 0
oc_index1 = 0
oc_index2 = 0
if(float(self.sit[0]) > tr_in):
print("Ошибка: введенное значение входной задержки слишком мало")
return -1;
if(float(self.coc[0]) > c_out):
print("Ошибка: введенное значение выходной нагрузки слишком мало")
return -1;
it_diff = abs(float(self.sit[0]) - tr_in)
oc_diff = abs(float(self.coc[0]) - c_out)
for i in self.coc[1:]:
if( abs(float(i) - c_out) < oc_diff):
oc_diff = abs(float(i) - c_out)
oc_index1 = oc_index1 + 1
else:
x1 = float(self.coc[oc_index1])
x2 = float(i)
oc_index2 = oc_index1 + 1
break
if(oc_index1+1 == len(self.coc)):
print("Ошибка: введенное значение выходной нагрузки слишком велико")
return -1;
for i in self.sit[1:]:
if( abs(float(i) - tr_in) < it_diff):
it_diff = abs(float(i) - tr_in)
it_index1 = it_index1 + 1
else:
y1 = float(self.sit[it_index1])
y2 = float(i)
it_index2 = it_index1 + 1
break
if(it_index1+1 == len(self.sit)):
print("Ошибка: введенное значение входной задержки слишком велико")
return -1;
if(edge=='p'):
Q11_delay = self.df_cell_rise.iat[it_index1,oc_index1]
Q12_delay = self.df_cell_rise.iat[it_index2,oc_index1]
Q21_delay = self.df_cell_rise.iat[it_index1,oc_index2]
Q22_delay = self.df_cell_rise.iat[it_index2,oc_index2]
if(edge=='n'):
Q11_delay = self.df_cell_fall.iat[it_index1,oc_index1]
Q12_delay = self.df_cell_fall.iat[it_index2,oc_index1]
Q21_delay = self.df_cell_fall.iat[it_index1,oc_index2]
Q22_delay = self.df_cell_fall.iat[it_index2,oc_index2]
f_R1_delay = (x2 - c_out)/(x2 - x1)*float(Q11_delay) + (c_out - x1)/(x2 - x1)*float(Q21_delay)
f_R2_delay = (x2 - c_out)/(x2 - x1)*float(Q12_delay) + (c_out - x1)/(x2 - x1)*float(Q22_delay)
f_P_delay = (y2 - tr_in)/(y2 - y1)*f_R1_delay + (tr_in - y1)/(y2 - y1)*f_R2_delay
if(edge=='p'):
Q11_transition = self.df_rise_transition.iat[it_index1,oc_index1]
Q12_transition = self.df_rise_transition.iat[it_index2,oc_index1]
Q21_transition = self.df_rise_transition.iat[it_index1,oc_index2]
Q22_transition = self.df_rise_transition.iat[it_index2,oc_index2]
if(edge=='n'):
Q11_transition = self.df_fall_transition.iat[it_index1,oc_index1]
Q12_transition = self.df_fall_transition.iat[it_index2,oc_index1]
Q21_transition = self.df_fall_transition.iat[it_index1,oc_index2]
Q22_transition = self.df_fall_transition.iat[it_index2,oc_index2]
f_R1_transition = (x2 - c_out)/(x2 - x1)*float(Q11_transition) + (c_out - x1)/(x2 - x1)*float(Q21_transition)
f_R2_transition = (x2 - c_out)/(x2 - x1)*float(Q12_transition) + (c_out - x1)/(x2 - x1)*float(Q22_transition)
f_P_transition = (y2 - tr_in)/(y2 - y1)*f_R1_transition + (tr_in - y1)/(y2 - y1)*f_R2_transition
return f_P_delay, f_P_transition
4) Использовать код для расчета схемы из нескольких элементов в соответствии с вариантом. Второй вход для логических элементов выбирать таким образом, чтобы обеспечить переключение элемента.
Код:
input_transition = 16
output_capacitance = 43
delay = 0.0
transition = 0.0
full_delay = 0.0
gate_NOR = Gate('NOR')
gate_AND = Gate('AND')
gate_INV = Gate('INV')
delay,transition = gate_NOR.propagate('n',input_transition,gate_AND.capacitance)
print("Задержка NOR: "+str(delay)+" Время выходного фронта NOR: "+str(transition))
full_delay+=delay
delay,transition = gate_NOR.propagate('n',transition,gate_INV.capacitance)
print("Задержка AND: "+str(delay)+" Время выходного фронта AND: "+str(transition))
full_delay+=delay
delay,transition = gate_INV.propagate('n',transition,output_capacitance)
print("Задержка INV: "+str(delay)+" Время выходного фронта INV: "+str(transition))
full_delay+=delay
print("Полная задержка: "+str(full_delay))
Результат:
Задержка NOR: 2.5279311635921613 Время выходного фронта NOR: 4.320423969604461
Задержка AND: 2.007442228770731 Время выходного фронта AND: 2.124175726427995
Задержка INV: 27.426964257790928 Время выходного фронта INV: 50.92422749535948
Полная задержка: 31.96233765015382
AND1 |
AND2 |
XNOR2 |
NOR2 |
Результат |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0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