Skip to content

Commit

Permalink
Suggestions from copilot
Browse files Browse the repository at this point in the history
  • Loading branch information
teqdruid committed Dec 20, 2024
1 parent 801ef91 commit 411d6fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontends/PyCDE/src/pycde/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def inner(self):
return self.inner_type

def wrap(self, value,
validOrEmpty) -> typing.Tuple["ChannelSignal", "BitsSignal"]:
valid_or_empty) -> typing.Tuple["ChannelSignal", "BitsSignal"]:
"""Wrap a data signal and valid signal into a data channel signal and a
ready signal."""

Expand All @@ -616,13 +616,13 @@ def wrap(self, value,
elif value.type != self.inner_type:
raise TypeError(
f"Expected signal of type {self.inner_type}, got {value.type}")
valid = Bits(1)(validOrEmpty)
valid = Bits(1)(valid_or_empty)
wrap_op = esi.WrapValidReadyOp(self._type, types.i1, value.value,
valid.value)
return wrap_op[0], wrap_op[1]
elif signaling == ChannelSignaling.FIFO:
value = self.inner_type(value)
empty = Bits(1)(validOrEmpty)
empty = Bits(1)(valid_or_empty)
wrap_op = esi.WrapFIFOOp(self._type, types.i1, value.value, empty.value)
return wrap_op[0], wrap_op[1]
else:
Expand Down Expand Up @@ -656,7 +656,7 @@ def join(a: "ChannelSignal", b: "ChannelSignal") -> "ChannelSignal":

def merge(self, a: "ChannelSignal", b: "ChannelSignal") -> "ChannelSignal":
"""Merge two channels into a single channel, selecting a message from either
one. May implement an sort of fairness policy. Both channels must be of the
one. May implement any sort of fairness policy. Both channels must be of the
same type. Returns both the merged channel."""

from .constructs import Mux, Wire
Expand Down

0 comments on commit 411d6fe

Please sign in to comment.