chipsalliance / f4pga-v2x

Tool for converting specialized annotated Verilog models into XML needed for Verilog to Routing flow.
https://f4pga-v2x.readthedocs.io/en/latest/
Apache License 2.0
10 stars 12 forks source link

Yosys selection fix #73

Closed mkurc-ant closed 3 years ago

mkurc-ant commented 4 years ago

This PR changes the selection pattern syntax used for select commands. At some point the syntax was changed in upstream Yosys which made V2X crash. Moreover in this PR there is a piece of code that identifies which syntax is required for the version of Yosys being used. The correct syntax is chosen automatically.

mithro commented 4 years ago

Can we just detect and older version of Yosys and bail out rather than supporting both?

mkurc-ant commented 4 years ago

@mithro Yes we can. But do we have to drop support for the older one? This is just a matter of some prefixes in select pattern, the older version still works fine.

mkurc-ant commented 4 years ago

Requires https://github.com/SymbiFlow/python-symbiflow-v2x/pull/76 for the CI to pass.

mithro commented 4 years ago

@mithro Yes we can. But do we have to drop support for the older one? This is just a matter of some prefixes in select pattern, the older version still works fine.

It requires a lot of extra plumbing around a value and it is likely we will need newer Yosys features in other areas soon anyway.

mithro commented 4 years ago

Please rebase and drop support for the older version. You can then merge.

mkurc-ant commented 4 years ago

@mithro I've dropped the support but it looks like in SymbiFlow we still use the "old" one. On the other hand Quicklogic uses the "new" one. (Apart from that conda version names for Yosys seem not to correspond one-to-one with its version).

mithro commented 4 years ago

@mkurc-ant - I thought @acomodi had upgraded our Yosys version?

acomodi commented 4 years ago

@mithro @mkurc-ant There was indeed a Yosys upgrade that dates back to the 7th of July (https://github.com/SymbiFlow/yosys/commit/d8b2d1a2b1a93057678cf49bb8f0329f191faba1). Probably this is the "old" version mentioned in the comment above (https://github.com/SymbiFlow/python-symbiflow-v2x/pull/73#issuecomment-691916295).

mkurc-ant commented 4 years ago

@acomodi Can you point me to the Conda package version with that Yosys version?

acomodi commented 4 years ago

@mkurc-ant This is the symbiflow-anaconda packages page https://anaconda.org/SymbiFlow/symbiflow-yosys/files, and the exact package that is currently used in symbiflow-arch-defs is symbiflow-yosys-0.8_6021_gd8b2d1a2-20200708_083630.tar.bz2

Files :: Anaconda Cloud
mkurc-ant commented 4 years ago

@acomodi Ah, now I see. The env for V2X uses yosys not symbiflow-yosys

mithro commented 3 years ago

Is this ready to merge now?

mkurc-ant commented 3 years ago

@mithro Yes. I've enforced usage of the newer Yosys version and dropped support for the older one.