mirror of https://github.com/YosysHQ/yosys.git
Fix corner case of pos cell with input and output being same width
This commit is contained in:
parent
fad76ce677
commit
7cff8fa3a3
|
@ -371,6 +371,8 @@ struct SmtModule {
|
||||||
for (size_t i = 0; i < ir.size() - ir.inputs().size(); ++i) {
|
for (size_t i = 0; i < ir.size() - ir.inputs().size(); ++i) {
|
||||||
writer.print(" )"); // Closing each node
|
writer.print(" )"); // Closing each node
|
||||||
}
|
}
|
||||||
|
if (ir.size() == ir.inputs().size())
|
||||||
|
writer.print(" )"); // Corner case
|
||||||
|
|
||||||
writer.print(" )"); // Closing inputs let statement
|
writer.print(" )"); // Closing inputs let statement
|
||||||
writer.print(")\n"); // Closing step function
|
writer.print(")\n"); // Closing step function
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# Generated by Yosys 0.40+7 (git sha1 d8b5b90e7, g++ 13.2.0 -Og -fPIC)
|
||||||
|
autoidx 1
|
||||||
|
module \gold
|
||||||
|
wire width 6 input 1 \A
|
||||||
|
wire width 6 output 2 \Y
|
||||||
|
cell $pos \UUT
|
||||||
|
parameter \A_SIGNED 0
|
||||||
|
parameter \A_WIDTH 6
|
||||||
|
parameter \Y_WIDTH 6
|
||||||
|
connect \A \A
|
||||||
|
connect \Y \Y
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue