openfpga/src/fabric/build_essential_modules.cpp
/*********************************************************************
 * This function will build a constant generator modules 
 * and add it to the module manager
 * It could be either
 * 1. VDD or 2. GND
 * Each module will have only one output port
 ********************************************************************/
This function will build a constant generator modules
and add it to the module manager
It could be either
1. VDD or 2. GND
Each module will have only one output port
This function will build a constant generator modules and add it to the module manager It could be either 1 . VDD or 2 . GND Each module will have only one output port
static 
void build_constant_generator_module(ModuleManager& module_manager, 
                                     const size_t& const_value) {
  ModuleId const_module = module_manager.add_module(generate_const_value_module_name(const_value));
  BasicPort const_output_port(generate_const_value_module_output_port_name(const_value), 1);
  module_manager.add_port(const_module, const_output_port, ModuleManager::MODULE_OUTPUT_PORT);
  if (1 == const_value) {
    module_manager.set_module_usage(const_module, ModuleManager::MODULE_VDD);
  } else {
    VTR_ASSERT(0 == const_value);
    module_manager.set_module_usage(const_module, ModuleManager::MODULE_VSS);
  }
}
static void build_constant_generator_module ( ModuleManager & module_manager , const size_t & const_value ) { ModuleId const_module = module_manager . add_module ( generate_const_value_module_name ( const_value ) ) ; BasicPort const_output_port ( generate_const_value_module_output_port_name ( const_value ) , 1 ) ; module_manager . add_port ( const_module , const_output_port , ModuleManager :: MODULE_OUTPUT_PORT ) ; if ( 1 == const_value ) { module_manager . set_module_usage ( const_module , ModuleManager :: MODULE_VDD ) ; } else { VTR_ASSERT ( 0 == const_value ) ; module_manager . set_module_usage ( const_module , ModuleManager :: MODULE_VSS ) ; } }
This function will build a constant generator modules
 and add it to the module manager
 It could be either
 1.
This function will build a constant generator modules and add it to the module manager It could be either 1 .
/* Add one output port */ /* Specify the usage of this module 
   * 1: VDD
   * 0: GND
   */