PandA-2024.02
Data Structures | Macros | Typedefs | Functions
lut_transformation.cpp File Reference

identify and optimize lut expressions. More...

#include "lut_transformation.hpp"
#include <kitty/print.hpp>
#include <mockturtle/algorithms/aig_resub.hpp>
#include <mockturtle/algorithms/balancing.hpp>
#include <mockturtle/algorithms/balancing/sop_balancing.hpp>
#include <mockturtle/algorithms/cleanup.hpp>
#include <mockturtle/algorithms/collapse_mapped.hpp>
#include <mockturtle/algorithms/cut_rewriting.hpp>
#include <mockturtle/algorithms/functional_reduction.hpp>
#include <mockturtle/algorithms/lut_mapping.hpp>
#include <mockturtle/algorithms/node_resynthesis.hpp>
#include <mockturtle/algorithms/node_resynthesis/bidecomposition.hpp>
#include <mockturtle/algorithms/node_resynthesis/dsd.hpp>
#include <mockturtle/algorithms/node_resynthesis/shannon.hpp>
#include <mockturtle/algorithms/node_resynthesis/xag_npn.hpp>
#include <mockturtle/algorithms/refactoring.hpp>
#include <mockturtle/generators/arithmetic.hpp>
#include <mockturtle/io/write_bench.hpp>
#include <mockturtle/networks/aig.hpp>
#include <mockturtle/networks/klut.hpp>
#include <mockturtle/views/mapping_view.hpp>
#include <type_traits>
#include "Parameter.hpp"
#include "allocation_constants.hpp"
#include "application_manager.hpp"
#include "behavioral_helper.hpp"
#include "dbgPrintHelper.hpp"
#include "design_flow_graph.hpp"
#include "design_flow_manager.hpp"
#include "function_behavior.hpp"
#include "hls_device.hpp"
#include "hls_manager.hpp"
#include "math_function.hpp"
#include "string_manipulation.hpp"
#include "technology_flow_step.hpp"
#include "technology_flow_step_factory.hpp"
#include "technology_manager.hpp"
#include "technology_node.hpp"
#include "time_info.hpp"
#include "tree_basic_block.hpp"
#include "tree_helper.hpp"
#include "tree_manager.hpp"
#include "tree_manipulation.hpp"
#include "tree_reindex.hpp"
#include <fstream>
Include dependency graph for lut_transformation.cpp:

Go to the source code of this file.

Data Structures

class  klut_network_ext
 klut_network_ext class provides operations derived from the one already existing in mockturtle::klut_network. More...
 
struct  klut_network_node
 Helper structure that better represents a mockturtle::klut_network's node. More...
 

Macros

#define USE_SAT   0
 
#define LIN64
 
#define ABC_NAMESPACE   pabc
 
#define ABC_NO_USE_READLINE
 
#define FMT_HEADER_ONLY   1
 
#define PHMAP_BIDIRECTIONAL   0
 
#define MCDBGQ_NOLOCKFREE_FREELIST   0
 
#define MCDBGQ_TRACKMEM   0
 
#define MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX   0
 
#define MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH   0
 
#define MCDBGQ_USEDEBUGFREELIST   0
 
#define DISABLE_NAUTY
 
#define MIG_SYNTHESIS   0
 
#define VECT_CONTAINS(v, x)   (std::find((v).begin(), (v).end(), x) != (v).end())
 

Typedefs

using klut_network_fn = mockturtle::klut_network::signal(klut_network_ext::*)(const mockturtle::klut_network::signal, const mockturtle::klut_network::signal)
 Pointer that points to a function of klut_network_ext, that represents a binary operation between two mockturtle::klut_network::signals and returns a mockturtle::klut_network::signal. More...
 
using klut_network_fn_v = std::vector< mockturtle::klut_network::signal >(klut_network_ext::*)(const std::vector< mockturtle::klut_network::signal > &, const std::vector< mockturtle::klut_network::signal > &, bool)
 Pointer that points to a function of klut_network_ext, that represents a binary operation between two std::vector<mockturtle::klut_network::signal>s and returns a std::vector<mockturtle::klut_network::signal>. More...
 

Functions

static klut_network_fn GetBooleanNodeCreationFunction (enum kind code)
 
static std::vector< boolIntegerToBitArray (integer_cst_t n, size_t size)
 
static klut_network_fn_v GetIntegerNodeCreationFunction (enum kind code)
 
static std::string ConvertBitsToString (const std::vector< bool > &bits, const std::string &true_string="vdd", const std::string &false_string="gnd", const std::string &sep=", ")
 
template<typename T >
static T ConvertHexToNumber (const std::string &hex0)
 
static void ParseKLutNetwork (const mockturtle::klut_network &klut, std::vector< klut_network_node > &luts)
 
template<class kne >
static mockturtle::klut_network SimplifyLutNetwork (const kne &klut_e, size_t max_lut_size)
 

Detailed Description

identify and optimize lut expressions.

Author
Marco Speziali
Davide Toschi
Fabrizio Ferrandi fabri.nosp@m.zio..nosp@m.ferra.nosp@m.ndi@.nosp@m.polim.nosp@m.i.it

Definition in file lut_transformation.cpp.

