3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-02 09:20:23 +00:00

Add test_cell tests for C++ functional backend

This commit is contained in:
Roland Coeurjoly 2024-06-12 08:32:24 +02:00 committed by Emily Schmidt
parent 7611dda2eb
commit 720429b1fd
49 changed files with 963 additions and 26 deletions

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 5 input 1 \A
wire width 4 input 2 \B
wire width 6 output 3 \Y
cell $add \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 5
parameter \B_SIGNED 1
parameter \B_WIDTH 4
parameter \Y_WIDTH 6
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,25 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 8 input 1 \A
wire width 7 input 2 \B
wire input 3 \BI
wire input 4 \CI
wire width 6 output 5 \CO
wire width 6 output 6 \X
wire width 6 output 7 \Y
cell $alu \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 8
parameter \B_SIGNED 0
parameter \B_WIDTH 7
parameter \Y_WIDTH 6
connect \A \A
connect \B \B
connect \BI \BI
connect \CI \CI
connect \CO \CO
connect \X \X
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 2 input 1 \A
wire width 3 input 2 \B
wire width 2 output 3 \Y
cell $and \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 2
parameter \B_SIGNED 1
parameter \B_WIDTH 3
parameter \Y_WIDTH 2
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,14 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 8 input 1 \A
wire input 2 \S
wire width 4 output 3 \Y
cell $bmux \UUT
parameter \S_WIDTH 1
parameter \WIDTH 4
connect \A \A
connect \S \S
connect \Y \Y
end
end

View file

