mirror of
https://github.com/ehw-fit/ariths-gen.git
synced 2025-04-16 20:10:49 +01:00

* #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>
18 lines
614 B
Python
18 lines
614 B
Python
"""
|
|
Support of custom PDK
|
|
|
|
This file defines functions for generating of full and half adders
|
|
directly on the level of CMOS modules.
|
|
|
|
You may add your own modules as in example in set_pdk45_library()
|
|
|
|
Please call this function before calling get_v_code_XXX()
|
|
"""
|
|
from .one_bit_circuits import (
|
|
one_bit_components
|
|
)
|
|
|
|
|
|
def set_pdk45_library():
|
|
one_bit_components.FullAdder.use_verilog_instance = "FAX1 {unit} (.A({wirea}), .B({wireb}), .C({wirec}), .YS({wireys}), .YC({wireyc}))"
|
|
one_bit_components.HalfAdder.use_verilog_instance = "HAX1 {unit} (.A({wirea}), .B({wireb}), .YS({wireys}), .YC({wireyc}))" |