Jan Klhůfek 56c86c13ca
New multipliers (#13)
* #10 CGP Circuits as inputs (#11)

* CGP Circuits as inputs

* #10 support of signed output in general circuit

* input as output works

* output connected to input (c)

* automated verilog testing

* output rename

* Implemented CSA and Wallace tree multiplier composing of CSAs. Also did some code cleanup.

* Typos fix and code cleanup.

* Added new (approximate) multiplier architectures and did some minor changes regarding sign extension for c output formats.

* Updated automated testing scripts.

* Small bugfix in python code generation (I initially thought this line is useless).

* Updated generated circuits folder.

Co-authored-by: Vojta Mrazek <mrazek@fit.vutbr.cz>
2022-04-17 16:00:00 +02:00

129 lines
3.0 KiB
Plaintext

.model s_pg_rca8
.inputs a[0] a[1] a[2] a[3] a[4] a[5] a[6] a[7] b[0] b[1] b[2] b[3] b[4] b[5] b[6] b[7]
.outputs s_pg_rca8_out[0] s_pg_rca8_out[1] s_pg_rca8_out[2] s_pg_rca8_out[3] s_pg_rca8_out[4] s_pg_rca8_out[5] s_pg_rca8_out[6] s_pg_rca8_out[7] s_pg_rca8_out[8]
.names vdd
1
.names gnd
0
.names a[0] b[0] s_pg_rca8_pg_fa0_xor0
01 1
10 1
.names a[0] b[0] s_pg_rca8_pg_fa0_and0
11 1
.names a[1] b[1] s_pg_rca8_pg_fa1_xor0
01 1
10 1
.names a[1] b[1] s_pg_rca8_pg_fa1_and0
11 1
.names s_pg_rca8_pg_fa1_xor0 s_pg_rca8_pg_fa0_and0 s_pg_rca8_pg_fa1_xor1
01 1
10 1
.names s_pg_rca8_pg_fa0_and0 s_pg_rca8_pg_fa1_xor0 s_pg_rca8_and1
11 1
.names s_pg_rca8_and1 s_pg_rca8_pg_fa1_and0 s_pg_rca8_or1
1- 1
-1 1
.names a[2] b[2] s_pg_rca8_pg_fa2_xor0
01 1
10 1
.names a[2] b[2] s_pg_rca8_pg_fa2_and0
11 1
.names s_pg_rca8_pg_fa2_xor0 s_pg_rca8_or1 s_pg_rca8_pg_fa2_xor1
01 1
10 1
.names s_pg_rca8_or1 s_pg_rca8_pg_fa2_xor0 s_pg_rca8_and2
11 1
.names s_pg_rca8_and2 s_pg_rca8_pg_fa2_and0 s_pg_rca8_or2
1- 1
-1 1
.names a[3] b[3] s_pg_rca8_pg_fa3_xor0
01 1
10 1
.names a[3] b[3] s_pg_rca8_pg_fa3_and0
11 1
.names s_pg_rca8_pg_fa3_xor0 s_pg_rca8_or2 s_pg_rca8_pg_fa3_xor1
01 1
10 1
.names s_pg_rca8_or2 s_pg_rca8_pg_fa3_xor0 s_pg_rca8_and3
11 1
.names s_pg_rca8_and3 s_pg_rca8_pg_fa3_and0 s_pg_rca8_or3
1- 1
-1 1
.names a[4] b[4] s_pg_rca8_pg_fa4_xor0
01 1
10 1
.names a[4] b[4] s_pg_rca8_pg_fa4_and0
11 1
.names s_pg_rca8_pg_fa4_xor0 s_pg_rca8_or3 s_pg_rca8_pg_fa4_xor1
01 1
10 1
.names s_pg_rca8_or3 s_pg_rca8_pg_fa4_xor0 s_pg_rca8_and4
11 1
.names s_pg_rca8_and4 s_pg_rca8_pg_fa4_and0 s_pg_rca8_or4
1- 1
-1 1
.names a[5] b[5] s_pg_rca8_pg_fa5_xor0
01 1
10 1
.names a[5] b[5] s_pg_rca8_pg_fa5_and0
11 1
.names s_pg_rca8_pg_fa5_xor0 s_pg_rca8_or4 s_pg_rca8_pg_fa5_xor1
01 1
10 1
.names s_pg_rca8_or4 s_pg_rca8_pg_fa5_xor0 s_pg_rca8_and5
11 1
.names s_pg_rca8_and5 s_pg_rca8_pg_fa5_and0 s_pg_rca8_or5
1- 1
-1 1
.names a[6] b[6] s_pg_rca8_pg_fa6_xor0
01 1
10 1
.names a[6] b[6] s_pg_rca8_pg_fa6_and0
11 1
.names s_pg_rca8_pg_fa6_xor0 s_pg_rca8_or5 s_pg_rca8_pg_fa6_xor1
01 1
10 1
.names s_pg_rca8_or5 s_pg_rca8_pg_fa6_xor0 s_pg_rca8_and6
11 1
.names s_pg_rca8_and6 s_pg_rca8_pg_fa6_and0 s_pg_rca8_or6
1- 1
-1 1
.names a[7] b[7] s_pg_rca8_pg_fa7_xor0
01 1
10 1
.names a[7] b[7] s_pg_rca8_pg_fa7_and0
11 1
.names s_pg_rca8_pg_fa7_xor0 s_pg_rca8_or6 s_pg_rca8_pg_fa7_xor1
01 1
10 1
.names s_pg_rca8_or6 s_pg_rca8_pg_fa7_xor0 s_pg_rca8_and7
11 1
.names s_pg_rca8_and7 s_pg_rca8_pg_fa7_and0 s_pg_rca8_or7
1- 1
-1 1
.names a[7] b[7] s_pg_rca8_xor0
01 1
10 1
.names s_pg_rca8_xor0 s_pg_rca8_or7 s_pg_rca8_xor1
01 1
10 1
.names s_pg_rca8_pg_fa0_xor0 s_pg_rca8_out[0]
1 1
.names s_pg_rca8_pg_fa1_xor1 s_pg_rca8_out[1]
1 1
.names s_pg_rca8_pg_fa2_xor1 s_pg_rca8_out[2]
1 1
.names s_pg_rca8_pg_fa3_xor1 s_pg_rca8_out[3]
1 1
.names s_pg_rca8_pg_fa4_xor1 s_pg_rca8_out[4]
1 1
.names s_pg_rca8_pg_fa5_xor1 s_pg_rca8_out[5]
1 1
.names s_pg_rca8_pg_fa6_xor1 s_pg_rca8_out[6]
1 1
.names s_pg_rca8_pg_fa7_xor1 s_pg_rca8_out[7]
1 1
.names s_pg_rca8_xor1 s_pg_rca8_out[8]
1 1
.end