For utgate timing models, if hl/lh are not present use zl/zh/lz/hz to give a more accurate tristate delay.

This commit is contained in:
Brian Taylor 2022-12-08 10:46:19 -08:00 committed by Holger Vogt
parent c7b7d14dd6
commit bf14ec6d10
1 changed files with 62 additions and 4 deletions

View File

@ -2576,6 +2576,53 @@ static char *get_delays_utgate(char *rem)
/* Return estimate of tristate delay (delay = val3) */
char *rising, *falling, *delays = NULL;
struct timing_data *tdp1, *tdp2;
struct timing_data *tdp3, *tdp4, *tdp5, *tdp6;
char *tplz, *tphz, *tpzl, *tpzh, *larger, *larger1, *larger2, *larger3;
tdp3 = create_min_typ_max("tplz", rem);
estimate_typ(tdp3);
tplz = get_estimate(tdp3);
tdp4 = create_min_typ_max("tphz", rem);
estimate_typ(tdp4);
tphz = get_estimate(tdp4);
larger1 = NULL;
if (tplz && strlen(tplz) > 0) {
if (tphz && strlen(tphz) > 0) {
larger1 = larger_delay(tplz, tphz);
} else {
larger1 = tplz;
}
} else if (tphz && strlen(tphz) > 0) {
larger1 = tphz;
}
tdp5 = create_min_typ_max("tpzl", rem);
estimate_typ(tdp5);
tpzl = get_estimate(tdp5);
tdp6 = create_min_typ_max("tpzh", rem);
estimate_typ(tdp6);
tpzh = get_estimate(tdp6);
larger2 = NULL;
if (tpzl && strlen(tpzl) > 0) {
if (tpzh && strlen(tpzh) > 0) {
larger2 = larger_delay(tpzl, tpzh);
} else {
larger2 = tpzl;
}
} else if (tpzh && strlen(tpzh) > 0) {
larger2 = tpzh;
}
larger3 = NULL;
if (larger1) {
if (larger2) {
larger3 = larger_delay(larger1, larger2);
} else {
larger3 = larger1;
}
} else if (larger2) {
larger3 = larger2;
}
tdp1 = create_min_typ_max("tplh", rem);
estimate_typ(tdp1);
@ -2583,17 +2630,28 @@ static char *get_delays_utgate(char *rem)
tdp2 = create_min_typ_max("tphl", rem);
estimate_typ(tdp2);
falling = get_estimate(tdp2);
if (rising && falling) {
if (strlen(rising) > 0 && strlen(falling) > 0) {
if (rising && strlen(rising) > 0) {
if (falling && strlen(falling) > 0) {
larger = larger_delay(rising, falling);
delays = tprintf("(delay = %s)", larger);
} else {
delays = tprintf("(delay = %s)", rising);
}
} else if (falling && strlen(falling) > 0) {
delays = tprintf("(delay = %s)", falling);
} else {
if (larger3) {
delays = tprintf("(delay = %s)", larger3);
} else {
delays = tprintf("(delay=1.0e-12)");
}
} else {
delays = tprintf("(delay=1.0e-12)");
}
delete_timing_data(tdp1);
delete_timing_data(tdp2);
delete_timing_data(tdp3);
delete_timing_data(tdp4);
delete_timing_data(tdp5);
delete_timing_data(tdp6);
return delays;
}