openfpga/src/mux_lib/mux_library.cpp
/* Add a mux to the library */
Add a mux to the library
Add a mux to the library
void MuxLibrary::add_mux(const CircuitLibrary& circuit_lib, const CircuitModelId& circuit_model, const size_t& mux_size) {
  if (valid_mux_size(circuit_model, mux_size)) {
    return;
  }
  MuxId mux = MuxId(mux_ids_.size());
  mux_ids_.push_back(mux);
  mux_graphs_.push_back(MuxGraph(circuit_lib, circuit_model, mux_size));
  mux_circuit_models_.push_back(circuit_model);
  mux_lookup_[circuit_model][mux_size] = mux;
}
void MuxLibrary :: add_mux ( const CircuitLibrary & circuit_lib , const CircuitModelId & circuit_model , const size_t & mux_size ) { if ( valid_mux_size ( circuit_model , mux_size ) ) { return ; } MuxId mux = MuxId ( mux_ids_ . size ( ) ) ; mux_ids_ . push_back ( mux ) ; mux_graphs_ . push_back ( MuxGraph ( circuit_lib , circuit_model , mux_size ) ) ; mux_circuit_models_ . push_back ( circuit_model ) ; mux_lookup_ [ circuit_model ] [ mux_size ] = mux ; }
Add a mux to the library
Add a mux to the library
/* First, check if there is already an existing graph */ /* create a new id for the mux */ /* Push to the node list */ /* Add a mux graph */ /* Recorde mux cirucit model id */ /* update mux_lookup*/