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

69 lines
1.5 KiB
Plaintext

.model s_pg_rca4
.inputs a[0] a[1] a[2] a[3] b[0] b[1] b[2] b[3]
.outputs s_pg_rca4_out[0] s_pg_rca4_out[1] s_pg_rca4_out[2] s_pg_rca4_out[3] s_pg_rca4_out[4]
.names vdd
1
.names gnd
0
.names a[0] b[0] s_pg_rca4_pg_fa0_xor0
01 1
10 1
.names a[0] b[0] s_pg_rca4_pg_fa0_and0
11 1
.names a[1] b[1] s_pg_rca4_pg_fa1_xor0
01 1
10 1
.names a[1] b[1] s_pg_rca4_pg_fa1_and0
11 1
.names s_pg_rca4_pg_fa1_xor0 s_pg_rca4_pg_fa0_and0 s_pg_rca4_pg_fa1_xor1
01 1
10 1
.names s_pg_rca4_pg_fa0_and0 s_pg_rca4_pg_fa1_xor0 s_pg_rca4_and1
11 1
.names s_pg_rca4_and1 s_pg_rca4_pg_fa1_and0 s_pg_rca4_or1
1- 1
-1 1
.names a[2] b[2] s_pg_rca4_pg_fa2_xor0
01 1
10 1
.names a[2] b[2] s_pg_rca4_pg_fa2_and0
11 1
.names s_pg_rca4_pg_fa2_xor0 s_pg_rca4_or1 s_pg_rca4_pg_fa2_xor1
01 1
10 1
.names s_pg_rca4_or1 s_pg_rca4_pg_fa2_xor0 s_pg_rca4_and2
11 1
.names s_pg_rca4_and2 s_pg_rca4_pg_fa2_and0 s_pg_rca4_or2
1- 1
-1 1
.names a[3] b[3] s_pg_rca4_pg_fa3_xor0
01 1
10 1
.names a[3] b[3] s_pg_rca4_pg_fa3_and0
11 1
.names s_pg_rca4_pg_fa3_xor0 s_pg_rca4_or2 s_pg_rca4_pg_fa3_xor1
01 1
10 1
.names s_pg_rca4_or2 s_pg_rca4_pg_fa3_xor0 s_pg_rca4_and3
11 1
.names s_pg_rca4_and3 s_pg_rca4_pg_fa3_and0 s_pg_rca4_or3
1- 1
-1 1
.names a[3] b[3] s_pg_rca4_xor0
01 1
10 1
.names s_pg_rca4_xor0 s_pg_rca4_or3 s_pg_rca4_xor1
01 1
10 1
.names s_pg_rca4_pg_fa0_xor0 s_pg_rca4_out[0]
1 1
.names s_pg_rca4_pg_fa1_xor1 s_pg_rca4_out[1]
1 1
.names s_pg_rca4_pg_fa2_xor1 s_pg_rca4_out[2]
1 1
.names s_pg_rca4_pg_fa3_xor1 s_pg_rca4_out[3]
1 1
.names s_pg_rca4_xor1 s_pg_rca4_out[4]
1 1
.end