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

Fixed #321, support for reduce ops in share command #4544

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

canaknesil
Copy link

The share command aborts if the cell type is a reduce operation. This fix prevents the abort by supporting $reduce_and/or/xor/xnor/bool.

Added the following test that would fail before the fix:

read_verilog <<EOF
module top(a, b, s, y);
	input wire [7:0] a;
	input wire [7:0] b;
	input wire s;
	output wire y;
	assign y = s ? |a : |b;
endmodule
EOF

share -force

@widlarizer
Copy link
Collaborator

The FSM tests, that do use share, fail but only on macOS. Strange...

Tagging in a comment so we get a link here on github: this fixes #321

@widlarizer
Copy link
Collaborator

The reason it only failed on macos is because the seed is by default random and each runner ran FSM tests with a different seed. ./run-test.sh -S 358331205987550812 in tests/fsm fails in case 15 on this commit, but not on its parent commit

@widlarizer
Copy link
Collaborator

I tried bugpoint after commenting out the read_verilog statement from the .ys file like so:

./yosys -p "read_verilog tests/fsm/temp/uut_00015.v; proc; bugpoint -script tests/fsm/temp/uut_00015.ys -yosys ./yosys -grep proof; dump"

However, that reduces it to a test case that also fails on the main branch. I don't know about a way to configure the bugpoint command for a case where we want it to preserve the invariant "test case fails on this yosys binary but passes on that one". Maybe verismith could do this. I don't think I'll continue working on this unless specific user/company needs make it relevant

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.

2 participants