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

63 lines
1.2 KiB
Plaintext

.model u_rca4
.inputs a[0] a[1] a[2] a[3] b[0] b[1] b[2] b[3]
.outputs u_rca4_out[0] u_rca4_out[1] u_rca4_out[2] u_rca4_out[3] u_rca4_out[4]
.names vdd
1
.names gnd
0
.names a[0] b[0] u_rca4_ha_xor0
01 1
10 1
.names a[0] b[0] u_rca4_ha_and0
11 1
.names a[1] b[1] u_rca4_fa1_xor0
01 1
10 1
.names a[1] b[1] u_rca4_fa1_and0
11 1
.names u_rca4_fa1_xor0 u_rca4_ha_and0 u_rca4_fa1_xor1
01 1
10 1
.names u_rca4_fa1_xor0 u_rca4_ha_and0 u_rca4_fa1_and1
11 1
.names u_rca4_fa1_and0 u_rca4_fa1_and1 u_rca4_fa1_or0
1- 1
-1 1
.names a[2] b[2] u_rca4_fa2_xor0
01 1
10 1
.names a[2] b[2] u_rca4_fa2_and0
11 1
.names u_rca4_fa2_xor0 u_rca4_fa1_or0 u_rca4_fa2_xor1
01 1
10 1
.names u_rca4_fa2_xor0 u_rca4_fa1_or0 u_rca4_fa2_and1
11 1
.names u_rca4_fa2_and0 u_rca4_fa2_and1 u_rca4_fa2_or0
1- 1
-1 1
.names a[3] b[3] u_rca4_fa3_xor0
01 1
10 1
.names a[3] b[3] u_rca4_fa3_and0
11 1
.names u_rca4_fa3_xor0 u_rca4_fa2_or0 u_rca4_fa3_xor1
01 1
10 1
.names u_rca4_fa3_xor0 u_rca4_fa2_or0 u_rca4_fa3_and1
11 1
.names u_rca4_fa3_and0 u_rca4_fa3_and1 u_rca4_fa3_or0
1- 1
-1 1
.names u_rca4_ha_xor0 u_rca4_out[0]
1 1
.names u_rca4_fa1_xor1 u_rca4_out[1]
1 1
.names u_rca4_fa2_xor1 u_rca4_out[2]
1 1
.names u_rca4_fa3_xor1 u_rca4_out[3]
1 1
.names u_rca4_fa3_or0 u_rca4_out[4]
1 1
.end