From 2fc75879c66e3a35bbba49c1258b6a3fd3109c08 Mon Sep 17 00:00:00 2001 From: Alain Dargelas Date: Thu, 9 Nov 2023 10:35:54 -0800 Subject: [PATCH] Latch fix --- frontends/systemverilog/uhdm_ast_frontend.cc | 4 +++- frontends/systemverilog/uhdm_surelog_ast_frontend.cc | 4 +++- third_party/surelog | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontends/systemverilog/uhdm_ast_frontend.cc b/frontends/systemverilog/uhdm_ast_frontend.cc index 8e7b8574c..5d3e4ad3a 100644 --- a/frontends/systemverilog/uhdm_ast_frontend.cc +++ b/frontends/systemverilog/uhdm_ast_frontend.cc @@ -43,8 +43,10 @@ struct UhdmAstFrontend : public UhdmCommonFrontend { UHDM::Serializer serializer; std::vector restoredDesigns = serializer.Restore(filename); + vpiHandle designH = restoredDesigns.at(0); + UHDM::design *design = UhdmDesignFromVpiHandle(designH); UHDM::SynthSubset *synthSubset = - make_new_object_with_optional_extra_true_arg(&serializer, this->shared.nonSynthesizableObjects, false); + make_new_object_with_optional_extra_true_arg(&serializer, this->shared.nonSynthesizableObjects, design, false); synthSubset->listenDesigns(restoredDesigns); delete synthSubset; UhdmAst uhdm_ast(this->shared); diff --git a/frontends/systemverilog/uhdm_surelog_ast_frontend.cc b/frontends/systemverilog/uhdm_surelog_ast_frontend.cc index 0bdecff3b..37655574f 100644 --- a/frontends/systemverilog/uhdm_surelog_ast_frontend.cc +++ b/frontends/systemverilog/uhdm_surelog_ast_frontend.cc @@ -201,9 +201,11 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend { // `-defer` turns elaboration off, so check for it // Should be called 1. for normal flow 2. after finishing with `-link` if (!this->shared.defer) { + vpiHandle designH = uhdm_designs.at(0); + UHDM::design *design = UhdmDesignFromVpiHandle(designH); UHDM::Serializer serializer; UHDM::SynthSubset *synthSubset = - make_new_object_with_optional_extra_true_arg(&serializer, this->shared.nonSynthesizableObjects, false); + make_new_object_with_optional_extra_true_arg(&serializer, this->shared.nonSynthesizableObjects, design, false); synthSubset->listenDesigns(uhdm_designs); delete synthSubset; } diff --git a/third_party/surelog b/third_party/surelog index af495514d..f80cec9a2 160000 --- a/third_party/surelog +++ b/third_party/surelog @@ -1 +1 @@ -Subproject commit af495514d296448dd7633371134a20a5f79cd5ad +Subproject commit f80cec9a2b4b7e1e50a3cabab51abebf86f67368