File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,6 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend {
131131 }
132132 }
133133
134- UHDM::Serializer serializer;
135- UHDM::SynthSubset *synthSubset = new UHDM::SynthSubset (&serializer, this ->shared .nonSynthesizableObjects , false );
136- synthSubset->listenDesigns (uhdm_design);
137- delete synthSubset;
138-
139134 SURELOG::shutdown_compiler (compiler);
140135 delete clp;
141136 delete symbolTable;
@@ -148,6 +143,17 @@ struct UhdmSurelogAstFrontend : public UhdmCommonFrontend {
148143 UhdmAst uhdm_ast (this ->shared );
149144 if (this ->shared .defer && !this ->shared .link )
150145 return nullptr ;
146+
147+ // FIXME: SynthSubset annotation is incompatible with separate compilation
148+ // `-defer` turns elaboration off, so check for it
149+ // Should be called 1. for normal flow 2. after finishing with `-link`
150+ if (!this ->shared .defer ) {
151+ UHDM::Serializer serializer;
152+ UHDM::SynthSubset *synthSubset = new UHDM::SynthSubset (&serializer, this ->shared .nonSynthesizableObjects , false );
153+ synthSubset->listenDesigns (uhdm_design);
154+ delete synthSubset;
155+ }
156+
151157 AST::AstNode *current_ast = uhdm_ast.visit_designs (uhdm_design);
152158 if (!this ->report_directory .empty ()) {
153159 this ->shared .report .write (this ->report_directory );
You can’t perform that action at this time.
0 commit comments