aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2021-07-11 23:57:53 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2021-07-12 00:47:34 +0200
commit009940f56ca71cc8655a13a514371eb5757b96ca (patch)
tree8b194a81a92590973eb662c1207a876d010b2966 /frontends/ast
parent726fabd65e51c7a15a2a2dc24d3b99426ef43ad2 (diff)
downloadyosys-009940f56ca71cc8655a13a514371eb5757b96ca.tar.gz
yosys-009940f56ca71cc8655a13a514371eb5757b96ca.tar.bz2
yosys-009940f56ca71cc8655a13a514371eb5757b96ca.zip
rtlil: Make Process handling more uniform with Cell and Wire.
- add a backlink to module from Process - make constructor and destructor protected, expose Module functions to add and remove processes
Diffstat (limited to 'frontends/ast')
-rw-r--r--frontends/ast/genrtlil.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/frontends/ast/genrtlil.cc b/frontends/ast/genrtlil.cc
index 6b119b7ff..e6f7b30c1 100644
--- a/frontends/ast/genrtlil.cc
+++ b/frontends/ast/genrtlil.cc
@@ -319,16 +319,14 @@ struct AST_INTERNAL::ProcessGenerator
LookaheadRewriter la_rewriter(always);
// generate process and simple root case
- proc = new RTLIL::Process;
+ proc = current_module->addProcess(stringf("$proc$%s:%d$%d", always->filename.c_str(), always->location.first_line, autoidx++));
set_src_attr(proc, always);
- proc->name = stringf("$proc$%s:%d$%d", always->filename.c_str(), always->location.first_line, autoidx++);
for (auto &attr : always->attributes) {
if (attr.second->type != AST_CONSTANT)
log_file_error(always->filename, always->location.first_line, "Attribute `%s' with non-constant value!\n",
attr.first.c_str());
proc->attributes[attr.first] = attr.second->asAttrConst();
}
- current_module->processes[proc->name] = proc;
current_case = &proc->root_case;
// create initial temporary signal for all output registers