byuccl / RapidSmith2

RapidSmith2 - the Vivado successor to RapidSmith. Released Jan 4, 2017.
Other
41 stars 13 forks source link

Yosys Interface, Abstract Edif Interface, CARRY4 transformation #371

Closed DallonTG closed 5 years ago

DallonTG commented 5 years ago

Adds a Yosys Interface, Yosys Edif Interface, and an Abstract Edif Interface. Also changed Edif Interface to Vivado Edif Interface.

The Vivado and Yosys Edif Interfaces share many methods (hence the abstract edif interface), but there are some differences between the EDIF files produced by Vivado and Yosys.

The main difference handled by the Yosys Edif Interface is that Yosys will produce EDIFs with MUXCY and XORCY cells, whereas Vivado normally will not. If the "transformCells" boolean is set to true when importing an RSCP containing a Yosys EDIF (and if the device's cell library has CARRY4 cells), the MUXCY and XORCY cells will be transformed into equivalent CARRY4 cells. This is similar to what Vivado does when a netlist with MUXCY and XORCY cells is read in used read_edif; after linking the design, you will see a message such as:

INFO: [Project 1-111] Unisim Transformation Summary:
  A total of 11 instances were transformed.
  (MUXCY,XORCY) => CARRY4: 11 instances

It is helpful to transform these cells for use with some CAD tools, such as RSVPack. Right now, only transforming XORCY and MUXCY cells to CARRY4 cells is supported, but this could probably be extended to CARRY8 cells without too much issue in the future.

I've tested the Yosys Interface (and the CARRY4 transformation code) with a small set of Yosys EDIFs at this point.