Macro Definition Documentation

◆ ABC_NAMESPACE

#define ABC_NAMESPACE   pabc

Definition at line 49 of file lut_transformation.cpp.

◆ ABC_NO_USE_READLINE

#define ABC_NO_USE_READLINE

Definition at line 50 of file lut_transformation.cpp.

◆ DISABLE_NAUTY

#define DISABLE_NAUTY

Definition at line 59 of file lut_transformation.cpp.

◆ FMT_HEADER_ONLY

#define FMT_HEADER_ONLY   1

Definition at line 52 of file lut_transformation.cpp.

◆ LIN64

#define LIN64

Definition at line 48 of file lut_transformation.cpp.

◆ MCDBGQ_NOLOCKFREE_FREELIST

#define MCDBGQ_NOLOCKFREE_FREELIST   0

Definition at line 54 of file lut_transformation.cpp.

◆ MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX

#define MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX   0

Definition at line 56 of file lut_transformation.cpp.

◆ MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH

#define MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH   0

Definition at line 57 of file lut_transformation.cpp.

◆ MCDBGQ_TRACKMEM

#define MCDBGQ_TRACKMEM   0

Definition at line 55 of file lut_transformation.cpp.

◆ MCDBGQ_USEDEBUGFREELIST

#define MCDBGQ_USEDEBUGFREELIST   0

Definition at line 58 of file lut_transformation.cpp.

◆ MIG_SYNTHESIS

#define MIG_SYNTHESIS   0

Definition at line 60 of file lut_transformation.cpp.

◆ PHMAP_BIDIRECTIONAL

#define PHMAP_BIDIRECTIONAL   0

Definition at line 53 of file lut_transformation.cpp.

◆ USE_SAT

#define USE_SAT   0

Definition at line 46 of file lut_transformation.cpp.

◆ VECT_CONTAINS

#define VECT_CONTAINS (   v,
  x 
)    (std::find((v).begin(), (v).end(), x) != (v).end())

Typedef Documentation

◆ klut_network_fn

using klut_network_fn = mockturtle::klut_network::signal (klut_network_ext::*)(const mockturtle::klut_network::signal, const mockturtle::klut_network::signal)

Pointer that points to a function of klut_network_ext, that represents a binary operation between two mockturtle::klut_network::signals and returns a mockturtle::klut_network::signal.

Definition at line 558 of file lut_transformation.cpp.

◆ klut_network_fn_v

using klut_network_fn_v = std::vector<mockturtle::klut_network::signal> (klut_network_ext::*)( const std::vector<mockturtle::klut_network::signal>&, const std::vector<mockturtle::klut_network::signal>&, bool)

Pointer that points to a function of klut_network_ext, that represents a binary operation between two std::vector<mockturtle::klut_network::signal>s and returns a std::vector<mockturtle::klut_network::signal>.

Definition at line 565 of file lut_transformation.cpp.

Function Documentation

◆ ConvertBitsToString()

static std::string ConvertBitsToString ( const std::vector< bool > &  bits,
const std::string &  true_string = "vdd",
const std::string &  false_string = "gnd",
const std::string &  sep = ", " 
)
static

Definition at line 783 of file lut_transformation.cpp.

Referenced by lut_transformation::ProcessBasicBlock().

Here is the caller graph for this function:

◆ ConvertHexToNumber()

template<typename T >
static T ConvertHexToNumber ( const std::string &  hex0)
static

Definition at line 802 of file lut_transformation.cpp.

References x.

◆ GetBooleanNodeCreationFunction()

static klut_network_fn GetBooleanNodeCreationFunction ( enum kind  code)
static

Definition at line 695 of file lut_transformation.cpp.

References klut_network_ext::create_eq(), klut_network_ext::create_ge(), klut_network_ext::create_gt(), and klut_network_ext::create_ne().

Referenced by lut_transformation::ProcessBasicBlock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIntegerNodeCreationFunction()

static klut_network_fn_v GetIntegerNodeCreationFunction ( enum kind  code)
static

◆ IntegerToBitArray()

static std::vector<bool> IntegerToBitArray ( integer_cst_t  n,
size_t  size 
)
static

Definition at line 726 of file lut_transformation.cpp.

References container_to_string(), STR, and THROW_ASSERT.

Referenced by lut_transformation::ProcessBasicBlock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseKLutNetwork()

static void ParseKLutNetwork ( const mockturtle::klut_network &  klut,
std::vector< klut_network_node > &  luts 
)
static

Definition at line 812 of file lut_transformation.cpp.

Referenced by lut_transformation::ProcessBasicBlock().

Here is the caller graph for this function:

◆ SimplifyLutNetwork()

template<class kne >
static mockturtle::klut_network SimplifyLutNetwork ( const kne &  klut_e,
size_t  max_lut_size 
)
static

scripts taken from https://github.com/lnis-uofu/LSOracle

Definition at line 884 of file lut_transformation.cpp.

References lut_transformation::max_lut_size.

Referenced by lut_transformation::ProcessBasicBlock().

Here is the caller graph for this function:

Generated on Mon Feb 12 2024 13:03:20 for PandA-2024.02 by doxygen 1.8.13