Пример #1
0
/*! \brief Initialize variables in TOPLEVEL object
 *  \par Function Description
 *  This function will initialize variables to default values.
 *
 *  \param [out] toplevel  The TOPLEVEL object to be updated.
 *
 */
void i_vars_libgeda_set(TOPLEVEL *toplevel)
{
  GList *iter;

  toplevel->init_right   = default_init_right;
  toplevel->init_bottom  = default_init_bottom;

  toplevel->attribute_promotion = default_attribute_promotion;
  toplevel->promote_invisible = default_promote_invisible;
  toplevel->keep_invisible = default_keep_invisible;

  /* copy the always_promote_attributes list from the default */
  g_list_foreach(toplevel->always_promote_attributes, (GFunc) g_free, NULL);
  g_list_free(toplevel->always_promote_attributes);
  toplevel->always_promote_attributes = g_list_copy(default_always_promote_attributes);
  for (iter = toplevel->always_promote_attributes; iter != NULL;
       iter = g_list_next(iter))
    iter->data = g_strdup(iter->data);

  /* you cannot free the default* strings here since new windows */
  /* need them */
  INIT_STR(toplevel, untitled_name   , DEFAULT_UNTITLED_NAME   );
  INIT_STR(toplevel, bitmap_directory, DEFAULT_BITMAP_DIRECTORY);
  INIT_STR(toplevel, bus_ripper_symname, DEFAULT_BUS_RIPPER_SYMNAME);
  INIT_STR(toplevel, postscript_prolog,  DEFAULT_POSTSCRIPT_PROLOG);
}
Пример #2
0
indigo_error_t
ind_core_init(ind_core_config_t *config)
{
    ft_config_t ft_config;

    INDIGO_MEM_COPY(&ind_core_config, config, sizeof(*config));

    LOG_TRACE("OF state mgr init called");

    if (ind_core_init_done) {
        return INDIGO_ERROR_NONE;
    }

    ind_cfg_register(&ind_core_cfg_ops);

    /* Give some values to desc stats members */
    INIT_STR(ind_core_of_config.desc_stats.sw_desc,
             IND_CORE_SW_DESC_DEFAULT);
    INIT_STR(ind_core_of_config.desc_stats.hw_desc,
             IND_CORE_HW_DESC_DEFAULT);
    INIT_STR(ind_core_of_config.desc_stats.dp_desc,
             IND_CORE_DP_DESC_DEFAULT);
    INIT_STR(ind_core_of_config.desc_stats.mfr_desc,
             IND_CORE_MFR_DESC_DEFAULT);
    INIT_STR(ind_core_of_config.desc_stats.serial_num,
             IND_CORE_SERIAL_NUM_DEFAULT);

    /* Create flow table */
    if (config->max_flowtable_entries == 0) {
        /* Default value */
        config->max_flowtable_entries = 16384;
    }
    ft_config.strict_match_bucket_count = config->max_flowtable_entries;
    ft_config.flow_id_bucket_count = config->max_flowtable_entries;

    if ((ind_core_ft = ft_create(&ft_config)) == NULL) {
        LOG_ERROR("Unable to allocate flow table\n");
        return INDIGO_ERROR_RESOURCE;
    }

    ind_core_connection_count = 0;

    ind_core_init_done = 1;

    return INDIGO_ERROR_NONE;
}
Пример #3
0
static void initDerivO3CPUParams( DerivO3CPUParams& cpu,
                                  const Params& sstParams, System* system, SST::Component* comp )
{
    initBaseCPUParams( cpu, sstParams.find_prefix_params("base."),
                       system, comp );

    cpu.fuPool = newFUPool( cpu.name + ".fuPool" );

    const Params tmp = sstParams.find_prefix_params( "o3cpu." );

    INIT_INT(cpu,tmp,fetchTrapLatency);
    INIT_INT(cpu,tmp,trapLatency);
    INIT_INT(cpu,tmp,smtIQThreshold);
    INIT_INT(cpu,tmp,smtLSQThreshold);
    INIT_INT(cpu,tmp,smtROBThreshold);
    INIT_STR(cpu,tmp,predType);
    INIT_STR(cpu,tmp,smtCommitPolicy);
    INIT_STR(cpu,tmp,smtFetchPolicy);
    INIT_STR(cpu,tmp,smtIQPolicy);
    INIT_STR(cpu,tmp,smtLSQPolicy);
    INIT_STR(cpu,tmp,smtROBPolicy);
    INIT_INT(cpu,tmp,BTBEntries);
    INIT_INT(cpu,tmp,BTBTagSize);
    INIT_INT(cpu,tmp,LFSTSize);
    INIT_INT(cpu,tmp,LQEntries);
    INIT_INT(cpu,tmp,RASSize);
    INIT_INT(cpu,tmp,SQEntries);
    INIT_INT(cpu,tmp,SSITSize);
    INIT_INT(cpu,tmp,store_set_clear_period);
    INIT_INT(cpu,tmp,activity);
    INIT_INT(cpu,tmp,backComSize);
    INIT_INT(cpu,tmp,cachePorts);
    INIT_INT(cpu,tmp,choiceCtrBits);
    INIT_INT(cpu,tmp,choicePredictorSize);
    INIT_INT(cpu,tmp,commitToDecodeDelay);
    INIT_INT(cpu,tmp,commitToFetchDelay);
    INIT_INT(cpu,tmp,commitToIEWDelay);
    INIT_INT(cpu,tmp,commitToRenameDelay);
    INIT_INT(cpu,tmp,commitWidth);
    INIT_INT(cpu,tmp,decodeToFetchDelay);
    INIT_INT(cpu,tmp,decodeToRenameDelay);
    INIT_INT(cpu,tmp,decodeWidth);
    INIT_INT(cpu,tmp,dispatchWidth);
    INIT_INT(cpu,tmp,fetchToDecodeDelay);
    INIT_INT(cpu,tmp,fetchWidth);
    INIT_INT(cpu,tmp,forwardComSize);
    INIT_INT(cpu,tmp,globalCtrBits);
    INIT_INT(cpu,tmp,globalHistoryBits);
    INIT_INT(cpu,tmp,globalPredictorSize);
    INIT_INT(cpu,tmp,iewToCommitDelay);
    INIT_INT(cpu,tmp,iewToDecodeDelay);
    INIT_INT(cpu,tmp,iewToFetchDelay);
    INIT_INT(cpu,tmp,iewToRenameDelay);
    INIT_INT(cpu,tmp,instShiftAmt);
    INIT_INT(cpu,tmp,issueToExecuteDelay);
    INIT_INT(cpu,tmp,issueWidth);
    INIT_INT(cpu,tmp,localCtrBits);
    INIT_INT(cpu,tmp,localHistoryBits);
    INIT_INT(cpu,tmp,localHistoryTableSize);
    INIT_INT(cpu,tmp,localPredictorSize);
    INIT_INT(cpu,tmp,numIQEntries);
    INIT_INT(cpu,tmp,numPhysFloatRegs);
    INIT_INT(cpu,tmp,numPhysIntRegs);
    INIT_INT(cpu,tmp,numROBEntries);
    INIT_INT(cpu,tmp,numRobs);
    INIT_INT(cpu,tmp,renameToDecodeDelay);
    INIT_INT(cpu,tmp,renameToFetchDelay);
    INIT_INT(cpu,tmp,renameToIEWDelay);
    INIT_INT(cpu,tmp,renameToROBDelay);
    INIT_INT(cpu,tmp,renameWidth);
    INIT_INT(cpu,tmp,smtNumFetchingThreads);
    INIT_INT(cpu,tmp,squashWidth);
    INIT_INT(cpu,tmp,wbDepth);
    INIT_INT(cpu,tmp,wbWidth);
    INIT_INT(cpu,tmp,LSQDepCheckShift);
    INIT_BOOL(cpu,tmp,LSQCheckLoads );
}
Пример #4
0
/*! \todo Finish function documentation!!!
 *  \brief
 *  \par Function Description
 *
 */
