Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rattle/rattle.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ def make_memoized_slice_node(operand, start, stop):
raise TypeError("Slice start must be greater than slice stop")
if stop < 0:
raise TypeError("Slice start must be nonnegative")
if start > operand.type.width:
raise TypeError("Slice stop must be less than operand width")
if stop > operand.type.width:
raise TypeError("Slice stop must be less than or equal to operand width")
if isinstance(operand, SliceNode):
return make_memoized_slice_node(operand.operand, start + operand.start, stop + operand.start)
return SliceNode(operand, start, stop)
Expand Down Expand Up @@ -479,7 +479,7 @@ def enable(self, node):
self._enable = node

def register(type, init=None, next=None, enable=None):
return RegisterNode(type, init, next, enable=None)
return RegisterNode(type, init, next, enable)

class ConstantNode(Node):
def __init__(self, type, value):
Expand Down