Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

23 simulation traces are not understandable for human being #43

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7f164e9
Simulation traces are not understandable for human being #23
yuqisun Dec 9, 2024
8145fcf
Merge branch 'tancheng:master' into 23-simulation-traces-are-not-unde…
yuqisun Dec 14, 2024
30d3a31
Simulation traces are not understandable for human being #23
yuqisun Dec 16, 2024
86de5ef
Simulation traces are not understandable for human being #23
yuqisun Dec 16, 2024
fe9ba2c
Simulation traces are not understandable for human being #23
yuqisun Dec 16, 2024
9b9c737
Populate values for #ctrl and use decimal for fu_in, outport and pred…
yuqisun Dec 17, 2024
dddb3e1
Populate values for #ctrl and use decimal for fu_in, outport and pred…
yuqisun Dec 17, 2024
04f63fa
Populate values for #ctrl and use decimal for fu_in, outport and pred…
yuqisun Dec 17, 2024
3e0a506
Use decimal for trace bit values instead of 0x
yuqisun Dec 17, 2024
3c65021
Format Ctrl and Crossbar RTL
yuqisun Dec 17, 2024
0dfb132
Format Ctrl and Crossbar RTL
yuqisun Dec 17, 2024
84c1921
Format data mem
yuqisun Dec 19, 2024
73d5db8
Simulation traces are not understandable for human being #23
yuqisun Dec 9, 2024
899ebf9
Simulation traces are not understandable for human being #23
yuqisun Dec 16, 2024
2640d30
Simulation traces are not understandable for human being #23
yuqisun Dec 16, 2024
2f5f354
Simulation traces are not understandable for human being #23
yuqisun Dec 16, 2024
fd1b30e
Populate values for #ctrl and use decimal for fu_in, outport and pred…
yuqisun Dec 17, 2024
1ce8c61
Populate values for #ctrl and use decimal for fu_in, outport and pred…
yuqisun Dec 17, 2024
a6eaf41
Populate values for #ctrl and use decimal for fu_in, outport and pred…
yuqisun Dec 17, 2024
bca2dde
Use decimal for trace bit values instead of 0x
yuqisun Dec 17, 2024
2fe23a8
Format Ctrl and Crossbar RTL
yuqisun Dec 17, 2024
839c979
Format Ctrl and Crossbar RTL
yuqisun Dec 17, 2024
11f53a1
Format data mem
yuqisun Dec 19, 2024
40fc3f8
Merge remote-tracking branch 'origin/23-simulation-traces-are-not-und…
yuqisun Dec 19, 2024
ede9365
format FlexibleFuRTL
yuqisun Dec 21, 2024
7d04f0c
format with directions and addr
yuqisun Dec 22, 2024
48a8a34
format with directions and addr
yuqisun Dec 22, 2024
1b33b9f
format CtrlMemRTL reg with sub header
yuqisun Dec 23, 2024
323bf85
format CtrlMemRTL with sub header
yuqisun Dec 23, 2024
bab8bee
format CtrlMemRTL with sub header
yuqisun Dec 23, 2024
0e0e8e9
Add verbosity level.
yuqisun Dec 24, 2024
a48dc05
print ctrl_memory when verbosity > 1
yuqisun Dec 25, 2024
9ed1abb
Merge branch 'master' into 23-simulation-traces-are-not-understandabl…
yuqisun Dec 25, 2024
e9054d8
verbose_trace calls verbose_trace, leave line_trace as it is.
yuqisun Dec 26, 2024
d798f19
Move to after from pymtl3 import *, we are sorting these in alphabet …
yuqisun Dec 26, 2024
834ccef
Optimize imports order and move common dicts to common
yuqisun Dec 26, 2024
58bb723
Test with verilog.
yuqisun Dec 26, 2024
dd750f7
extract common logic for verbose_trace
yuqisun Dec 26, 2024
787c94a
extract common logic for verbose_trace
yuqisun Dec 26, 2024
898e594
enable the verbosity for https://github.com/tancheng/VectorCGRA/blob/…
yuqisun Dec 26, 2024
57dfc34
1. TILE_PORT_DIRECTION_DICT -> TILE_PORT_DIRECTION_DICT_DESC
yuqisun Dec 27, 2024
f88c8f4
put line_trace() before verbose()
yuqisun Dec 27, 2024
8f9ecd8
Add verbose trace for CtrlMemDynamicRTL.py
yuqisun Dec 27, 2024
f702763
Remove the unnecessary space.
yuqisun Dec 28, 2024
877ab24
Remove the unnecessary space.
yuqisun Dec 28, 2024
a11819c
Remove the unnecessary space.
yuqisun Dec 28, 2024
51bbc5c
enable verbose_trace by default
yuqisun Dec 28, 2024
bf825b1
Control verbose_trace by set_param.
yuqisun Jan 1, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
pip install -U git+https://github.com/tancheng/pymtl3.1@yo-struct-list-fix
pip install hypothesis
pip install pytest
pip install py-markdown-table
pip list

- name: Test and translate with pytest
Expand Down
26 changes: 19 additions & 7 deletions cgra/CGRAKingMeshRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,23 @@ def construct( s, DataType, PredicateType, CtrlType, width, height,
s.tile[i].to_mem_waddr.rdy //= 0
s.tile[i].to_mem_wdata.rdy //= 0

# Line trace
def line_trace( s ):
# str = "||".join([ x.element.line_trace() for x in s.tile ])
# str += " :: [" + s.data_mem.line_trace() + "]"
res = "||\n".join([ (("[tile"+str(i)+"]: ") + x.line_trace() + x.ctrl_mem.line_trace())
for (i,x) in enumerate(s.tile) ])
res += "\n :: [" + s.data_mem.line_trace() + "] \n"
# verbose trace if verbosity > 0
def verbose_trace(s, verbosity=1):
res = ''
for (i, x) in enumerate(s.tile):
res += "# [tile" + str(i) + "]: " + x.line_trace(verbosity=verbosity) + x.ctrl_mem.line_trace(verbosity=verbosity) + '\n'
tancheng marked this conversation as resolved.
Show resolved Hide resolved
res += f"\ndata_mem: {s.data_mem.line_trace(verbosity=verbosity)}"
res += "------\n\n"
return res

# Line trace
def line_trace(s, verbosity=0):
if verbosity==0:
# str = "||".join([ x.element.line_trace() for x in s.tile ])
tancheng marked this conversation as resolved.
Show resolved Hide resolved
# str += " :: [" + s.data_mem.line_trace() + "]"
res = "||\n".join([(("[tile" + str(i) + "]: ") + x.line_trace() + x.ctrl_mem.line_trace())
for (i, x) in enumerate(s.tile)])
res += "\n :: [" + s.data_mem.line_trace() + "] \n"
return res
else:
return s.verbose_trace(verbosity=verbosity)
3 changes: 2 additions & 1 deletion cgra/translate/VectorCGRAKingMeshRTL_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def done( s ):
return done

def line_trace( s ):
return s.dut.line_trace()
verbosity = 1
return s.dut.line_trace(verbosity=verbosity)

def test_homo_4x4( cmdline_opts ):
num_tile_inports = 8
Expand Down
60 changes: 51 additions & 9 deletions fu/flexible/FlexibleFuRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
Date : Dec 24, 2019

"""

from py_markdown_table.markdown_table import markdown_table
from pymtl3 import *

from ...tile.TileRTL_constant import tile_port_direction_dict
from ...fu.single.MemUnitRTL import MemUnitRTL
from ...fu.single.AdderRTL import AdderRTL
from ...lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
Expand Down Expand Up @@ -111,11 +113,51 @@ def comb_logic():
s.fu_recv_in_rdy_vector[port][i] @= s.fu[i].recv_in[port].rdy
s.recv_in[port].rdy @= reduce_or( s.fu_recv_in_rdy_vector[port] )

def line_trace( s ):
opt_str = " #"
if s.recv_opt.en:
opt_str = OPT_SYMBOL_DICT[s.recv_opt.msg.ctrl]
out_str = ",".join([str(x.msg) for x in s.send_out])
recv_str = ",".join([str(x.msg) for x in s.recv_in])
return f'[recv: {recv_str}] {opt_str}(P{s.recv_opt.msg.predicate}) (const: {s.recv_const.msg}, en: {s.recv_const.en}) ] = [out: {out_str}] (recv_opt.rdy: {s.recv_opt.rdy}, recv_in[0].rdy: {s.recv_in[0].rdy}, recv_in[1].rdy: {s.recv_in[1].rdy}, recv_predicate.msg: {s.recv_predicate.msg}, {OPT_SYMBOL_DICT[s.recv_opt.msg.ctrl]}, recv_opt.en: {s.recv_opt.en}, send[0].en: {s.send_out[0].en}) '

# verbose trace if verbosity > 0
def verbose_trace(s, verbosity=1):
# for clk n
# recv:
# 1. OPT: opt+rdy(if ready to receive opt)
# 2. Data: [rdy(if ready to receive data) and msg(data) for each inport(total 4 for now)]
# out: [en(if data is sent out) and msg for each outport(total 2 for now)]
# ? what is recv_const for ?
opt_ctrl = OPT_SYMBOL_DICT[s.recv_opt.msg.ctrl]
opt_rdy = s.recv_opt.rdy

recv_data = [x for x in s.recv_in]
recv_list = []
for idx, data in enumerate(recv_data):
msg_dict = data.msg.__dict__
fu_inport_dict = {"fu_inport_idx": idx, "rdy": data.rdy}
fu_inport_dict.update(msg_dict)
recv_list.append(fu_inport_dict)
recv_md = markdown_table(recv_list).set_params(quote=False).get_markdown()

out_data = [x for x in s.send_out]
out_list = []
for idx, data in enumerate(out_data):
msg_dict = data.msg.__dict__
fu_outport_dict = {"fu_outport_idx": idx, "en": data.en}
fu_outport_dict.update(msg_dict)
out_list.append(fu_outport_dict)
out_md = markdown_table(out_list).set_params(quote=False).get_markdown()

return (f'## class: {s.__class__.__name__}\n'
f'- FU recv:\n'
f' FU opt: {opt_ctrl}, opt_rdy: {opt_rdy}\n'
f' FU data:'
f'{recv_md}\n'
f'===>\n'
f'- FU out:'
f'{out_md}\n')

def line_trace( s, verbosity=0 ):
if verbosity == 0:
opt_str = " #"
if s.recv_opt.en:
opt_str = OPT_SYMBOL_DICT[s.recv_opt.msg.ctrl]
out_str = ",".join([str(x.msg) for x in s.send_out])
recv_str = ",".join([str(x.msg) for x in s.recv_in])
return f'[recv: {recv_str}] {opt_str}(P{s.recv_opt.msg.predicate}) (const: {s.recv_const.msg}, en: {s.recv_const.en}) ] = [out: {out_str}] (recv_opt.rdy: {s.recv_opt.rdy}, recv_in[0].rdy: {s.recv_in[0].rdy}, recv_in[1].rdy: {s.recv_in[1].rdy}, recv_predicate.msg: {s.recv_predicate.msg}, {OPT_SYMBOL_DICT[s.recv_opt.msg.ctrl]}, recv_opt.en: {s.recv_opt.en}, send[0].en: {s.send_out[0].en}) '
else:
return s.verbose_trace(verbosity=verbosity)
228 changes: 223 additions & 5 deletions mem/ctrl/CtrlMemRTL.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
Author : Cheng Tan
Date : Dec 21, 2019
"""


from py_markdown_table.markdown_table import markdown_table
from pymtl3 import *
from pymtl3.stdlib.primitive import RegisterFile

from ...tile.TileRTL_constant import tile_port_direction_dict_short_desc
from ...lib.basic.en_rdy.ifcs import SendIfcRTL, RecvIfcRTL
from ...lib.opt_type import *

Expand Down Expand Up @@ -72,7 +73,224 @@ def update_raddr():
else:
s.reg_file.raddr[0] <<= s.reg_file.raddr[0] + AddrType( 1 )

def line_trace( s ):
out_str = "||".join([ str(data) for data in s.reg_file.regs ])
return f'{s.recv_ctrl.msg} : [{out_str}] : {s.send_ctrl.msg}'
# verbose trace if verbosity > 0
tancheng marked this conversation as resolved.
Show resolved Hide resolved
def verbose_trace(s, verbosity=1):
num_fu_in = len(s.reg_file.regs[0].fu_in)
# num_inports = len(s.reg_file.regs[0].predicate_in)
num_outports = len(s.reg_file.regs[0].outport if hasattr(s.reg_file.regs[0], 'outport') else [])
num_direction_ports = num_outports - num_fu_in

# recv_ctrl
recv_ctrl_msg_dict = dict(s.recv_ctrl.msg.__dict__)
recv_ctrl_sub_header = {}
for key in recv_ctrl_msg_dict.keys():
recv_ctrl_sub_header[key] = ''
recv_ctrl_msg_list = []
recv_ctrl_msg_dict['ctrl'] = OPT_SYMBOL_DICT[recv_ctrl_msg_dict['ctrl']]
recv_ctrl_msg_dict['fu_in'] = [int(fi) for fi in recv_ctrl_msg_dict['fu_in']]
fu_in_header = []
for idx, val in enumerate(recv_ctrl_msg_dict['fu_in']):
fu_in_header.append(idx)
fu_in_header_str = "|".join([f"{hd : ^3}" for hd in fu_in_header])
recv_ctrl_msg_dict['fu_in'] = "|".join([f"{v : ^3}" for v in recv_ctrl_msg_dict['fu_in']])
recv_ctrl_sub_header['fu_in'] = fu_in_header_str

if 'outport' in recv_ctrl_msg_dict:
recv_ctrl_msg_dict['outport'] = [int(op) for op in recv_ctrl_msg_dict['outport']]
fu_reg_num = 1
outport_sub_header = []
for idx, val in enumerate(recv_ctrl_msg_dict['outport']):
# to directions
if idx <= num_direction_ports - 1:
hd = tile_port_direction_dict_short_desc[idx]
outport_sub_header.append(f"{hd : ^{len(hd) + 2}}")
recv_ctrl_msg_dict['outport'][
idx] = f"{tile_port_direction_dict_short_desc[val - 1] if val != 0 else '-' : ^{len(hd) + 2}}"
# to fu regs
else:
hd = f"fu_reg_{fu_reg_num}"
outport_sub_header.append(f"{hd : ^{len(hd)}}")
recv_ctrl_msg_dict['outport'][
idx] = f"{tile_port_direction_dict_short_desc[val - 1] if val != 0 else '-' : ^{len(hd)}}"
fu_reg_num += 1
outport_sub_header_str = "|".join([hd for hd in outport_sub_header])
recv_ctrl_msg_dict['outport'] = "|".join([v for v in recv_ctrl_msg_dict['outport']])
recv_ctrl_sub_header['outport'] = outport_sub_header_str
if 'predicate_in' in recv_ctrl_msg_dict:
recv_ctrl_msg_dict['predicate_in'] = [int(pi) for pi in recv_ctrl_msg_dict['predicate_in']]
fu_out_num = 1
predicate_in_sub_header = []
for idx, val in enumerate(recv_ctrl_msg_dict['predicate_in']):
# from directions
if idx <= num_direction_ports - 1:
hd = tile_port_direction_dict_short_desc[idx]
predicate_in_sub_header.append(f"{hd : ^{len(hd) + 2}}")
recv_ctrl_msg_dict['predicate_in'][idx] = f"{val : ^{len(hd) + 2}}"
# from fu
else:
hd = f"fu_out_{fu_out_num}"
predicate_in_sub_header.append(f"{hd : ^{len(hd)}}")
recv_ctrl_msg_dict['predicate_in'][idx] = f"{val : ^{len(hd)}}"
fu_out_num += 1
predicate_in_sub_header_str = "|".join([hd for hd in predicate_in_sub_header])
recv_ctrl_msg_dict['predicate_in'] = "|".join([v for v in recv_ctrl_msg_dict['predicate_in']])
recv_ctrl_sub_header['predicate_in'] = predicate_in_sub_header_str
recv_ctrl_msg_list.append(recv_ctrl_sub_header)
recv_ctrl_msg_list.append(recv_ctrl_msg_dict)
send_ctrl_md = markdown_table(recv_ctrl_msg_list).set_params(quote=False).get_markdown()
# recv_ctrl_msg = "\n".join([(key + ": " + str(value)) for key, value in recv_ctrl_msg_dict.items()])

# send_ctrl
send_ctrl_msg_dict = dict(s.send_ctrl.msg.__dict__)
send_ctrl_sub_header = {}
for key in send_ctrl_msg_dict.keys():
send_ctrl_sub_header[key] = ''
send_ctrl_msg_list = []
send_ctrl_msg_dict['ctrl'] = OPT_SYMBOL_DICT[send_ctrl_msg_dict['ctrl']]
if 'predicate' in send_ctrl_msg_dict:
send_ctrl_msg_dict['predicate'] = int(send_ctrl_msg_dict['predicate'])
send_ctrl_msg_dict['fu_in'] = [int(fi) for fi in send_ctrl_msg_dict['fu_in']]
fu_in_header = []
for idx, val in enumerate(send_ctrl_msg_dict['fu_in']):
fu_in_header.append(idx)
fu_in_header_str = "|".join([f"{hd : ^3}" for hd in fu_in_header])
send_ctrl_msg_dict['fu_in'] = "|".join([f"{v : ^3}" for v in send_ctrl_msg_dict['fu_in']])
send_ctrl_sub_header['fu_in'] = fu_in_header_str

if 'outport' in send_ctrl_msg_dict:
send_ctrl_msg_dict['outport'] = [int(op) for op in send_ctrl_msg_dict['outport']]
fu_reg_num = 1
outport_sub_header = []
for idx, val in enumerate(send_ctrl_msg_dict['outport']):
# to directions
if idx <= num_direction_ports - 1:
hd = tile_port_direction_dict_short_desc[idx]
outport_sub_header.append(f"{hd : ^{len(hd) + 2}}")
send_ctrl_msg_dict['outport'][
idx] = f"{tile_port_direction_dict_short_desc[val - 1] if val != 0 else '-' : ^{len(hd) + 2}}"
# to fu regs
else:
hd = f"fu_reg_{fu_reg_num}"
outport_sub_header.append(f"{hd : ^{len(hd)}}")
send_ctrl_msg_dict['outport'][
idx] = f"{tile_port_direction_dict_short_desc[val - 1] if val != 0 else '-' : ^{len(hd)}}"
fu_reg_num += 1
outport_sub_header_str = "|".join([hd for hd in outport_sub_header])
send_ctrl_msg_dict['outport'] = "|".join([v for v in send_ctrl_msg_dict['outport']])
send_ctrl_sub_header['outport'] = outport_sub_header_str
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']]
fu_out_num = 1
predicate_in_sub_header = []
for idx, val in enumerate(send_ctrl_msg_dict['predicate_in']):
# from directions
if idx <= num_direction_ports - 1:
hd = tile_port_direction_dict_short_desc[idx]
predicate_in_sub_header.append(f"{hd : ^{len(hd) + 2}}")
send_ctrl_msg_dict['predicate_in'][idx] = f"{val : ^{len(hd) + 2}}"
# from fu
else:
hd = f"fu_out_{fu_out_num}"
predicate_in_sub_header.append(f"{hd : ^{len(hd)}}")
send_ctrl_msg_dict['predicate_in'][idx] = f"{val : ^{len(hd)}}"
fu_out_num += 1
predicate_in_sub_header_str = "|".join([hd for hd in predicate_in_sub_header])
send_ctrl_msg_dict['predicate_in'] = "|".join([v for v in send_ctrl_msg_dict['predicate_in']])
send_ctrl_sub_header['predicate_in'] = predicate_in_sub_header_str
if 'routing_xbar_outport' in send_ctrl_msg_dict:
send_ctrl_msg_dict['routing_xbar_outport'] = [int(rxop) for rxop in send_ctrl_msg_dict['routing_xbar_outport']]
if 'fu_xbar_outport' in send_ctrl_msg_dict:
send_ctrl_msg_dict['fu_xbar_outport'] = [int(fxop) for fxop in send_ctrl_msg_dict['fu_xbar_outport']]
if 'routing_predicate_in' in send_ctrl_msg_dict:
send_ctrl_msg_dict['routing_predicate_in'] = [int(rpi) for rpi in send_ctrl_msg_dict['routing_predicate_in']]

send_ctrl_msg_list.append(send_ctrl_sub_header)
send_ctrl_msg_list.append(send_ctrl_msg_dict)
send_ctrl_md = markdown_table(send_ctrl_msg_list).set_params(quote=False).get_markdown()
# send_ctrl_msg = "\n".join([(key + ": " + str(value)) for key, value in send_ctrl_msg_dict.items()])

if verbosity==1:
return (f'\n## class: {s.__class__.__name__}\n'
f'- recv_ctrl_msg:\n'
f'{send_ctrl_md}\n\n'
f'- send_ctrl_msg:'
f'{send_ctrl_md}\n\n')
else:
# reg
reg_dicts = [dict(data.__dict__) for data in s.reg_file.regs]
reg_sub_header = {}
for reg_dict in reg_dicts:
for key in reg_dict.keys():
reg_sub_header[key] = ''
reg_dict['ctrl'] = OPT_SYMBOL_DICT[reg_dict['ctrl']]
reg_dict['fu_in'] = [int(fi) for fi in reg_dict['fu_in']]
fu_in_header = []
for idx, val in enumerate(reg_dict['fu_in']):
fu_in_header.append(idx)
fu_in_header_str = "|".join([f"{hd : ^3}" for hd in fu_in_header])
reg_dict['fu_in'] = "|".join([f"{v : ^3}" for v in reg_dict['fu_in']])
reg_sub_header['fu_in'] = fu_in_header_str
if 'outport' in reg_dict:
reg_dict['outport'] = [int(op) for op in reg_dict['outport']]
fu_reg_num = 1
outport_sub_header = []
for idx, val in enumerate(reg_dict['outport']):
# to directions
if idx <= num_direction_ports - 1:
hd = tile_port_direction_dict_short_desc[idx]
outport_sub_header.append(f"{hd : ^{len(hd) + 2}}")
reg_dict['outport'][
idx] = f"{tile_port_direction_dict_short_desc[val - 1] if val != 0 else '-' : ^{len(hd) + 2}}"
# to fu regs
else:
hd = f"fu_reg_{fu_reg_num}"
outport_sub_header.append(f"{hd : ^{len(hd)}}")
reg_dict['outport'][
idx] = f"{tile_port_direction_dict_short_desc[val - 1] if val != 0 else '-' : ^{len(hd)}}"
fu_reg_num += 1
outport_sub_header_str = "|".join([hd for hd in outport_sub_header])
reg_dict['outport'] = "|".join([v for v in reg_dict['outport']])
reg_sub_header['outport'] = outport_sub_header_str
if 'predicate_in' in reg_dict:
reg_dict['predicate_in'] = [int(pi) for pi in reg_dict['predicate_in']]
fu_out_num = 1
predicate_in_sub_header = []
for idx, val in enumerate(reg_dict['predicate_in']):
# from directions
if idx <= num_direction_ports - 1:
hd = tile_port_direction_dict_short_desc[idx]
predicate_in_sub_header.append(f"{hd : ^{len(hd) + 2}}")
reg_dict['predicate_in'][idx] = f"{val : ^{len(hd) + 2}}"
# from fu
else:
hd = f"fu_out_{fu_out_num}"
predicate_in_sub_header.append(f"{hd : ^{len(hd)}}")
reg_dict['predicate_in'][idx] = f"{val : ^{len(hd)}}"
fu_out_num += 1
predicate_in_sub_header_str = "|".join([hd for hd in predicate_in_sub_header])
reg_dict['predicate_in'] = "|".join([v for v in reg_dict['predicate_in']])
reg_sub_header['predicate_in'] = predicate_in_sub_header_str
if 'routing_xbar_outport' in reg_dict:
reg_dict['routing_xbar_outport'] = [int(rxop) for rxop in reg_dict['routing_xbar_outport']]
if 'fu_xbar_outport' in reg_dict:
reg_dict['fu_xbar_outport'] = [int(fxop) for fxop in reg_dict['fu_xbar_outport']]
if 'routing_predicate_in' in reg_dict:
reg_dict['routing_predicate_in'] = [int(rpi) for rpi in reg_dict['routing_predicate_in']]
reg_dicts.insert(0, reg_sub_header)
reg_md = markdown_table(reg_dicts).set_params(quote=False).get_markdown()
return (f'\n## class: {s.__class__.__name__}\n'
f'- recv_ctrl_msg:\n'
f'{send_ctrl_md}\n\n'
f'- send_ctrl_msg:'
f'{send_ctrl_md}\n\n'
f'- ctrl_memory: {reg_md}\n')


def line_trace( s, verbosity=0 ):
if verbosity == 0:
out_str = "||".join([str(data) for data in s.reg_file.regs])
return f'{s.recv_ctrl.msg} : [{out_str}] : {s.send_ctrl.msg}'
else:
return s.verbose_trace(verbosity=verbosity)


Loading
Loading