Skip to content

EPFL-CS-472/kitty

This branch is 11 commits ahead of, 33 commits behind msoeken/kitty:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1cf5e1c · Nov 24, 2020
Nov 23, 2020
Mar 13, 2020
Apr 6, 2020
Mar 13, 2020
Nov 24, 2020
Nov 24, 2020
Nov 23, 2020
Mar 3, 2018
Mar 2, 2018
Dec 7, 2017
Sep 22, 2017
Jun 2, 2019
Nov 24, 2020
Mar 13, 2020
Sep 14, 2019
Dec 7, 2017

Repository files navigation

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

kitty

kitty is a C++-14 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.

About

C++ truth table library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 58.0%
  • C++ 41.1%
  • Other 0.9%