aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
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
parent974b6a947c822e9f1a5e67c4847c98b923d30398 (diff)
downloadyosys-0f38008ed34e36e798f521b4b6d4fea89ae31a3b.tar.gz
yosys-0f38008ed34e36e798f521b4b6d4fea89ae31a3b.tar.bz2
yosys-0f38008ed34e36e798f521b4b6d4fea89ae31a3b.zip
Added "design" command (-reset, -save, -load)
Diffstat (limited to 'frontends')
-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 3e9ea50ac..e7aa472ef 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 99760e09c..f6bb7a40f 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