cycle counter

42 views
Skip to first unread message

David Peng

unread,
May 19, 2023, 9:18:20 AM5/19/23
to pymtl-users
Hi,

Do you have a built-in cycle counter?

Thanks,
David

Christopher Batten

unread,
May 19, 2023, 9:31:25 AM5/19/23
to David Peng, pymtl-users
Hi David,

Yes. The simulation pass adds a `sim_cycle_count` method that you can use to get the cycle count. You can see it in action here:


Best,
Chris

--
You received this message because you are subscribed to the Google Groups "pymtl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymtl-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pymtl-users/664c54f6-235c-4c67-a7f3-a30aca901287n%40googlegroups.com.

David Peng

unread,
May 20, 2023, 9:22:45 AM5/20/23
to pymtl-users
Hi, Chris,

This sim_cycle_count only exists in top sim component. How can a module component get the cycle count? 

Any suggestion?

Thanks,
David

Christopher Batten

unread,
May 20, 2023, 10:15:19 AM5/20/23
to David Peng, pymtl-users
Hi David,

There is no support for this out of the box ... you could either write your own PyMTL3 pass to instrument all PyMTL3 components with cycle counters or just implement your own inside any component.

Best,
Chris

Reply all
Reply to author
Forward
0 new messages