@ -0,0 +1,14 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 6 input 1 \A
wire width 5 input 2 \S
wire width 192 output 3 \Y
cell $demux \UUT
parameter \S_WIDTH 5
parameter \WIDTH 6
connect \A \A
connect \S \S
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 4 input 1 \A
wire width 6 input 2 \B
wire output 3 \Y
cell $div \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 4
parameter \B_SIGNED 0
parameter \B_WIDTH 6
parameter \Y_WIDTH 1
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 4 input 1 \A
wire width 4 input 2 \B
wire width 6 output 3 \Y
cell $divfloor \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 4
parameter \B_SIGNED 0
parameter \B_WIDTH 4
parameter \Y_WIDTH 6
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 5 input 1 \A
wire input 2 \B
wire width 4 output 3 \Y
cell $eq \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 5
parameter \B_SIGNED 0
parameter \B_WIDTH 1
parameter \Y_WIDTH 4
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire input 1 \A
wire input 2 \B
wire input 3 \C
wire output 4 \X
wire output 5 \Y
cell $fa \UUT
parameter \WIDTH 1
connect \A \A
connect \B \B
connect \C \C
connect \X \X
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 3 input 1 \A
wire width 7 input 2 \B
wire width 6 output 3 \Y
cell $ge \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 3
parameter \B_SIGNED 1
parameter \B_WIDTH 7
parameter \Y_WIDTH 6
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 7 input 1 \A
wire width 3 input 2 \B
wire width 4 output 3 \Y
cell $gt \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 7
parameter \B_SIGNED 1
parameter \B_WIDTH 3
parameter \Y_WIDTH 4
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,15 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire input 1 \CI
wire width 2 output 2 \CO
wire width 2 input 3 \G
wire width 2 input 4 \P
cell $lcu \UUT
parameter \WIDTH 2
connect \CI \CI
connect \CO \CO
connect \G \G
connect \P \P
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 5 input 1 \A
wire width 4 input 2 \B
wire width 6 output 3 \Y
cell $le \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 5
parameter \B_SIGNED 1
parameter \B_WIDTH 4
parameter \Y_WIDTH 6
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 2 input 1 \A
wire width 7 input 2 \B
wire output 3 \Y
cell $logic_and \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 2
parameter \B_SIGNED 0
parameter \B_WIDTH 7
parameter \Y_WIDTH 1
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 3 input 1 \A
wire width 8 output 2 \Y
cell $logic_not \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 3
parameter \Y_WIDTH 8
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 8 input 1 \A
wire width 7 input 2 \B
wire width 2 output 3 \Y
cell $logic_or \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 8
parameter \B_SIGNED 0
parameter \B_WIDTH 7
parameter \Y_WIDTH 2
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 8 input 1 \A
wire width 5 input 2 \B
wire width 6 output 3 \Y
cell $lt \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 8
parameter \B_SIGNED 0
parameter \B_WIDTH 5
parameter \Y_WIDTH 6
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,12 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 2 input 1 \A
wire output 2 \Y
cell $lut \UUT
parameter \LUT 4'1111
parameter \WIDTH 2
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 3 input 1 \A
wire width 0 input 2 \B
wire width 2 output 3 \Y
cell $macc \UUT
parameter \A_WIDTH 3
parameter \B_WIDTH 0
parameter \CONFIG 10'0110000010
parameter \CONFIG_WIDTH 10
parameter \Y_WIDTH 2
connect \A \A
connect \B { }
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 6 input 1 \A
wire width 8 input 2 \B
wire width 2 output 3 \Y
cell $mod \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 6
parameter \B_SIGNED 0
parameter \B_WIDTH 8
parameter \Y_WIDTH 2
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 5 input 1 \A
wire width 7 input 2 \B
wire width 4 output 3 \Y
cell $modfloor \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 5
parameter \B_SIGNED 0
parameter \B_WIDTH 7
parameter \Y_WIDTH 4
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 6 input 1 \A
wire width 2 input 2 \B
wire width 5 output 3 \Y
cell $mul \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 6
parameter \B_SIGNED 0
parameter \B_WIDTH 2
parameter \Y_WIDTH 5
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,15 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 4 input 1 \A
wire width 4 input 2 \B
wire input 3 \S
wire width 4 output 4 \Y
cell $mux \UUT
parameter \WIDTH 4
connect \A \A
connect \B \B
connect \S \S
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 7 input 1 \A
wire width 5 input 2 \B
wire width 4 output 3 \Y
cell $ne \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 7
parameter \B_SIGNED 0
parameter \B_WIDTH 5
parameter \Y_WIDTH 4
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 2 input 1 \A
wire width 5 output 2 \Y
cell $neg \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 2
parameter \Y_WIDTH 5
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 7 input 1 \A
wire width 7 output 2 \Y
cell $not \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 7
parameter \Y_WIDTH 7
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 7 input 1 \A
wire input 2 \B
wire width 2 output 3 \Y
cell $or \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 7
parameter \B_SIGNED 1
parameter \B_WIDTH 1
parameter \Y_WIDTH 2
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire input 1 \A
wire width 3 output 2 \Y
cell $pos \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 1
parameter \Y_WIDTH 3
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 4 input 1 \A
wire width 5 output 2 \Y
cell $reduce_and \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 4
parameter \Y_WIDTH 5
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire input 1 \A
wire width 2 output 2 \Y
cell $reduce_bool \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 1
parameter \Y_WIDTH 2
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 2 input 1 \A
wire width 7 output 2 \Y
cell $reduce_or \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 2
parameter \Y_WIDTH 7
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 4 input 1 \A
wire width 4 output 2 \Y
cell $reduce_xnor \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 4
parameter \Y_WIDTH 4
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 4 input 1 \A
wire output 2 \Y
cell $reduce_xor \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 4
parameter \Y_WIDTH 1
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire input 1 \A
wire width 6 input 2 \B
wire width 4 output 3 \Y
cell $shift \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 1
parameter \B_SIGNED 1
parameter \B_WIDTH 6
parameter \Y_WIDTH 4
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire input 1 \A
wire width 5 input 2 \B
wire width 3 output 3 \Y
cell $shiftx \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 1
parameter \B_SIGNED 0
parameter \B_WIDTH 5
parameter \Y_WIDTH 3
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 8 input 1 \A
wire width 2 input 2 \B
wire width 3 output 3 \Y
cell $shl \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 8
parameter \B_SIGNED 0
parameter \B_WIDTH 2
parameter \Y_WIDTH 3
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 7 input 1 \A
wire width 6 input 2 \B
wire width 4 output 3 \Y
cell $shr \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 7
parameter \B_SIGNED 0
parameter \B_WIDTH 6
parameter \Y_WIDTH 4
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,13 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 8 input 1 \A
wire output 2 \Y
cell $sop \UUT
parameter \DEPTH 8
parameter \TABLE 128'10010000100100000101101010001001101000101010010100010000010100000101010100000001001010010110101010101010101000100100011001000110
parameter \WIDTH 8
connect \A \A
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 5 input 1 \A
wire width 3 input 2 \B
wire width 6 output 3 \Y
cell $sshl \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 5
parameter \B_SIGNED 0
parameter \B_WIDTH 3
parameter \Y_WIDTH 6
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 3 input 1 \A
wire width 2 input 2 \B
wire width 2 output 3 \Y
cell $sshr \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 3
parameter \B_SIGNED 0
parameter \B_WIDTH 2
parameter \Y_WIDTH 2
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 6 input 1 \A
wire width 6 input 2 \B
wire width 6 output 3 \Y
cell $sub \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 6
parameter \B_SIGNED 0
parameter \B_WIDTH 6
parameter \Y_WIDTH 6
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 7 input 1 \A
wire width 8 input 2 \B
wire width 7 output 3 \Y
cell $xnor \UUT
parameter \A_SIGNED 1
parameter \A_WIDTH 7
parameter \B_SIGNED 1
parameter \B_WIDTH 8
parameter \Y_WIDTH 7
connect \A \A
connect \B \B
connect \Y \Y
end
end

View file

@ -0,0 +1,17 @@
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os)
autoidx 1
module \gold
wire width 6 input 1 \A
wire width 2 input 2 \B
wire width 8 output 3 \Y
cell $xor \UUT
parameter \A_SIGNED 0
parameter \A_WIDTH 6
parameter \B_SIGNED 0
parameter \B_WIDTH 2
parameter \Y_WIDTH 8
connect \A \A
connect \B \B
connect \Y \Y
end
end