void i_vars_set(GSCHEM_TOPLEVEL *w_current)
{
    TOPLEVEL *toplevel = w_current->toplevel;
    i_vars_libgeda_set(toplevel);

    /* this will be false if logging cannot be enabled */
    if (do_logging != FALSE) {
        do_logging = default_do_logging;
    }

    logging_dest = default_logging_dest;

    w_current->text_size     = default_text_size;
    w_current->text_caps     = default_text_caps;

    toplevel->background_color = default_background_color;

    toplevel->net_style          = default_net_style;
    w_current->net_endpoint_mode  = default_net_endpoint_mode;
    w_current->net_midpoint_mode  = default_net_midpoint_mode;
    w_current->net_direction_mode = default_net_direction_mode;
    w_current->net_selection_mode = default_net_selection_mode;

    toplevel->override_net_color = default_override_net_color;

    toplevel->bus_style          = default_bus_style;
    toplevel->override_bus_color = default_override_bus_color;

    toplevel->pin_style          = default_pin_style;
    toplevel->override_pin_color = default_override_pin_color;

    toplevel->line_style         = default_line_style;

    w_current->zoom_with_pan           = default_zoom_with_pan;
    w_current->actionfeedback_mode     = default_actionfeedback_mode;
    w_current->text_display_zoomfactor = default_text_display_zoomfactor;
    w_current->text_feedback           = default_text_feedback;
    w_current->scrollbars_flag         = default_scrollbars_flag;

    toplevel->object_clipping = default_object_clipping;
    w_current->embed_complex   = default_embed_complex;
    w_current->include_complex = default_include_complex;
    w_current->snap_size       = default_snap_size;
    w_current->log_window      = default_log_window;
    w_current->log_window_type = default_log_window_type;

    INIT_STR(w_current, print_command, DEFAULT_PRINT_COMMAND);

    toplevel->print_output_type      = default_print_output_type;
    toplevel->print_output_capstyle  = default_print_output_capstyle;
    toplevel->print_orientation      = default_print_orientation;
    toplevel->print_color            = default_print_color;
    toplevel->print_color_background = default_print_color_background;
    toplevel->setpagedevice_orientation = default_setpagedevice_orientation;
    toplevel->setpagedevice_pagesize = default_setpagedevice_pagesize;

    toplevel->image_color        = default_image_color;
    w_current->image_width        = default_image_width;
    w_current->image_height       = default_image_height;
    w_current->third_button       = default_third_button;
    w_current->middle_button      = default_middle_button;
    w_current->scroll_wheel       = default_scroll_wheel;
    toplevel->net_consolidate    = default_net_consolidate;
    w_current->file_preview       = default_file_preview;
    w_current->enforce_hierarchy  = default_enforce_hierarchy;
    w_current->text_origin_marker = default_text_origin_marker;
    w_current->fast_mousepan      = default_fast_mousepan;
    w_current->raise_dialog_boxes = default_raise_dialog_boxes;
    w_current->continue_component_place = default_continue_component_place;
    w_current->component_select_attrlist = default_component_select_attrlist;
    w_current->undo_levels = default_undo_levels;
    w_current->undo_control = default_undo_control;
    w_current->undo_type = default_undo_type;
    w_current->undo_panzoom = default_undo_panzoom;

    w_current->draw_grips = default_draw_grips;
    w_current->netconn_rubberband = default_netconn_rubberband;
    w_current->magneticnet_mode = default_magnetic_net_mode;
    w_current->sort_component_library = default_sort_component_library;
    w_current->warp_cursor = default_warp_cursor;
    w_current->toolbars = default_toolbars;
    w_current->handleboxes = default_handleboxes;

    toplevel->paper_width  = default_paper_width;
    toplevel->paper_height = default_paper_height;

    w_current->bus_ripper_size  = default_bus_ripper_size;
    w_current->bus_ripper_type  = default_bus_ripper_type;
    w_current->bus_ripper_rotation  = default_bus_ripper_rotation;

    toplevel->force_boundingbox  = default_force_boundingbox;

    w_current->dots_grid_dot_size          = default_dots_grid_dot_size;
    w_current->dots_grid_mode              = default_dots_grid_mode;
    w_current->dots_grid_fixed_threshold   = default_dots_grid_fixed_threshold;
    w_current->mesh_grid_display_threshold = default_mesh_grid_display_threshold;

    w_current->add_attribute_offset  = default_add_attribute_offset;

    w_current->mousepan_gain = default_mousepan_gain;
    w_current->keyboardpan_gain = default_keyboardpan_gain;

    w_current->select_slack_pixels = default_select_slack_pixels;
    w_current->zoom_gain = default_zoom_gain;
    w_current->scrollpan_steps = default_scrollpan_steps;

    toplevel->auto_save_interval = default_auto_save_interval;
}