Skip to content

Commit 232be1b

Browse files
committed
Updated AddN for the better retiming
1 parent 5e4049b commit 232be1b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

veriloggen/stream/stypes.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import absolute_import
22
from __future__ import print_function
33

4-
from functools import partial
54
from collections import OrderedDict
65
from math import log
76

@@ -1630,7 +1629,14 @@ class PlusN(_SpecialOperator):
16301629

16311630
def __init__(self, *vars):
16321631
_SpecialOperator.__init__(self, *vars)
1633-
self.op = partial(op_tree, vtypes.Plus, 0)
1632+
1633+
def func(*args):
1634+
ret = args[0]
1635+
for arg in args[1:]:
1636+
ret += arg
1637+
return ret
1638+
1639+
self.op = func
16341640

16351641

16361642
def AddN(*vars):

0 commit comments

Comments
 (0)