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 803ca91 commit 182ae58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cgra/translate/CGRATemplateRTL_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ 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 ]
# FuList = [ PhiRTL, AdderRTL, ShifterRTL, MemUnitRTL, SelRTL, CompRTL, SeqMulAdderRTL, MulRTL, LogicRTL, BranchRTL ]
DataType = mk_data( 32, 1 )
PredicateType = mk_predicate( 1, 1 )
# DataType = mk_data( 16, 1 )
Expand Down Expand Up @@ -364,6 +364,7 @@ def handleReshape( t_tiles ):
th = config_model_with_cmdline_opts( th, cmdline_opts, duts=['dut'] )

if paramCGRA != None:
print(f'paramCGRA: {paramCGRA}')
for tile in tiles:
if not tile.isDefaultFus():
targetFuList = []
Expand Down
3 changes: 2 additions & 1 deletion fu/single/RetRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,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 182ae58

Please sign in to comment.