read_saif ref missing instance resolves #406

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2026-03-24 10:31:24 -07:00
parent 3ec34c571e
commit f4048cdf3e
7 changed files with 42 additions and 1 deletions

View File

@ -139,7 +139,9 @@ SaifReader::instancePush(const char *instance_name)
else { else {
// Inside annotation scope. // Inside annotation scope.
Instance *parent = path_.empty() ? sdc_network_->topInstance() : path_.back(); Instance *parent = path_.empty() ? sdc_network_->topInstance() : path_.back();
Instance *child = sdc_network_->findChild(parent, instance_name); Instance *child = parent
? sdc_network_->findChild(parent, instance_name)
: nullptr;
path_.push_back(child); path_.push_back(child);
} }
stringDelete(instance_name); stringDelete(instance_name);

View File

@ -0,0 +1,14 @@
library(min) {
technology(cmos);
time_unit : "1ns";
voltage_unit : "1V";
current_unit : "1mA";
capacitive_load_unit(1, pf);
cell(BUF) {
pin(A) { direction : input; }
pin(Y) { direction : output;
function : "A";
timing() { related_pin : "A"; }
}
}
}

View File

@ -0,0 +1 @@
Annotated 0 pin activities.

View File

@ -0,0 +1,16 @@
(SAIFILE
(SAIFVERSION "2.0")
(DIRECTION "backward")
(DIVIDER / )
(TIMESCALE 1ns)
(DURATION 1000)
(INSTANCE TOP
(INSTANCE child
(INSTANCE grandchild
(NET
(clk (T0 500) (T1 500) (TZ 0) (TX 0) (TB 0) (TC 1000))
)
)
)
)
)

View File

@ -0,0 +1,5 @@
# read_saif references missing instance
read_liberty read_saif_null_instance.lib
read_verilog read_saif_null_instance.v
link_design top
read_saif -scope TOP read_saif_null_instance.saif

View File

@ -0,0 +1,2 @@
module top(input clk);
endmodule

View File

@ -158,6 +158,7 @@ record_public_tests {
path_group_names path_group_names
power_json power_json
prima3 prima3
read_saif_null_instance
report_checks_sorted report_checks_sorted
report_checks_src_attr report_checks_src_attr
report_json1 report_json1