summaryrefslogtreecommitdiff
path: root/frontends/ast
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-07-27 14:27:51 +0200
committerClifford Wolf <clifford@clifford.at>2013-07-27 14:27:51 +0200
commit0f38008ed34e36e798f521b4b6d4fea89ae31a3b (patch)
tree2fc23463121715ae0fb602ac9bf871ee9dd82c5e /frontends/ast
parent974b6a947c822e9f1a5e67c4847c98b923d30398 (diff)
Added "design" command (-reset, -save, -load)
Diffstat (limited to 'frontends/ast')
-rw-r--r--frontends/ast/ast.cc15
-rw-r--r--frontends/ast/ast.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc
index 3e9ea50a..e7aa472e 100644
--- a/frontends/ast/ast.cc
+++ b/frontends/ast/ast.cc
@@ -896,6 +896,21 @@ void AstModule::update_auto_wires(std::map<RTLIL::IdString, int> auto_sizes)
delete newmod;
}
+RTLIL::Module *AstModule::clone() const
+{
+ AstModule *new_mod = new AstModule;
+ cloneInto(new_mod);
+
+ new_mod->ast = ast->clone();
+ new_mod->nolatches = nolatches;
+ new_mod->nomem2reg = nomem2reg;
+ new_mod->mem2reg = mem2reg;
+ new_mod->lib = lib;
+ new_mod->noopt = noopt;
+
+ return new_mod;
+}
+
// internal dummy line number callbacks
namespace {
int internal_line_num;
diff --git a/frontends/ast/ast.h b/frontends/ast/ast.h
index 99760e09..f6bb7a40 100644
--- a/frontends/ast/ast.h
+++ b/frontends/ast/ast.h
@@ -205,6 +205,7 @@ namespace AST
virtual ~AstModule();
virtual RTLIL::IdString derive(RTLIL::Design *design, std::map<RTLIL::IdString, RTLIL::Const> parameters);
virtual void update_auto_wires(std::map<RTLIL::IdString, int> auto_sizes);
+ virtual RTLIL::Module *clone() const;
};
// this must be set by the language frontend before parsing the sources