From 403a1e9415b125a5d6cd0cf043f8b2c538cb8724 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Thu, 30 Oct 2008 22:11:05 -0700 Subject: [PATCH] Add a dup_expr method to NetEUBits. The NetEUBits needs to create a NetEUBits when the dup_expr method is called, so it needs its own dup_expr method. --- dup_expr.cc | 8 ++++++++ netlist.h | 1 + 2 files changed, 9 insertions(+) diff --git a/dup_expr.cc b/dup_expr.cc index 91b6bc867..45ad48d5d 100644 --- a/dup_expr.cc +++ b/dup_expr.cc @@ -138,6 +138,14 @@ NetEUFunc* NetEUFunc::dup_expr() const return tmp; } +NetEUBits* NetEUBits::dup_expr() const +{ + NetEUBits*tmp = new NetEUBits(op_, expr_->dup_expr()); + assert(tmp); + tmp->set_line(*this); + return tmp; +} + NetEUnary* NetEUnary::dup_expr() const { NetEUnary*tmp = new NetEUnary(op_, expr_->dup_expr()); diff --git a/netlist.h b/netlist.h index a73c68b98..0c1f52917 100644 --- a/netlist.h +++ b/netlist.h @@ -3655,6 +3655,7 @@ class NetEUBits : public NetEUnary { virtual NetNet* synthesize(Design*, NetScope*scope); + virtual NetEUBits* dup_expr() const; virtual NetExpr* eval_tree(int prune_to_width = -1); virtual ivl_variable_type_t expr_type() const; };