Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abc9: Experiment with importing structural choices #4283

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

povik
Copy link
Member

@povik povik commented Mar 15, 2024

This is a bit of code on top of #4282 to have the structural choices that abc9 comes up reimported back into Yosys, for inspection and possibly other uses.

Minimal example where one sees it in action:

read_verilog <<EOF
(* top *)
module top(a, b, y);
	input wire [1:0] a;
	input wire [1:0] b;
	output wire [1:0] y;
	assign y = a * b;
endmodule
EOF
opt_clean
techmap
splitnets -ports
abc9 -script +&synch2;,&ps;;
show

graph

Formerly when you didn't pass any options to `abc9` it would source a
LUT library from the current design by considering any module with an
`abc9_lut` attribute to be an available mapping primitive.

Make the change to condition this behavior on a `-lutlib` option, and
instead make `abc9` without any options perform a non-mapping mode in
which the netlist is reimported back into Yosys as an and-inverter
graph.
@povik
Copy link
Member Author

povik commented Apr 29, 2024

Let me leave a note that the imported $__choice nodes represent equivalences up to a negation. (One can find out the value of the referenced nodes under all PIs being zero to recover polarities.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant