Skip to content
Open
Show file tree
Hide file tree
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: 4 additions & 2 deletions pymtl3_net/ringnet/RingRouteUnitRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
Author : Yanghui Ou, Cheng Tan
Date : April 6, 2019
"""


from copy import deepcopy

from pymtl3 import *
from pymtl3.stdlib.stream.ifcs import RecvIfcRTL, SendIfcRTL

from .directions import *
from .....lib.basic.val_rdy.ifcs import RecvIfcRTL, SendIfcRTL


class RingRouteUnitRTL( Component ):
Expand Down Expand Up @@ -63,6 +64,7 @@ def up_ru_routing():
s.send_msg_wire @= s.recv.msg
for i in range( s.num_outports ):
s.send[i].val @= 0
s.send[i].msg @= 0

if s.recv.val:
if s.pos == s.recv.msg.dst:
Expand Down
5 changes: 3 additions & 2 deletions pymtl3_net/xbar/XbarRouteUnitRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Date : Apr 16, 2020
'''
from pymtl3 import *
from pymtl3.stdlib.stream.ifcs import RecvIfcRTL, SendIfcRTL
from .....lib.basic.val_rdy.ifcs import RecvIfcRTL, SendIfcRTL

class XbarRouteUnitRTL( Component ):

Expand Down Expand Up @@ -40,12 +40,13 @@ def construct( s, PacketType, num_outports ):

@update
def up_ru_routing():
s.out_dir @= trunc( s.recv.msg.dst, dir_nbits )
s.out_dir @= zext(b1(0), dir_nbits)

for i in range( num_outports ):
s.send[i].val @= b1(0)

if s.recv.val:
s.out_dir @= trunc( s.recv.msg.dst, dir_nbits )
s.send[ s.out_dir ].val @= b1(1)

@update
Expand Down