slaclab / surf

A huge VHDL library for FPGA development
Other
345 stars 55 forks source link

help with Tcl command using Ruckus #1052

Closed tulliog closed 1 year ago

tulliog commented 1 year ago

I have been using SURF and Ruckus for an on-going project (for High-Energy Physics applications). I need to generate more detailed post-PAR reports in order to see the utilization of GT transceivers. Vivado supports a Tcl command named report_utilization , how can i add it to the Ruckus system so that it is executed automatically ?

thanks,

ruck314 commented 1 year ago

ruckus has a set of "post" scripts that get sourced after each step of the synth/impl process: https://github.com/slaclab/ruckus/tree/main/vivado/run/post

For your case, you are interested in the post route script: https://github.com/slaclab/ruckus/blob/main/vivado/run/post/route.tcl

At the end of vivado/run/post/route.tcl, it will check if there is a post_route_run.tcl in the target's vivado directory: https://github.com/slaclab/ruckus/blob/main/vivado/run/post/route.tcl#L27

Here's an example of such a TCL script: https://github.com/slaclab/Simple-10GbE-RUDP-KCU105-Example/blob/main/firmware/targets/Simple10GbeRudpKcu105Example/vivado/post_route_run.tcl

In this example, I have include the report_utilization TCL command that dumps the utilization report and dump into image dir: https://github.com/slaclab/Simple-10GbE-RUDP-KCU105-Example/blob/main/firmware/targets/Simple10GbeRudpKcu105Example/vivado/post_route_run.tcl#L12

Here's the report from this example. Simple10GbeRudpKcu105Example-0x02020000-20230323083803-ruckman-5634dbd_utilization_report.txt

You can copy that post_route_run.tcl script into your target/(Name of Target)/vivado.

Let me know if you have any other question or if it doesn't work for you.

tulliog commented 1 year ago

thanks for the detailed explanation. I close the issue