All Projects → msoeken → kitty

msoeken / kitty

Licence: MIT License
C++ truth table library

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to kitty

pdsl
The expressive declarative toolkit for composing predicates in TypeScript or JavaScript
Stars: ✭ 64 (+128.57%)
Mutual labels:  boolean-function
yosys
Logic synthesis and ABC based optimization
Stars: ✭ 25 (-10.71%)
Mutual labels:  logic-synthesis
lstools-showcase
Showcase examples for EPFL logic synthesis libraries
Stars: ✭ 115 (+310.71%)
Mutual labels:  logic-synthesis
LSOracle
IDEA project source files
Stars: ✭ 50 (+78.57%)
Mutual labels:  logic-synthesis
digital-flow
This is a tutorial on standard digital design flow
Stars: ✭ 28 (+0%)
Mutual labels:  logic-synthesis

Actions Status Actions Status Actions Status Documentation Status Latest release License: MIT

kitty

kitty is a C++-17 truth table library. It provides efficient implementations for basic truth table manipulations and various algorithms.

Read the full documentation.

Example

The following code snippet generates truth tables for the 3-variable functions sum and carry for a 1-bit full-adder with carry.

#include <kitty/kitty.hpp>

dynamic_truth_table a( 3 ), b( 3 ), c( 3 );

create_nth_var( a, 0 );
create_nth_var( b, 1 );
create_nth_var( c, 2 );

const auto sum = a ^ b ^ c;
const auto carry = ternary_majority( a, b, c );

One can use static_truth_table instead of dynamic_truth_table, if the number of variables is known at compile-time. The interface stays the same.

#include <kitty/kitty.hpp>

static_truth_table<3> a, b, c;

create_nth_var( a, 0 );
create_nth_var( b, 1 );
create_nth_var( c, 2 );

const auto sum = a ^ b ^ c;
const auto carry = ternary_majority( a, b, c );

EPFL logic sythesis libraries

kitty is part of the EPFL logic synthesis libraries. The other libraries and several examples on how to use and integrate the libraries can be found in the logic synthesis tool showcase.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].