From 1764c0ee3c6db3cdc07f78dbdc3d24d3a9cf61a5 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 18 Jan 2024 08:47:04 +0100 Subject: [PATCH] Fix verific clocking when no driver exist --- frontends/verific/verific.cc | 2 +- tests/verific/clocking.ys | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tests/verific/clocking.ys diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index 9737fde89..adabd2700 100644 --- a/frontends/verific/verific.cc +++ b/frontends/verific/verific.cc @@ -2110,7 +2110,7 @@ VerificClocking::VerificClocking(VerificImporter *importer, Net *net, bool sva_a if (sva_at_only) do { Instance *inst_mux = net->Driver(); - if (inst_mux->Type() != PRIM_MUX) + if (inst_mux == nullptr || inst_mux->Type() != PRIM_MUX) break; bool pwr1 = inst_mux->GetInput1()->IsPwr(); diff --git a/tests/verific/clocking.ys b/tests/verific/clocking.ys new file mode 100644 index 000000000..bfdbeb748 --- /dev/null +++ b/tests/verific/clocking.ys @@ -0,0 +1,10 @@ +read -sv <