Skip to content

Commit

Permalink
Fix RetRTL #25: In file /WORK_REPO/CGRA-Flow/VectorCGRA/fu/single/Ret…
Browse files Browse the repository at this point in the history
…RTL.py, Line 63, Col 28:

  s.send_out[0].msg @= DataType(s.recv_in[s.in0_idx].msg.payload, b1( 0 ), b1( 0 ) )

- BitStruct CGRAData_32_1_1_1 has 4 fields but 3 arguments are given!
  • Loading branch information
yuqisun committed Dec 2, 2024
1 parent 9406bf7 commit 79d597b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cgra/translate/CGRATemplateRTL_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ def test_cgra_universal( cmdline_opts, paramCGRA = None):
DUT = CGRATemplateRTL
FunctionUnit = FlexibleFuRTL
# FuList = [ SeqMulAdderRTL, MemUnitRTL ]#AdderRTL, MulRTL, LogicRTL, ShifterRTL, PhiRTL, CompRTL, BranchRTL, MemUnitRTL ]
# FuList = [ PhiRTL, AdderRTL, ShifterRTL, MemUnitRTL, SelRTL, CompRTL, SeqMulAdderRTL, RetRTL, MulRTL, LogicRTL, BranchRTL ]
FuList = [ PhiRTL, AdderRTL, ShifterRTL, MemUnitRTL, SelRTL, CompRTL, SeqMulAdderRTL, MulRTL, LogicRTL, BranchRTL ]
FuList = [ PhiRTL, AdderRTL, ShifterRTL, MemUnitRTL, SelRTL, CompRTL, SeqMulAdderRTL, RetRTL, MulRTL, LogicRTL, BranchRTL ]
DataType = mk_data( 32, 1 )
PredicateType = mk_predicate( 1, 1 )
# DataType = mk_data( 16, 1 )
Expand Down
3 changes: 2 additions & 1 deletion fu/single/RetRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def comb_logic():

if s.recv_opt.msg.ctrl == OPT_RET:
# Branch is only used to set predication rather than delivering value.
s.send_out[0].msg @= DataType(s.recv_in[s.in0_idx].msg.payload, b1( 0 ), b1( 0 ) )
# payload, predicate, bypass, delay
s.send_out[0].msg @= DataType(s.recv_in[s.in0_idx].msg.payload, b1(0), b1(0), b1(0))
if s.recv_in[s.in0_idx].msg.predicate == b1( 0 ):#s.const_zero.payload:
s.send_out_predicate @= 0
else:
Expand Down

0 comments on commit 79d597b

Please sign in to comment.