Applying BehavioralRTLIRPass to the cycle-level Component.

33 views
Skip to first unread message

Taeyoung Kong

unread,
Jul 13, 2020, 1:50:55 AM7/13/20
to pymtl-users
Hi,
I have a question about RTIIR pass.

I implemented a component at cycle level (CL) using some stdlibs such as DelayPipeSendCL.
Isn't it allowed to run RTLIR pass to cycle level components?
If so, what would be the best replacement to DelayPipeSendCL stdlib?

What I want to do is to use some delay queues to abstract the pipeline registers and latency of the component.

Thanks,
Ty

Christopher Batten

unread,
Jul 13, 2020, 11:23:25 AM7/13/20
to Taeyoung Kong, pymtl-users

Hi Ty,

Maybe you can clarify why you are applying the RTLIR pass? Are you working on a PyMTL RTL model that you are ready to translate into say Verilog RTL?

If your design includes a mix of RTL and CL models then while it will simulate fine using the Python-based simulation engine, it will not be able to translate the design to Verilog RTL since CL models are not translatable. If you are using delay queues to abstract the pipeline registers and latency of a component then you are probably working at the CL level and it probably doesn't make sense to translate it into Verilog RTL?

Then again, it is pretty easy to make a translatable delay pipeline if you want ...

Does this help?
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/586c5ab4-b058-41b1-a65e-e125dc0f607dn%40googlegroups.com.

Taeyoung Kong

unread,
Jul 13, 2020, 9:12:09 PM7/13/20
to pymtl-users
Hi Chris,

Thanks for the answer.
I am working on energy estimation at the architecture level (CL in PyMTL3 case), and I was gonna parse my component and make an energy table for each node.
I was hoping even CL model would be translated into some unoptimized RTL, but it turns out it is not.
I will think about the best way to do it with CL modeling, as I do not want to lose productivity by forcing users implement RTL modeling.
If you have any suggestions, please leave it here. Your suggestions and comments are always welcomed.

Thanks,
Ty

Christopher Batten

unread,
Jul 13, 2020, 9:16:41 PM7/13/20
to Taeyoung Kong, pymtl-users

Ah I see ... when we do CL modeling, we basically have our CL model dump out a bunch of event counts. We then use RTL modeling (or other sources) to estimate the rough energy for each event, and we multiply the event counts by the rough energy per event to estimate the overall energy for a simulation ...

I am not quite sure why you need to use RTLIR to "parse my component and make an energy table for each node"?

Best,
-c
> To view this discussion on the web visit https://groups.google.com/d/msgid/pymtl-users/63a26723-ac4b-41a6-9460-d81e3f4303c9n%40googlegroups.com.

Taeyoung Kong

unread,
Jul 13, 2020, 9:24:51 PM7/13/20
to pymtl-users
Oh, what you just mentioned is interesting.
1. What exactly is an event in CL model? Each @update block is an event?
2. How can I dump out a bunch of event counts? Is it a pass?, If so, can you point me a file?
3. Is there an automatic way to map an event in RTL modeling and that in CL modeling? Or is it user's responsibility to map it and multiply?

As PyMTL3 is being actively developed now, it seems like I have not figured all features that it provides yet.

Thanks,
Ty

Christopher Batten

unread,
Jul 13, 2020, 9:43:04 PM7/13/20
to Taeyoung Kong, pymtl-users

> 1. What exactly is an event in CL model? Each @update block is an event?

Well, usually the model has to track events explicitly. For example, number of register file accesses, or number of ALU operations, or number of cache hits, etc ... sometimes our CL model might just track the number of each dynamic instruction count in a processor and then just multiply these counts but a rough estimate of energy per instruction of that type ...

> 2. How can I dump out a bunch of event counts? Is it a pass?, If so, can you point me a file?

This is not currently an automatic thing ... so the CL model writer keeps track of the events of interest and then dumps them out at the end of the simulation.

> 3. Is there an automatic way to map an event in RTL modeling and that in CL modeling? Or is it user's responsibility to map it and multiply?

An automatic way would be an interesting research idea! But basically no, it would be quick challenging to figure out an automatic way to correlate CL and RTL models ...

> As PyMTL3 is being actively developed now, it seems like I have not figured all features that it provides yet.

No worries! One of the real challenges of CL modeling is that it is very open-ended and there is not much in the way of automated tools to manipulate CL models ...

-c
> To view this discussion on the web visit https://groups.google.com/d/msgid/pymtl-users/8d80cd6d-b13f-49dc-a5f5-ae19dc3b9e14n%40googlegroups.com.

Taeyoung Kong

unread,
Jul 13, 2020, 9:51:18 PM7/13/20
to pymtl-users
Hi Chris,
Thanks for your answer. It was really helpful.
And yes, I also felt manipulating CL models was quite challenging, but it can be a good balance between productivity and accuracy!

I just started working with PyMTL3, and I will share some of my experiences later. 

Thanks,
Ty 
Reply all
Reply to author
Forward
0 new messages