top | item 37668172

(no title)

ZirconiumX | 2 years ago

Reading your answers, I've noticed that there appear to be some major misconceptions about Yosys and how it works: certainly, ABC is a core part of a standard synthesis flow, but Yosys is based around a series of passes that modify a common intermediate representation. That should mean if anything it is very easy to use only part of Yosys.

Obviously it'd be off-topic to try to discuss your particular needs and use-cases of Yosys here, so feel free to email me at lofty@yosyshq.com.

discuss

order

mathisfun123|2 years ago

> Reading your answers, I've noticed that there appear to be some major misconceptions about Yosys and how it works

Indeed I opted to go with vivado instead of yosys (so i'm not an expert) but you're being a little disingenuous; there are absolutely places where yosys is explicitly, manifestly, being used as a scripting harness - you literally have ScriptPass

https://github.com/YosysHQ/yosys/blob/076c5ceb714bc8f20136a8...

and it is indeed used extensively for all of the flows:

https://github.com/search?q=repo%3AYosysHQ%2Fyosys%20ScriptP...

and so in particular, wanting to do synthesis for Xilinx, I was stuck basically commenting various lines in SynthXilinxPass::script

https://github.com/YosysHQ/yosys/blob/076c5ceb714bc8f20136a8...

to experiment with various flows. Now maybe you have/had a better way to do this but I couldn't find it.

ZirconiumX|2 years ago

...is your bugbear here that these particular scripts are written in C++ instead of Python?

Yes, those flows use ScriptPass, because for the most part they are scripts. If they were written in Tcl, then Yosys would need to depend on a Tcl interpreter, and equivalently a Python interpreter for Python. By just using C++ for these scripts which usually only developers need to modify, Yosys does not need to depend on either.

But anyway, if I was going to mess about with the flow that much, I'd start by running `help synth_xilinx`, which outputs a list of all the commands that it calls (more or less; it can't model control flow like a proper language can), and then that can be edited into what I need it to do.