I'm using yosys to synthesize simple circuits and show how the result varies with the cell library. However, it looks like the result is not well optimized. I'm using the library vsclib013.lib downloaded from: http://www.vlsitechnology.org/synopsys/vsclib013.lib
E.g. I synthesize an adder composed by 4 full adders. Since I do not use Carry_in and Carry_out I do expect that an half adder is synthesized (XOR with two inputs) for the LSB adder. The result of the synthesis is the following.
Number of cells 12
cgi2v0x05 4
iv1v0x05 4
xor3v1x05 4
It uses 4 cells that are XOR with three inputs.
This is also clear from the graph of the circuit: graph obtained using the yosys command 'show'
The circuit is simply composed by four identical full adders and there is no optimization for the Carry_in being equal to '0' and for the Carry_out not being connected.
The script I used to syntesize is:
ghdl TOP_ENTITY
hierarchy -check -top TOP_ENTITY
proc; opt; memory; opt; fsm; opt
techmap; opt
read_liberty -lib vsclib013.lib
dfflibmap -liberty vsclib013.lib
abc -liberty vsclib013.lib -D 1000 -constr constraint_file_vsclib013.txt
splitnets -ports; opt
clean
write_verilog TOP_ENTITY.v
flatten
show -stretch -format pdf -lib TOP_ENTITY.v
Thank you for any suggestion to improve the synthesys.
opt -fine -fullwith no luck-fullis an alias for-fine, so this seems redundant. Perhaps you could try with other options to opt such as-share_alland-purge, the first attempts a merge to cells that are driven from identical signals, this option is forwarded toopt_merge. The-purgeoption clears named left over or unconnected nets, again this option is passed implicitly toopt_clean. Additionally, you can addopt_demorganto reduce the gate count.