void X86ReadBranchPredConfig(struct config_t *config) { char *section; section = "BranchPredictor"; x86_bpred_kind = config_read_enum(config, section, "Kind", x86_bpred_kind_twolevel, x86_bpred_kind_map, 6); x86_bpred_btb_sets = config_read_int(config, section, "BTB.Sets", 256); x86_bpred_btb_assoc = config_read_int(config, section, "BTB.Assoc", 4); x86_bpred_bimod_size = config_read_int(config, section, "Bimod.Size", 1024); x86_bpred_choice_size = config_read_int(config, section, "Choice.Size", 1024); x86_bpred_ras_size = config_read_int(config, section, "RAS.Size", 32); x86_bpred_twolevel_l1size = config_read_int(config, section, "TwoLevel.L1Size", 1); x86_bpred_twolevel_l2size = config_read_int(config, section, "TwoLevel.L2Size", 1024); x86_bpred_twolevel_hist_size = config_read_int(config, section, "TwoLevel.HistorySize", 8); /* Two-level branch predictor parameter */ x86_bpred_twolevel_l2height = 1 << x86_bpred_twolevel_hist_size; /* Integrity */ if (x86_bpred_bimod_size & (x86_bpred_bimod_size - 1)) fatal("number of entries in bimodal precitor must be a power of 2"); if (x86_bpred_choice_size & (x86_bpred_choice_size - 1)) fatal("number of entries in choice predictor must be power of 2"); if (x86_bpred_btb_sets & (x86_bpred_btb_sets - 1)) fatal("number of BTB sets must be a power of 2"); if (x86_bpred_btb_assoc & (x86_bpred_btb_assoc - 1)) fatal("BTB associativity must be a power of 2"); if (x86_bpred_twolevel_hist_size < 1 || x86_bpred_twolevel_hist_size > 30) fatal("predictor history size must be >=1 and <=30"); if (x86_bpred_twolevel_l1size & (x86_bpred_twolevel_l1size - 1)) fatal("two-level predictor sizes must be power of 2"); if (x86_bpred_twolevel_l2size & (x86_bpred_twolevel_l2size - 1)) fatal("two-level predictor sizes must be power of 2"); }
struct dram_system_t *dram_system_config_with_file(struct config_t *config, char *system_name) { int j; int controller_sections = 0; unsigned int highest_addr = 0; char *section; char section_str[MAX_STRING_SIZE]; char *row_buffer_policy_map[] = {"OpenPage", "ClosePage", "hybird"}; char *scheduling_policy_map[] = {"RankBank", "BankRank"}; struct dram_system_t *system; /* Controller parameters * FIXME: we should create a default variation for times this values * are not assigned. For now we set it as DRAM DDR3 Micron * */ unsigned int num_physical_channels = 1; unsigned int request_queue_depth = 32; enum dram_controller_row_buffer_policy_t rb_policy = open_page_row_buffer_policy; enum dram_controller_scheduling_policy_t scheduling_policy = rank_bank_round_robin; unsigned int dram_num_ranks = 8; unsigned int dram_num_devices_per_rank = 1; unsigned int dram_num_banks_per_device = 1; unsigned int dram_num_rows_per_bank = 8192; unsigned int dram_num_columns_per_row = 1024; unsigned int dram_num_bits_per_column = 16; unsigned int dram_timing_tCAS = 24; unsigned int dram_timing_tRCD = 10; unsigned int dram_timing_tRP = 10; unsigned int dram_timing_tRAS = 24; unsigned int dram_timing_tCWL = 9; unsigned int dram_timing_tCCD = 4; system = dram_system_create(system_name); /* DRAM system configuration */ snprintf(section_str, sizeof section_str, "DRAMsystem.%s", system_name); for (section = config_section_first(config); section; section = config_section_next(config)) { if (strcasecmp(section, section_str)) continue; system->num_logical_channels = config_read_int(config, section, "NumLogicalChannels", system->num_logical_channels); } /* Create controllers */ for (section = config_section_first(config); section; section = config_section_next(config)) { char *delim = "."; char *token; char *controller_name; /* First token must be 'Network' */ snprintf(section_str, sizeof section_str, "%s", section); token = strtok(section_str, delim); if (!token || strcasecmp(token, "DRAMsystem")) continue; /* Second token must be the name of the network */ token = strtok(NULL, delim); if (!token || strcasecmp(token, system_name)) continue; /* Third token must be 'Node' */ token = strtok(NULL, delim); if (!token || strcasecmp(token, "Controller")) continue; /* Get name */ controller_name = strtok(NULL, delim); token = strtok(NULL, delim); if (!controller_name || token) fatal("%s:%s: wrong format for controller name .\n%s", system->name, section, dram_err_config); /* Read Properties */ num_physical_channels = config_read_int(config, section, "NumPhysicalChannels", num_physical_channels); dram_num_ranks = config_read_int(config, section, "NumRanks", dram_num_ranks); dram_num_devices_per_rank = config_read_int(config, section, "NumDevicesPerRank", dram_num_devices_per_rank); dram_num_banks_per_device = config_read_int(config, section, "NumBanksPerDevice", dram_num_banks_per_device); dram_num_rows_per_bank = config_read_int(config, section, "NumRowsPerBank", dram_num_rows_per_bank); dram_num_columns_per_row = config_read_int(config, section, "NumColumnPerRow", dram_num_columns_per_row); dram_num_bits_per_column = config_read_int(config, section, "NumBitsPerColumn", dram_num_bits_per_column); request_queue_depth = config_read_int(config, section, "RequestQueueDepth", request_queue_depth); rb_policy = config_read_enum(config, section, "RowBufferPolicy", rb_policy, row_buffer_policy_map, 3); scheduling_policy = config_read_enum(config, section, "SchedulingPolicy", scheduling_policy, scheduling_policy_map, 2); dram_timing_tCAS = config_read_int(config, section, "tCAS", dram_timing_tCAS); dram_timing_tRCD = config_read_int(config, section, "tRCD", dram_timing_tRCD); dram_timing_tRP = config_read_int(config, section, "tRP", dram_timing_tRP); dram_timing_tRAS = config_read_int(config, section, "tRAS", dram_timing_tRAS); dram_timing_tCWL = config_read_int(config, section, "tCWL", dram_timing_tCWL); dram_timing_tCCD = config_read_int(config, section, "tCCD", dram_timing_tCCD); /* Create controller */ struct dram_controller_t *controller; controller = dram_controller_create(request_queue_depth, rb_policy, scheduling_policy); /* Assign controller parameters */ controller->id = controller_sections; if (!controller_sections) controller->lowest_addr = 0; else controller->lowest_addr = highest_addr + 1; controller->highest_addr = controller->lowest_addr + ((dram_num_bits_per_column * dram_num_devices_per_rank) / 8 * dram_num_columns_per_row * dram_num_rows_per_bank * dram_num_banks_per_device * dram_num_ranks * num_physical_channels) - 1; controller->dram_addr_bits_rank = log_base2(dram_num_ranks); controller->dram_addr_bits_row = log_base2(dram_num_rows_per_bank); controller->dram_addr_bits_bank = log_base2(dram_num_banks_per_device); controller->dram_addr_bits_column = log_base2(dram_num_columns_per_row); controller->dram_addr_bits_physical_channel = log_base2(num_physical_channels); controller->dram_addr_bits_byte = log_base2(dram_num_bits_per_column * dram_num_devices_per_rank / 8); controller->dram_timing_tCAS = dram_timing_tCAS; controller->dram_timing_tRCD = dram_timing_tRCD; controller->dram_timing_tRP = dram_timing_tRP; controller->dram_timing_tRAS = dram_timing_tRAS; controller->dram_timing_tCWL = dram_timing_tCWL; controller->dram_timing_tCCD = dram_timing_tCCD; /* Update the highest address in memory system */ highest_addr = controller->highest_addr; /* Add controller to system */ list_add(system->dram_controller_list, controller); /* Create and add DRAM*/ for (j = 0; j < num_physical_channels; j++) { struct dram_t *dram; dram = dram_create(dram_num_ranks, dram_num_devices_per_rank, dram_num_banks_per_device, dram_num_rows_per_bank, dram_num_columns_per_row, dram_num_bits_per_column); dram->timing_tCAS = dram_timing_tCAS; dram->timing_tRCD = dram_timing_tRCD; dram->timing_tRP = dram_timing_tRP; dram->timing_tRAS = dram_timing_tRAS; dram->timing_tCWL = dram_timing_tCWL; dram_controller_add_dram(list_get(system->dram_controller_list, controller_sections), dram); } controller_sections++; } if (controller_sections != system->num_logical_channels) fatal("%s: number of controllers should match the number of logical" "channels \n%s", system->name, dram_err_config); /* Request Section */ for (section = config_section_first(config); section; section = config_section_next(config)) { char *delim = "."; char *token; char *token_endl; /* First token must be 'Network' */ snprintf(section_str, sizeof section_str, "%s", section); token = strtok(section_str, delim); if (!token || strcasecmp(token, "DRAMsystem")) continue; /* Second token must be the name of the network */ token = strtok(NULL, delim); if (!token || strcasecmp(token, system_name)) continue; /* Third token must be 'Commands' */ token = strtok(NULL, delim); if (!token || strcasecmp(token, "Requests")) continue; token_endl = strtok(NULL, delim); if (token_endl) fatal("%s: %s: bad format for Commands section.\n%s", system_name, section, dram_err_config); /* Requests */ dram_config_request_create(system, config, section); config_check(config); } /* Return dram_system on success */ return system; }
void X86CpuReadConfig(void) { struct config_t *config; char *section; /* Open file */ config = config_create(x86_config_file_name); if (*x86_config_file_name) config_load(config); /* General configuration */ section = "General"; x86_cpu_frequency = config_read_int(config, section, "Frequency", x86_cpu_frequency); if (!IN_RANGE(x86_cpu_frequency, 1, ESIM_MAX_FREQUENCY)) fatal("%s: invalid value for 'Frequency'.", x86_config_file_name); x86_cpu_num_cores = config_read_int(config, section, "Cores", x86_cpu_num_cores); x86_cpu_num_threads = config_read_int(config, section, "Threads", x86_cpu_num_threads); x86_cpu_fast_forward_count = config_read_llint(config, section, "FastForward", 0); x86_cpu_context_quantum = config_read_int(config, section, "ContextQuantum", 100000); x86_cpu_thread_quantum = config_read_int(config, section, "ThreadQuantum", 1000); x86_cpu_thread_switch_penalty = config_read_int(config, section, "ThreadSwitchPenalty", 0); x86_cpu_recover_kind = config_read_enum(config, section, "RecoverKind", x86_cpu_recover_kind_writeback, x86_cpu_recover_kind_map, 2); x86_cpu_recover_penalty = config_read_int(config, section, "RecoverPenalty", 0); x86_emu_process_prefetch_hints = config_read_bool(config, section, "ProcessPrefetchHints", 1); prefetch_history_size = config_read_int(config, section, "PrefetchHistorySize", 10); /* Section '[ Pipeline ]' */ section = "Pipeline"; x86_cpu_fetch_kind = config_read_enum(config, section, "FetchKind", x86_cpu_fetch_kind_timeslice, x86_cpu_fetch_kind_map, 3); x86_cpu_decode_width = config_read_int(config, section, "DecodeWidth", 4); x86_cpu_dispatch_kind = config_read_enum(config, section, "DispatchKind", x86_cpu_dispatch_kind_timeslice, x86_cpu_dispatch_kind_map, 2); x86_cpu_dispatch_width = config_read_int(config, section, "DispatchWidth", 4); x86_cpu_issue_kind = config_read_enum(config, section, "IssueKind", x86_cpu_issue_kind_timeslice, x86_cpu_issue_kind_map, 2); x86_cpu_issue_width = config_read_int(config, section, "IssueWidth", 4); x86_cpu_commit_kind = config_read_enum(config, section, "CommitKind", x86_cpu_commit_kind_shared, x86_cpu_commit_kind_map, 2); x86_cpu_commit_width = config_read_int(config, section, "CommitWidth", 4); x86_cpu_occupancy_stats = config_read_bool(config, section, "OccupancyStats", 0); /* Section '[ Queues ]' */ section = "Queues"; x86_fetch_queue_size = config_read_int(config, section, "FetchQueueSize", 64); x86_uop_queue_size = config_read_int(config, section, "UopQueueSize", 32); x86_rob_kind = config_read_enum(config, section, "RobKind", x86_rob_kind_private, x86_rob_kind_map, 2); x86_rob_size = config_read_int(config, section, "RobSize", 64); x86_iq_kind = config_read_enum(config, section, "IqKind", x86_iq_kind_private, x86_iq_kind_map, 2); x86_iq_size = config_read_int(config, section, "IqSize", 40); x86_lsq_kind = config_read_enum(config, section, "LsqKind", x86_lsq_kind_private, x86_lsq_kind_map, 2); x86_lsq_size = config_read_int(config, section, "LsqSize", 20); /* Register file */ X86ReadRegFileConfig(config); /* Functional Units */ X86ReadFunctionalUnitsConfig(config); /* Branch predictor */ X86ReadBranchPredConfig(config); /* Trace Cache */ X86ReadTraceCacheConfig(config); /* Close file */ config_check(config); config_free(config); }
/*------------------------------------------------------------------------- Read emulator settings from the config file. Input: Config Pointer to the config file stucture. ---------------------------------------------------------------------------*/ void config_load_settings ( CONFIG_FILE *Config ) { if ( !config_find_section ( Config, "Settings" ) ) return; config_read_bool ( Config, "Show Debugger", &neogeo_debugger_enabled ); config_read_enum ( Config, "Debugger Key", &neogeo_debugger_key, config_key_enum ); config_read_enum ( Config, "Nationality", &neogeo_machine_nationality, config_nationality_enum ); config_read_bool ( Config, "Fullscreen", &video_fullscreen ); config_read_bool ( Config, "Full Throttle", &neogeo_fullthrottle_enable ); config_read_integer ( Config, "Audio Buffer Size", &neogeo_audio_buffer_size ); config_read_integer ( Config, "Latency", &neogeo_audio_latency ); config_read_integer ( Config, "CD Volume", &neogeo_cd_volume ); if ( neogeo_cd_volume > 100 ) neogeo_cd_volume = 100; config_read_integer ( Config, "YM2610 Volume", &neogeo_ym2610_volume ); if ( neogeo_ym2610_volume > 100 ) neogeo_ym2610_volume = 100; config_read_bool ( Config, "Display Border", &video_display_border ); config_read_enum ( Config, "Window Interpolation", &video_window_interpolation, config_filter_enum ); config_read_integer ( Config, "Window Resolution X", &video_window_resolution_x ); if ( video_window_resolution_x < 640 ) video_window_resolution_x = 640; config_read_integer ( Config, "Window Resolution Y", &video_window_resolution_y ); if ( video_window_resolution_y < 480 ) video_window_resolution_y = 480; config_read_enum ( Config, "Fullscreen Interpolation", &video_fullscreen_interpolation, config_filter_enum ); config_read_integer ( Config, "Fullscreen Resolution X", &video_fullscreen_resolution_x ); if ( video_fullscreen_resolution_x < 640 ) video_fullscreen_resolution_x = 640; config_read_integer ( Config, "Fullscreen Resolution Y", &video_fullscreen_resolution_y ); if ( video_fullscreen_resolution_y < 480 ) video_fullscreen_resolution_y = 480; config_read_bool ( Config, "Vsync", &video_vsync ); if ( video_vsync ) video_lag_tolerance = 0; else video_lag_tolerance = -30; config_read_bool ( Config, "Keep Aspect Ratio", &video_keep_aspect_ratio ); config_read_enum ( Config, "Controller 1 Up Key", &neogeo_controller1_up_key, config_key_enum ); config_read_enum ( Config, "Controller 1 Down Key", &neogeo_controller1_down_key, config_key_enum ); config_read_enum ( Config, "Controller 1 Left Key", &neogeo_controller1_left_key, config_key_enum ); config_read_enum ( Config, "Controller 1 Right Key", &neogeo_controller1_right_key, config_key_enum ); config_read_enum ( Config, "Controller 1 A Key", &neogeo_controller1_a_key, config_key_enum ); config_read_enum ( Config, "Controller 1 B Key", &neogeo_controller1_b_key, config_key_enum ); config_read_enum ( Config, "Controller 1 C Key", &neogeo_controller1_c_key, config_key_enum ); config_read_enum ( Config, "Controller 1 D Key", &neogeo_controller1_d_key, config_key_enum ); config_read_enum ( Config, "Controller 1 Start Key", &neogeo_controller1_start_key, config_key_enum ); config_read_enum ( Config, "Controller 1 Select Key", &neogeo_controller1_select_key, config_key_enum ); config_read_enum ( Config, "Controller 2 Up Key", &neogeo_controller2_up_key, config_key_enum ); config_read_enum ( Config, "Controller 2 Down Key", &neogeo_controller2_down_key, config_key_enum ); config_read_enum ( Config, "Controller 2 Left Key", &neogeo_controller2_left_key, config_key_enum ); config_read_enum ( Config, "Controller 2 Right Key", &neogeo_controller2_right_key, config_key_enum ); config_read_enum ( Config, "Controller 2 A Key", &neogeo_controller2_a_key, config_key_enum ); config_read_enum ( Config, "Controller 2 B Key", &neogeo_controller2_b_key, config_key_enum ); config_read_enum ( Config, "Controller 2 C Key", &neogeo_controller2_c_key, config_key_enum ); config_read_enum ( Config, "Controller 2 D Key", &neogeo_controller2_d_key, config_key_enum ); config_read_enum ( Config, "Controller 2 Start Key", &neogeo_controller2_start_key, config_key_enum ); config_read_enum ( Config, "Controller 2 Select Key", &neogeo_controller2_select_key, config_key_enum ); if ( sdl_joystick1 ) { if ( config_find_subsection ( Config, SDL_JoystickName ( 0 ) ) ) { config_read_integer ( Config, "X Axis", &neogeo_controller1_x_axis ); config_read_integer ( Config, "Y Axis", &neogeo_controller1_y_axis ); config_read_integer ( Config, "Hat", &neogeo_controller1_hat ); config_read_integer ( Config, "A Button", &neogeo_controller1_a_button ); config_read_integer ( Config, "B Button", &neogeo_controller1_b_button ); config_read_integer ( Config, "C Button", &neogeo_controller1_c_button ); config_read_integer ( Config, "D Button", &neogeo_controller1_d_button ); config_read_integer ( Config, "Start Button", &neogeo_controller1_start_button ); config_read_integer ( Config, "Select Button", &neogeo_controller1_select_button ); fprintf ( stdout, "Loaded profile %s for joystick 0.\n", SDL_JoystickName ( 0 ) ); } else fprintf ( stdout, "Using default settings for joystick 0.\n" ); } if ( sdl_joystick2 ) { if ( config_find_subsection ( Config, SDL_JoystickName ( 1 ) ) ) { config_read_integer ( Config, "X Axis", &neogeo_controller2_x_axis ); config_read_integer ( Config, "Y Axis", &neogeo_controller2_y_axis ); config_read_integer ( Config, "Hat", &neogeo_controller2_hat ); config_read_integer ( Config, "A Button", &neogeo_controller2_a_button ); config_read_integer ( Config, "B Button", &neogeo_controller2_b_button ); config_read_integer ( Config, "C Button", &neogeo_controller2_c_button ); config_read_integer ( Config, "D Button", &neogeo_controller2_d_button ); config_read_integer ( Config, "Start Button", &neogeo_controller2_start_button ); config_read_integer ( Config, "Select Button", &neogeo_controller2_select_button ); fprintf ( stdout, "Loaded profile %s for joystick 1.\n", SDL_JoystickName ( 1 ) ); } else fprintf ( stdout, "Using default settings for joystick 1.\n" ); } }
/* Check CPU configuration file */ static void x86_cpu_config_check(void) { struct config_t *config; char *section; /* Open file */ config = config_create(x86_config_file_name); if (*x86_config_file_name) config_load(config); /* General configuration */ section = "General"; x86_cpu_num_cores = config_read_int(config, section, "Cores", x86_cpu_num_cores); x86_cpu_num_threads = config_read_int(config, section, "Threads", x86_cpu_num_threads); x86_cpu_fast_forward_count = config_read_llint(config, section, "FastForward", 0); x86_cpu_context_switch = config_read_bool(config, section, "ContextSwitch", 1); x86_cpu_context_quantum = config_read_int(config, section, "ContextQuantum", 100000); x86_cpu_thread_quantum = config_read_int(config, section, "ThreadQuantum", 1000); x86_cpu_thread_switch_penalty = config_read_int(config, section, "ThreadSwitchPenalty", 0); x86_cpu_recover_kind = config_read_enum(config, section, "RecoverKind", x86_cpu_recover_kind_writeback, x86_cpu_recover_kind_map, 2); x86_cpu_recover_penalty = config_read_int(config, section, "RecoverPenalty", 0); mmu_page_size = config_read_int(config, section, "PageSize", 4096); x86_emu_process_prefetch_hints = config_read_bool(config, section, "ProcessPrefetchHints", 1); prefetch_history_size = config_read_int(config, section, "PrefetchHistorySize", 10); /* Section '[ Pipeline ]' */ section = "Pipeline"; x86_cpu_fetch_kind = config_read_enum(config, section, "FetchKind", x86_cpu_fetch_kind_timeslice, x86_cpu_fetch_kind_map, 3); x86_cpu_decode_width = config_read_int(config, section, "DecodeWidth", 4); x86_cpu_dispatch_kind = config_read_enum(config, section, "DispatchKind", x86_cpu_dispatch_kind_timeslice, x86_cpu_dispatch_kind_map, 2); x86_cpu_dispatch_width = config_read_int(config, section, "DispatchWidth", 4); x86_cpu_issue_kind = config_read_enum(config, section, "IssueKind", x86_cpu_issue_kind_timeslice, x86_cpu_issue_kind_map, 2); x86_cpu_issue_width = config_read_int(config, section, "IssueWidth", 4); x86_cpu_commit_kind = config_read_enum(config, section, "CommitKind", x86_cpu_commit_kind_shared, x86_cpu_commit_kind_map, 2); x86_cpu_commit_width = config_read_int(config, section, "CommitWidth", 4); x86_cpu_occupancy_stats = config_read_bool(config, section, "OccupancyStats", 0); /* Section '[ Queues ]' */ section = "Queues"; x86_fetch_queue_size = config_read_int(config, section, "FetchQueueSize", 64); x86_uop_queue_size = config_read_int(config, section, "UopQueueSize", 32); x86_rob_kind = config_read_enum(config, section, "RobKind", x86_rob_kind_private, x86_rob_kind_map, 2); x86_rob_size = config_read_int(config, section, "RobSize", 64); x86_iq_kind = config_read_enum(config, section, "IqKind", x86_iq_kind_private, x86_iq_kind_map, 2); x86_iq_size = config_read_int(config, section, "IqSize", 40); x86_lsq_kind = config_read_enum(config, section, "LsqKind", x86_lsq_kind_private, x86_lsq_kind_map, 2); x86_lsq_size = config_read_int(config, section, "LsqSize", 20); x86_reg_file_kind = config_read_enum(config, section, "RfKind", x86_reg_file_kind_private, x86_reg_file_kind_map, 2); x86_reg_file_int_size = config_read_int(config, section, "RfIntSize", 80); x86_reg_file_fp_size = config_read_int(config, section, "RfFpSize", 40); x86_reg_file_xmm_size = config_read_int(config, section, "RfXmmSize", 40); /* Functional Units */ section = "FunctionalUnits"; x86_fu_res_pool[x86_fu_intadd].count = config_read_int(config, section, "IntAdd.Count", 4); x86_fu_res_pool[x86_fu_intadd].oplat = config_read_int(config, section, "IntAdd.OpLat", 2); x86_fu_res_pool[x86_fu_intadd].issuelat = config_read_int(config, section, "IntAdd.IssueLat", 1); x86_fu_res_pool[x86_fu_intmult].count = config_read_int(config, section, "IntMult.Count", 1); x86_fu_res_pool[x86_fu_intmult].oplat = config_read_int(config, section, "IntMult.OpLat", 3); x86_fu_res_pool[x86_fu_intmult].issuelat = config_read_int(config, section, "IntMult.IssueLat", 3); x86_fu_res_pool[x86_fu_intdiv].count = config_read_int(config, section, "IntDiv.Count", 1); x86_fu_res_pool[x86_fu_intdiv].oplat = config_read_int(config, section, "IntDiv.OpLat", 20); x86_fu_res_pool[x86_fu_intdiv].issuelat = config_read_int(config, section, "IntDiv.IssueLat", 20); x86_fu_res_pool[x86_fu_effaddr].count = config_read_int(config, section, "EffAddr.Count", 4); x86_fu_res_pool[x86_fu_effaddr].oplat = config_read_int(config, section, "EffAddr.OpLat", 2); x86_fu_res_pool[x86_fu_effaddr].issuelat = config_read_int(config, section, "EffAddr.IssueLat", 1); x86_fu_res_pool[x86_fu_logic].count = config_read_int(config, section, "Logic.Count", 4); x86_fu_res_pool[x86_fu_logic].oplat = config_read_int(config, section, "Logic.OpLat", 1); x86_fu_res_pool[x86_fu_logic].issuelat = config_read_int(config, section, "Logic.IssueLat", 1); x86_fu_res_pool[x86_fu_fpsimple].count = config_read_int(config, section, "FpSimple.Count", 2); x86_fu_res_pool[x86_fu_fpsimple].oplat = config_read_int(config, section, "FpSimple.OpLat", 2); x86_fu_res_pool[x86_fu_fpsimple].issuelat = config_read_int(config, section, "FpSimple.IssueLat", 2); x86_fu_res_pool[x86_fu_fpadd].count = config_read_int(config, section, "FpAdd.Count", 2); x86_fu_res_pool[x86_fu_fpadd].oplat = config_read_int(config, section, "FpAdd.OpLat", 5); x86_fu_res_pool[x86_fu_fpadd].issuelat = config_read_int(config, section, "FpAdd.IssueLat", 5); x86_fu_res_pool[x86_fu_fpmult].count = config_read_int(config, section, "FpMult.Count", 1); x86_fu_res_pool[x86_fu_fpmult].oplat = config_read_int(config, section, "FpMult.OpLat", 10); x86_fu_res_pool[x86_fu_fpmult].issuelat = config_read_int(config, section, "FpMult.IssueLat", 10); x86_fu_res_pool[x86_fu_fpdiv].count = config_read_int(config, section, "FpDiv.Count", 1); x86_fu_res_pool[x86_fu_fpdiv].oplat = config_read_int(config, section, "FpDiv.OpLat", 20); x86_fu_res_pool[x86_fu_fpdiv].issuelat = config_read_int(config, section, "FpDiv.IssueLat", 20); x86_fu_res_pool[x86_fu_fpcomplex].count = config_read_int(config, section, "FpComplex.Count", 1); x86_fu_res_pool[x86_fu_fpcomplex].oplat = config_read_int(config, section, "FpComplex.OpLat", 40); x86_fu_res_pool[x86_fu_fpcomplex].issuelat = config_read_int(config, section, "FpComplex.IssueLat", 40); x86_fu_res_pool[x86_fu_xmm_int].count = config_read_int(config, section, "XMMInt.Count", 1); x86_fu_res_pool[x86_fu_xmm_int].oplat = config_read_int(config, section, "XMMInt.OpLat", 2); x86_fu_res_pool[x86_fu_xmm_int].issuelat = config_read_int(config, section, "XMMInt.IssueLat", 2); x86_fu_res_pool[x86_fu_xmm_float].count = config_read_int(config, section, "XMMFloat.Count", 1); x86_fu_res_pool[x86_fu_xmm_float].oplat = config_read_int(config, section, "XMMFloat.OpLat", 10); x86_fu_res_pool[x86_fu_xmm_float].issuelat = config_read_int(config, section, "XMMFloat.IssueLat", 10); x86_fu_res_pool[x86_fu_xmm_logic].count = config_read_int(config, section, "XMMLogic.Count", 1); x86_fu_res_pool[x86_fu_xmm_logic].oplat = config_read_int(config, section, "XMMLogic.OpLat", 1); x86_fu_res_pool[x86_fu_xmm_logic].issuelat = config_read_int(config, section, "XMMLogic.IssueLat", 1); /* Branch Predictor */ section = "BranchPredictor"; x86_bpred_kind = config_read_enum(config, section, "Kind", x86_bpred_kind_twolevel, x86_bpred_kind_map, 6); x86_bpred_btb_sets = config_read_int(config, section, "BTB.Sets", 256); x86_bpred_btb_assoc = config_read_int(config, section, "BTB.Assoc", 4); x86_bpred_bimod_size = config_read_int(config, section, "Bimod.Size", 1024); x86_bpred_choice_size = config_read_int(config, section, "Choice.Size", 1024); x86_bpred_ras_size = config_read_int(config, section, "RAS.Size", 32); x86_bpred_twolevel_l1size = config_read_int(config, section, "TwoLevel.L1Size", 1); x86_bpred_twolevel_l2size = config_read_int(config, section, "TwoLevel.L2Size", 1024); x86_bpred_twolevel_hist_size = config_read_int(config, section, "TwoLevel.HistorySize", 8); /* Trace Cache */ x86_trace_cache_config_check(config); /* Close file */ config_check(config); config_free(config); }