aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast/simplify.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-05-04 10:22:05 -0700
committerEddie Hung <eddie@fpgeh.com>2020-05-04 10:22:05 -0700
commiteca9fc01a78c5cc4c1d8120e2ccdf18211bcef37 (patch)
tree2f7baee8ade49e326f002d3fd799f95891ff95e0 /frontends/ast/simplify.cc
parentad8e7878f6321b9c35ae41b651a7da9a733ce4be (diff)
downloadyosys-eca9fc01a78c5cc4c1d8120e2ccdf18211bcef37.tar.gz
yosys-eca9fc01a78c5cc4c1d8120e2ccdf18211bcef37.tar.bz2
yosys-eca9fc01a78c5cc4c1d8120e2ccdf18211bcef37.zip
verilog: set src attribute for primitives
Diffstat (limited to 'frontends/ast/simplify.cc')
-rw-r--r--frontends/ast/simplify.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index 837c14ad7..488681649 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -1739,8 +1739,10 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
AstNode *node = children_list[1];
if (op_type != AST_POS)
- for (size_t i = 2; i < children_list.size(); i++)
+ for (size_t i = 2; i < children_list.size(); i++) {
node = new AstNode(op_type, node, children_list[i]);
+ node->location = location;
+ }
if (invert_results)
node = new AstNode(AST_BIT_NOT, node);