Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2024-07-31 16:36:24 -07:00
parent edfba111c3
commit 79c4fff78c
3 changed files with 14 additions and 12 deletions

View File

@ -497,7 +497,7 @@ public:
const TableAxis *capAxis() const { return cap_axis_.get(); }
// Make voltage wavefroms from liberty time/current values.
// Required before voltageTime, timeVoltage, voltageCurrent.
void makeVoltageWaveforms(float vdd);
void ensureVoltageWaveforms(float vdd);
float timeCurrent(float slew,
float cap,
float time);

View File

@ -1948,7 +1948,7 @@ LibertyCell::ensureVoltageWaveforms(const DcalcAnalysisPtSeq &dcalc_aps)
if (model) {
OutputWaveforms *output_waveforms = model->outputWaveforms();
if (output_waveforms)
output_waveforms->makeVoltageWaveforms(vdd);
output_waveforms->ensureVoltageWaveforms(vdd);
}
}
}

View File

@ -1664,17 +1664,19 @@ OutputWaveforms::checkAxes(const TableTemplate *tbl_template)
}
void
OutputWaveforms::makeVoltageWaveforms(float vdd)
OutputWaveforms::ensureVoltageWaveforms(float vdd)
{
vdd_ = vdd;
size_t size = current_waveforms_.size();
voltage_waveforms_.resize(size);
voltage_currents_.resize(size);
size_t cap_count = cap_axis_->size();
for (size_t slew_index = 0; slew_index < slew_axis_->size(); slew_index++) {
for (size_t cap_index = 0; cap_index < cap_count; cap_index++) {
size_t wave_index = slew_index * cap_count + cap_index;
findVoltages(wave_index, cap_axis_->axisValue(cap_index));
if (voltage_waveforms_.empty()) {
vdd_ = vdd;
size_t size = current_waveforms_.size();
voltage_waveforms_.resize(size);
voltage_currents_.resize(size);
size_t cap_count = cap_axis_->size();
for (size_t slew_index = 0; slew_index < slew_axis_->size(); slew_index++) {
for (size_t cap_index = 0; cap_index < cap_count; cap_index++) {
size_t wave_index = slew_index * cap_count + cap_index;
findVoltages(wave_index, cap_axis_->axisValue(cap_index));
}
}
}
}