0

I'm relatively new to Yosys. I've been tinkering with it with some proprietary standard cell libraries and am trying to extract some QoR/PPA metrics, similar to those you can get from DC.

  • Minimum slack (including worst-case negative slack/WNS)
  • Max logic depth [0]
  • Cell area [1]

For [0], I know there's the ltp command, but it only reports topological paths per module. I tried flattening the design using flatten, but there still seems to be a hierarchy in the netlist. Where should I insert the flatten command to actually flatten the netlist?

For [1], I know you can get the number of cells in the netlist using the stat command, but this doesn't tell me the equivalent of DC's CellArea metric (since each cell has a different area). I could just build a library of cell areas for each cell type based on the cell library datasheet, but that's rather laborious.

Also, is it possible to specify a target clock rate for synthesis? I think for abc there was a -D flag for delay, but this sounds to me more like input delay rather than clock period.

Thanks!

tedx
  • 165
  • 2
  • 7

1 Answers1

1

-D passed to abc is indeed clock period, not input delay. When specified this should also cause abc to print slack information.

Have you tried stat -liberty file.lib to use a liberty file for cell areas? If this isn't calculating areas as expected (I didn't quite understand your issue) then please create a feature request on GitHub with the difference.

flatten should be run after hierarchy -top top_module_name to do hierarchical elaboration and set the top module.

gatecat
  • 1,156
  • 2
  • 8
  • 15
  • Thanks, David! `stat -liberty` seemed to do the trick for printing out cell area. At a quick glance it looks sort-of close (sample size = 1) to what another synthesis tool outputs, which is good. I added `hierarchy -top` after `read_verilog`, and `flatten` after `dfflibmap`, but now LTP says the longest path is 0. Any ideas? – tedx Jul 07 '20 at 18:00
  • Also, where can I find slack information in the log? I put `abc -D 1666` for a 1666 ps clock period, but I can't find the word "slack" anywhere in the log. – tedx Jul 07 '20 at 18:01
  • I haven't done liberty synthesis for ABC for a while, so I can't remember unfortunately. Some tuning of the ABC script might be required. – gatecat Jul 07 '20 at 21:30
  • For the LTP issue, have you made sure your blackboxes are known using `read_liberty -lib`? – gatecat Jul 07 '20 at 21:30
  • Hi David, I tried adding the `read_liberty` command and `flatten` right before LTP, and it seems to work. However, the designated topological path is >10x what other synthesis tools report. Looking deeper, it looks like there's some DFFs in the path, which is not what I want. Is there a way to get longest combinational path? – tedx Jul 08 '20 at 21:54