diff --git a/pymtl3_net/ringnet/RingRouteUnitRTL.py b/pymtl3_net/ringnet/RingRouteUnitRTL.py index fa4fd97..34e23e1 100644 --- a/pymtl3_net/ringnet/RingRouteUnitRTL.py +++ b/pymtl3_net/ringnet/RingRouteUnitRTL.py @@ -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 ): @@ -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: diff --git a/pymtl3_net/xbar/XbarRouteUnitRTL.py b/pymtl3_net/xbar/XbarRouteUnitRTL.py index 5755044..69cee04 100644 --- a/pymtl3_net/xbar/XbarRouteUnitRTL.py +++ b/pymtl3_net/xbar/XbarRouteUnitRTL.py @@ -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 ): @@ -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