Skip to content

Commit

Permalink
Rename function to match semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Sep 19, 2018
1 parent 8fdd220 commit 44880aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions magma/conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def repeat(value, n):
return repeats


def check_value_is_input(fn):
def check_value_is_output(fn):
@functools.wraps(fn)
def wrapped(value, n):
if isinstance(value, m.Type) and not value.isoutput():
Expand All @@ -196,7 +196,7 @@ def wrapped(value, n):
return wrapped


@check_value_is_input
@check_value_is_output
def zext(value, n):
assert isinstance(value, (UIntType, SIntType, BitsType))
if isinstance(value, UIntType):
Expand All @@ -208,7 +208,7 @@ def zext(value, n):
return concat(value, zeros)


@check_value_is_input
@check_value_is_output
def sext(value, n):
assert isinstance(value, SIntType)
return sint(concat(array(value), array(value[-1], n)))
Expand Down

0 comments on commit 44880aa

Please sign in to comment.