Skip to content

Commit

Permalink
Populate values for #ctrl and use decimal for fu_in, outport and pred…
Browse files Browse the repository at this point in the history
…icate_in list instead of 0x
  • Loading branch information
yuqisun committed Dec 17, 2024
1 parent dddb3e1 commit 04f63fa
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions mem/ctrl/CtrlMemRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,27 @@ def line_trace( s ):
for out_dict in out_dicts:
out_dict['ctrl'] = OPT_SYMBOL_DICT[out_dict['ctrl']]
out_dict['fu_in'] = [ int(fi) for fi in out_dict['fu_in']]
if out_dict['outport']:
if 'outport' in out_dict:
out_dict['outport'] = [ int(op) for op in out_dict['outport']]
out_dict['predicate_in'] = [ int(pi) for pi in out_dict['predicate_in']]
if 'predicate_in' in out_dict:
out_dict['predicate_in'] = [ int(pi) for pi in out_dict['predicate_in']]
out_md = markdown_table(out_dicts).set_params(quote=False).get_markdown()
# recv_opt_msg = "\n".join([(key + ": " + str(value)) for key, value in recv_opt_msg_dict.items()])
recv_ctrl_msg_dict = dict(s.recv_ctrl.msg.__dict__)
recv_ctrl_msg_dict['ctrl'] = OPT_SYMBOL_DICT[recv_ctrl_msg_dict['ctrl']]
recv_ctrl_msg_dict['fu_in'] = [ int(fi) for fi in out_dict['fu_in']]
recv_ctrl_msg_dict['outport'] = [ int(op) for op in out_dict['outport']]
recv_ctrl_msg_dict['predicate_in'] = [ int(pi) for pi in out_dict['predicate_in']]
if 'outport' in recv_ctrl_msg_dict:
recv_ctrl_msg_dict['outport'] = [ int(op) for op in out_dict['outport']]
if 'predicate_in' in recv_ctrl_msg_dict:
recv_ctrl_msg_dict['predicate_in'] = [ int(pi) for pi in out_dict['predicate_in']]
recv_ctrl_msg = "\n".join([(key + ": " + str(value)) for key, value in recv_ctrl_msg_dict.items()])
send_ctrl_msg_dict = dict(s.send_ctrl.msg.__dict__)
send_ctrl_msg_dict['ctrl'] = OPT_SYMBOL_DICT[send_ctrl_msg_dict['ctrl']]
send_ctrl_msg_dict['fu_in'] = [ int(fi) for fi in send_ctrl_msg_dict['fu_in']]
send_ctrl_msg_dict['outport'] = [int(op) for op in send_ctrl_msg_dict['outport']]
send_ctrl_msg_dict['predicate_in'] = [int(pi) for pi in send_ctrl_msg_dict['predicate_in']]
if 'outport' in send_ctrl_msg_dict:
send_ctrl_msg_dict['outport'] = [int(op) for op in send_ctrl_msg_dict['outport']]
if 'predicate_in' in send_ctrl_msg_dict:
send_ctrl_msg_dict['predicate_in'] = [int(pi) for pi in send_ctrl_msg_dict['predicate_in']]
send_ctrl_msg = "\n".join([(key + ": " + str(value)) for key, value in send_ctrl_msg_dict.items()])
print(f"send_ctrl_msg_dict: {send_ctrl_msg_dict}")
return (f'\n## class: {s.__class__.__name__}\n'
Expand Down

0 comments on commit 04f63fa

Please sign in to comment.