⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changes

📁 体系机构仿真
💻
字号:
		DESCRIPTION OF CHANGES MADE TO PRODUCE	      THE MULTIPROCESSOR VERSION OF SIMPLESCALAR		FROM THE ORIGINAL UNIPROCESSOR RELEASE			   Naraig Manjikian	     Dept. of Electrical and Computer Engineering			  Queen's University		  Kingston, Ontario, Canada K7L 3N6			     30 May 2000The multiprocessor version of SimpleScalar that is encompassed in thissoftware package is adapted from release 2.0 of uniprocessor SimpleScalar.Several existing files were modified, and several new files were added.Furthermore, many files that appear in the original uniprocessor releasehave been excluded in this multiprocessor version.This document outlines the exclusions, additions, and changes in theset of files that constitute the multiprocessor version of SimpleScalar.----------------------------------------------------------------------EXCLUDED FILES THE FROM ORIGINAL UNIPROCESSOR RELEASEbitmap.hbpred.cbpred.hcache.ccache.hdlite.cdlite.heventq.ceventq.hptrace.cptrace.hresource.cresource.hsim-bpred.csim-cache.csim-cheetah.csim-fast.csim-outorder.csim-profile.csim-safe.c----------------------------------------------------------------------NEW INCLUDE FILES>>> graphics.hdefinitions for rudimentary X windows code for visualization>>> mpsyscall.hdefinitions for multiprocessor-specific #defines for system call codes; this file is included by a modified version of syscall.h, which is in turn included by syscall.c; new code in syscall.c uses the #defines in mpsyscall.h ***NOTE*** that mpsyscall.h is _also_ included by an assembly-language   file, hence it should only contain #defines for system call codes>>> ssmp.hdeclarations for the run-time library for multiprocessing; ***NOTE*** that this header is _not_ used to compile the simulators;   it is used only when compiling multiprocessor application code that   will be simulated (a separate makefile must be used to compile   applications)>>> c.m4.ssmacro definitions for PARMACS and used with the m4 macro preprocessor; ***NOTE*** that this file is used only when building application code   to be simulated; it is _not_ used to compile the simulators----------------------------------------------------------------------MODIFICATIONS OF EXISTING INCLUDE FILES>>> regs.hadded extra dimension of MAX_PROCS to declarations of the following variables: regs_R, regs_F, regs_HI, regs_LO, regs_FCC, regs_PCmodified declaration of regs_init() to accept three parameters: pid, initial stack pointer value, initial PC value (entry point)modified declaration of regs_dump() to accept additional pid parameter>>> ss.hadded #define for MAX_PROCS, the maximum number of processors (currently 32)>>> stats.hadded new item sc_uintarray in enumeration stat_class_tadded new element for_uintarray in union within struct stat_stat_tadded declaration of new function stat_reg_uintarray() to register an unsigned integer array statistical variable>>> syscall.hadded #include for mpsyscall.h immediately after SS_SYS_??? #definesmodified declaration of ss_syscall() to accept additional pid parameter>>> ss.defmodified definitions and uses of the following functions to include a pid parameter:  - InstMULT()  - InstMULTU()  - InstSRA()  - InstSRAV()----------------------------------------------------------------------NEW SOURCE FILES>>> graphics.ccontains rudimentary code to create an X window and perform simple drawing operations>>> mpcache.ccontains code to model two-level direct-mapped caches in a multiprocessor, with extensive statistics gathered on hits, misses, and coherence activity; includes conditional code for graphical visualization of coherence (enabled with a #define symbol)>>> sim-mpfast.c(this file is adapted from sim-fast.c in the original uniprocessor release; the list below outlines the differences between sim-mpfast.c and sim-fast.c)added definitions for variables to maintain per-processor instruction counts and count for number of cyclesadded declaration for array of flags indicating active processorsadded declaration for count of created processesmodified body of sim_reg_stats() to include multiprocessor statisticsmodified body of sim_aux_stats() to report multiprocessor statisticsmodified #defines that access registers to include pidmodified #define for SYSCALL() to include pidthroughout body of sim_main(), removed *all* code related to USE_JUMP_TABLEin sim_main(), added definition of local pid variablein sim_main(), initialized count of created processes to 1 and marked the first processor as activein main 'while' loop within sim_main(), adder inner 'for' loop that scans through created processes, skipping inactive ones, and fetches/interprets a single instruction; all register accesses use local pid variable>>> sim-mpcache.c(this file is extends sim-mpfast.c above, hence it also has differences with sim-fast.c from the original uniprocessor release; the list below outlines *additional* changes relative to sim-mpfast.c)added #include "mpcache.h"added definitions for variables that reflect cache configuration that is set with command line optionsfor graphics, added definitions for variables for command line optionsadded macro for log base 2 calculationmodified body of sim_reg_options() to register variables related to command line optionsmodified body of sim_check_options() to verify cache configuration from command line optionsmodified body of sim_init() to call initialization code in mpcache.cin the inner 'for' loop in sim_main(), added call to function in mpcache.c that traces memory accesses and models cache hit/miss as well as coherence; the call to the function is made _before_ a load/store instruction is interpreted because for instructions of the form "lw $reg,0($reg)" the base register is modified, and the original memory address will be lost>>> libssmp.Sdefines assembly-language routines in the SimpleScalar portable instruction set architecture (PISA); these routines constitute the run-time library that is linked with multiprocessor application code that will be simulated; this file includes mpsyscall.h described above; ***NOTE*** that this file is _not_ used to generate the simulators;  a _separate_ makefile is used to generate PISA code for these routines----------------------------------------------------------------------MODIFICATIONS OF EXISTING SOURCE FILES>>> main.cremoved references to Dlite debuggermodified call to regs_init()>>> memory.cmodified initial value of mem_stack_min>>> regs.cadded extra dimension of MAX_PROCS to definitions of the following variables: regs_R, regs_F, regs_HI, regs_LO, regs_FCC, regs_PCmodified definition of regs_init() to accept three parameters:  pid, initial stack pointer value, initial PC value (entry point)modified body of regs_init() to use pid value  for initializing correct registersmodified definition of regs_dump() to accept additional pid parameter  and modified body to use this parameter to access appropriate registers>>> stats.cadded new case for sc_uintarray in stat_eval_ident() and stat_delete()added new function stat_reg_uintarray() to register an unsigned integer array statistical variablein stat_print_stat(), added 'i' variable and case for sc_uintarray to dump array of integer values to output file>>> syscall.cadded new typedef for nodes in queues associated with synchronization variablesadded definitions for arrays of queues for synchronization variables (locks, barriers, semaphores)added definition for array of flags indicating active processorsadded definition for count of created processesadded function CreateNewProcess() that is invoked from ss_syscall() after simulated program calls run-time library function   - allocates stack space for new thread of execution   - initializes registers using regs_init()   - performs other miscellaneous initialization tasksmodified ss_syscall() to accept additional parameter, the current pid for the thread of execution that invoked the system callthroughout the body of ss_syscall(), changed all references to regs_R array to include the pid parameter (*** NUMEROUS changes here ***)in ss_syscall(), modified case for SS_SYS_exit to properly handle multiprocessor termination (i.e., waiting for all threads to finish)in ss_syscall(), removed code for SS_SYS_fork, SS_SYS_vfork, and SS_SYS_sigstack, but kept the cases there (minor cleanup)in ss_syscall(), added new cases for the following multiprocessor-related system calls:   - SS_MP_ACQUIRE_LOCK   - SS_MP_RELEASE_LOCK   - SS_MP_INIT_LOCK   - SS_MP_BARRIER   - SS_MP_INIT_BARRIER   - SS_MP_THREAD_ID   - SS_MP_CREATE_THREAD   - SS_MP_EXIT_THREAD   - SS_MP_SEMA_WAIT   - SS_MP_SEMA_SIGNAL   - SS_MP_INIT_SEMA>>> sysprobe.cmodified main() to return an integer value (this change was only made to eliminate compiler messages and has no bearing on multiprocessing)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -