-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: master
Are you sure you want to change the base?
23 simulation traces are not understandable for human being #43
Conversation
…rstandable-for-human-being
…icate_in list instead of 0x
…icate_in list instead of 0x
…icate_in list instead of 0x
…icate_in list instead of 0x
…icate_in list instead of 0x
…icate_in list instead of 0x
…erstandable-for-human-being' into 23-simulation-traces-are-not-understandable-for-human-being
Hi @yuqisun, thanks for the PR,
|
Hi,
So channel should be the lines of crossbar, channel_recv should be the inports which in green in below picture, am I correct? And there's also |
Nope. |
How to use
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Plz sync to TOT
- Plz enable the
verbosity
for https://github.com/tancheng/VectorCGRA/blob/master/scale_out/RingMultiCgraRingCtrlMemRTL.py & https://github.com/tancheng/VectorCGRA/blob/master/systolic/CgraMemRightAndBottomRTL.py
Thanks!
…e-for-human-being
79d15c1
to
9ed1abb
Compare
CgraMemRightAndBottomRTL good. |
2. recv_ctrl_msg_list = [ recv_ctrl_sub_header, recv_ctrl_msg_dict ] -> recv_ctrl_msg_list = [recv_ctrl_sub_header, recv_ctrl_msg_dict] 3. put line_trace() before verbose()
systolic/CgraMemRightAndBottomRTL.py
Outdated
# 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 :: SouthMem [" + s.data_mem_south.line_trace() + "] \n" | ||
res += "\n :: EastMem [" + s.data_mem_east.line_trace() + "] \n" | ||
return res | ||
|
||
|
||
def verbose_trace( s, verbosity = 1 ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the unnecessary space, (keep the one before and after =
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -81,6 +81,7 @@ def done(s): | |||
# return True | |||
|
|||
def line_trace(s): | |||
# return s.dut.verbose_trace(verbosity = 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is the way to invoke the verbose_trace(), let's enable it by default for this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verbose_trace works for -xvs --tb=short
but not --test-verilog
, it looks up line_trace()
, can test this with -xvs --tb=short
for RingMultiCgraRingCtrlMemRTL_test.py, current is pytest --tb=short -sv ../scale_out/translate/RingMultiCgraRingCtrlMemRTL_test.py --test-verilog --dump-vtb --dump-vcd
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Then the
xxx_test.py
withintranslate/
folder can haveline_trace()
, while the one intest/
can have vervose_trace() enabled by default. -
Or I guess actually you can control it based on the flag?
def line_trace(s, verbosity=0):
if verbosity = 0:
return s.dut.line_trace(verbosity)
if verbosity = 1:
return s.dut.verbose_trace(verbosity)
......
dut = Top()
if flags not contains --test-verilog:
dut.set_param('top.x.y.z.line_trace', verbosity=1) # Or use a global variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, you both are right, controlling by set_param
is better, I should use it from the beginning.
Added a line in *_test.py th.set_param('top.dut.line_trace', verbosity = 1)
, will enable verbose_trace by default and when there's --test-verilog
, will ignore verbose itself.
@@ -80,6 +80,7 @@ def check_parity(s): | |||
return True | |||
|
|||
def line_trace(s): | |||
# return s.dut.verbose_trace(verbosity = 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enable by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're both -xvs --tb=short
and --tb=short --test-verilog --dump-vtb --dump-vcd
in testcases, if enable verbose_trace by default, can I remove and ignore --tb=short --test-verilog --dump-vtb --dump-vcd
case in action workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it by set_param
.
Attched log sample of VectorCGRAKingMeshRTL_test, please help review, thanks. (There may some trace logs be missed, too many, will update during developing, WDYT)
VectorCGRAKingMeshRTL_test_log.txt
Also sync changes from master.