📄 script.h
字号:
}\n\ ";char SubConfigureOk_tcl[] = "\proc SubConfigureOk {} {\n\ global num_int_units ld_st_exist fp_div_exist \n\ global num_load_bufs num_div_units\n\ global config configureEnabled \n\ if {$config == \"0\"} {\n\ set num_int_units 2\n\ set cycleDisplayCount 0\n\ }\n\ if {$config == \"1\" && $num_load_bufs > \"0\"} {\n\ set ld_st_exist 1\n\ } else {\n\ set ld_st_exist 0\n\ }\n\ if {$num_div_units > \"0\"} {\n\ set fp_div_exist 1\n\ } else {\n\ set fp_div_exist 0\n\ }\n\}\n\ ";char ScaleValue_tcl[] = "\proc ScaleValue {whichScale value} {\n\ global $whichScale\n\ set $whichScale $value\n\}\n\ ";char BasRadioCommand_tcl[] = "\proc BasRadioCommand {unittype state {w .subconfigure}} {\n\ global num_add_units num_mul_units num_div_units\n\ if {$state == \"inactive\"} {\n\ $w.$unittype.latency configure -label \"FP $unittype stages (cycles)\"\n\ $w.$unittype.number set 1\n\ $w.$unittype.number configure -state disabled\n\ $w.$unittype.number configure -troughcolor lightgrey\n\ $w.$unittype.number configure -activebackground lightgrey\n\ } else {\n\ $w.$unittype.latency configure -label \"FP $unittype latency (cycles)\"\n\ $w.$unittype.number configure -state normal\n\ $w.$unittype.number configure -troughcolor skyblue\n\ $w.$unittype.number configure -activebackground MediumOrchid\n\ }\n\}\n\ ";char DISC_tcl[] = "\set auto_path \"[pwd] $auto_path\"\n\set config 3\n\set numWords 16384\n\set num_int_units 1 \n\set int_latency 1\n\set num_add_units 2\n\set fp_add_latency 2 \n\set add_ful_pipe 1\n\set num_mul_units 2\n\set fp_mul_latency 5 \n\set mul_ful_pipe 1\n\set num_div_units 0\n\set fp_div_latency 19 \n\set div_ful_pipe 0\n\set num_load_bufs 0\n\set load_buf_latency 1\n\set num_store_bufs 0\n\set store_buf_latency 1\n\set ld_st_exist 0\n\set fp_div_exist 1\n\set fullNameList {}\n\set startAddress {}\n\set configureEnabled 1\n\set fastmode 0\n\global msg\n\mkDisc\n\ ";char mkHelp_tcl[] = "\proc mkHelp {{w .help}} {\n\ global help_magenta help_blue help_green help_black help_italic\n\ global help_section help_title\n\ \n\ catch {destroy $w}\n\ toplevel $w\n\ wm title $w \"Help\"\n\ wm iconname $w \"help\"\n\ wm geometry $w +200+200\n\ canvas $w.c\n\ frame $w.text\n\ frame $w.button\n\ pack $w.text $w.button \\\n\ -side top \\\n\ -fill x \\\n\ -expand yes\n\ text $w.text.t \\\n\ -relief raised \\\n\ -bd 2 \\\n\ -yscrollcommand \"$w.text.s set\" \\\n\ -setgrid true \\\n\ -width 80 \\\n\ -height 40 \\\n\ -font \"-Adobe-Helvetica-Bold-R-Normal-*-120-*\"\n\ DisableTextWidget $w.text.t\n\ scrollbar $w.text.s \\\n\ -relief flat -command \"$w.text.t yview\"\n\ pack $w.text.s \\\n\ -side right \\\n\ -fill y\n\ pack $w.text.t \\\n\ -expand yes \\\n\ -fill both\n\ button $w.button.ok \\\n\ -text Ok \\\n\ -command HelpOk\n\ button $w.button.cancel \\\n\ -text Cancel \\\n\ -command \"destroy $w\"\n\ pack $w.button.ok $w.button.cancel \\\n\ -side left \\\n\ -fill x \\\n\ -expand yes\n\ set help_magenta \"-foreground magenta\"\n\ set help_blue \"-foreground blue\"\n\ set help_black \"-foreground black -font -Adobe-Courier-Medium-R-Normal-*-120-*\"\n\ set help_green \"-foreground SeaGreen -font -Adobe-Courier-Medium-R-Normal-*-120-*\"\n\ set help_italic \"-font -Adobe-Courier-Bold-R-Normal-*-120-*\"\n\ set help_section \"-font -Adobe-Courier-Bold-R-Normal-*-140-*\"\n\ set help_title \"-font -Adobe-Times-Bold-R-Normal-*-180-* -foreground SeaGreen\"\n\ bind $w <Any-Enter> \"focus $w.text.t\"\n\ HelpGeneral\n\}\n\ ";char HelpGeneral_tcl[] = "\proc HelpGeneral {{t .help.text.t}} {\n\ global help_cmd_stack\n\ global help_magenta help_magenta help_blue help_blac help_italic\n\ global help_section help_title\n\ set help_cmd_stack \"HelpGeneral\"\n\ $t delete 1.0 end\n\HelpIn help_title {\n\ DLXview: Interactive Animated DLX Pipeline Visualization\n\}\n\HelpIn HelpInfo {\n\1. General Information\n\}\n\HelpIn HelpStart {\n\2. Starting dlxview\n\}\n\HelpIn HelpControl {\n\3. Control Panel Discription\n\}\n\HelpIn HelpMode {\n\4. Pipelining Modes Discription\n\}\n\HelpIn HelpMisc {\n\5. Miscellaneous\n\}\n\}\n\ ";char HelpInfo_tcl[] = "\proc HelpInfo {{t .help.text.t}} {\n\ global help_cmd_stack\n\ global help_magenta help_magenta help_blue help_green help_black help_italic\n\ set help_cmd_stack [linsert $help_cmd_stack 0 HelpInfo]\n\ $t delete 1.0 end\n\HelpIn help_section {\n\Purpose:}\n\HelpIn help_black {\n\DLXview is an interactive pipelining simulator using the DLX instruction\n\set, which is described in }\n\HelpIn help_italic {Computer Architecture, A Quantitative Approach }\n\HelpIn help_black {\n\by Hennessy and Patterson. The main goal of dlxview is to provide an\n\animated environment where the internal operations of a processor are\n\much easier to understand than by text description only. In addition\n\to its pedagogical purpose, dlxview also serves to be a handy tool in DLX\n\instruction set understanding, debugging, and in processor performance\n\evaluation. \n\}\n\HelpIn help_section {\n\History and Future:}\n\HelpIn help_black {\n\DLXview is an extension and modification of DLXsim, a generic non-graphical\n\DLX pipeline simulator, which was in turn modified form a MIPS simulator.\n\This is not surprising given the similarities between DLX and MIPS \n\instruction set. the simple pipelining model in DLXsim has been \n\enhanced greatly to support the execution of basic pipelining, scoreboarding, \n\and Tomasulo Algorithm. The graphical interface built on top of Tcl/Tk \n\tries to expose as much nitty-gritty detail as possible explained by the \n\Hennessy and Patterson textbook in a }\n\HelpIn help_italic {cycle-by-cycle }\n\HelpIn help_black {base. \n\}\n\HelpIn help_black {\n\The current version of dlxview is a branch of the CASLE }\n\HelpIn help_italic {(KIWI Is What If) }\n\HelpIn help_black {\n\project at Purdue University, which aims to provide a comprehensive \n\pedagogical tool for learning architectural concepts, compiler \n\technologies, and the interactions between them. Based on the experience\n\in the course of developing dlxview, we plan to build a more powerful simulator\n\which will cover the general microparallel execution models such as\n\superscalar and VLIW with different configurations. This future tool\n\will also target at some popular commercial RISC processors, for example, \n\Alpha series and PowerPC series.\n\}\n\HelpIn help_section {\n\Advice and Errors:}\n\HelpIn help_black {\n\DLXview is a project in progress. For bug reports and further information,\n\please contact yinong@ecn.purdue.edu.\n\}\n\}\n\ ";char HelpStart_tcl[] = "\proc HelpStart {{t .help.text.t}} {\n\ global help_cmd_stack\n\ global help_magenta help_magenta help_blue help_green help_black help_italic\n\ set help_cmd_stack [linsert $help_cmd_stack 0 HelpStart]\n\ $t delete 1.0 end\n\HelpIn help_section {\n\Invoking DLXview:}\n\HelpIn help_black {\n\Once in the correct directory or a correct path has been set, you should\n\be able to run the simulator by typing: }\n\HelpIn help_italic {\n\ disc \n\}\n\HelpIn help_black {\n\Additional startup file can be used to save the time of a series of \n\interactive configuration steps. suppose your startup file is called\n\\"foo\", there are two ways of having dlxview read it:\n\1. Treat your start up file a command line option, type }\n\HelpIn help_italic {\n\ disc -f foo }\n\HelpIn help_black {\n\ to begin simulation. The disadvantage of this approach is that your \n\ input terminal will no longer accept other key strokes during the \n\ simulation session. Fortunately, this feature is irrelevant to most \n\ users who do not require extensive debugging of DLX assemblies and dlxview \n\ internals.\n\2. Start dlxview session first, then type }\n\HelpIn help_italic {\n\ source foo }\n\HelpIn help_black {\n\ after the \"(disc)\" prompt.\n\}\n\ \n\HelpIn help_section {\n\Format of a Startup File:}\n\HelpIn help_black {\n\The startup file contains a sequence of parameter assignments, each\n\assignment is a variable-value pair with the following Tcl syntax:}\n\HelpIn help_green {\n\ set varName ?value? }\n\HelpIn help_black { \n\If there are more than one items in a value, for example, multiple\n\assembly code files and data files are required to be loaded before\n\execution, then these items should be wrapped by a pair of double\n\quotes or curly parenthesis. There is no ordering of assignments,\n\however, the end of assignments should be followed by a \n\}\n\HelpIn help_green {\n\ Start }\n\HelpIn help_black {\n\command. The configurable variables are listed in the following\n\Table1. All the variables and commands are case sensitive, make sure\n\you type them correctly. Some variables are only meaningful in\n\certain pipelining modes, Table1 gives the applicable mode to each\n\variable in the last column. Unpredictable results or core dumps\n\will appear if a variable is assigned under a wrong mode. A \"must\"\n\means the corresponding must be set no matter what pipelining mode has\n\been chosen. If a variable is not specified in the startup file, it\n\will take the default value. Table2 gives the domain of each\n\variable and there default values.\n\} \n\HelpIn help_black {\n\}\n\HelpIn help_green {\n\ Table1. Configurable Variables and Their Meanings\n\VARIABLE MEANING PIPELINE MODE \n\pipeline_mode pipelining mode must\n\input_files code/data/initialize file name must\n\start_address start address in the code BasicPipe,ScoreBoard,Tomasulo\n\numWords memory size BasicPipe,ScoreBoard,Tomasulo\n\num_int_units number of integer units ScoreBoard,Tomasulo\n\num_add_units number of FP adders BasicPipe,ScoreBoard,Tomasulo\n\num_mul_units number of FP multipliers BasicPipe,ScoreBoard,Tomasulo\n\num_div_units number of FP dividers BasicPipe,ScoreBoard,Tomasulo\n\int_latency integer unit latency BasicPipe,ScoreBoard,Tomasulo\n\fp_add_latency FP adder latency BasicPipe,ScoreBoard,Tomasulo\n\fp_mul_latency FP multiplier latency BasicPipe,ScoreBoard,Tomasulo\n\fp_div_latency FP divider latency BasicPipe,ScoreBoard,Tomasulo\n\add_ful_pipe FP adder fully pipelined? BasicPipe \n\mul_ful_pipe FP multiplier fully pipelined? BasicPipe \n\div_ful_pipe FP divider fully pipelined? BasicPipe \n\num_load_bufs number of load buffers Tomasulo\n\num_store_bufs number of store buffers Tomasulo\n\load_buf_latency load buffer latency Tomasulo\n\store_buf_latency store buffer latency Tomasulo\n\}\n\HelpIn help_black {\n\}\n\HelpIn help_black {\n\}\n\HelpIn help_black {\n\}\n\HelpIn help_green {\n\ Table2. Domain and Default Values for Configurable Variables\n\VARIABLE DOMAIN DEFAULT \n\pipeline_mode BasicPipe,ScoreBoard,Tomasulo none\n\input_files files with .s .d .i extension none\n\start_address any legal address or symbol 0x1000\n\numWords [1, 16384] 16384\n\num_int_units 1 1\n\num_add_units [1, 8] 2 \n\num_mul_units [1, 8] 2 \n\num_div_units [0, 8] 2 \n\int_latency [1, ) 1\n\fp_add_latency [1, ) 2\n\fp_mul_latency [1, ) 5 \n\fp_div_latency [1, ) 19 \n\add_ful_pipe 0 for no, 1 for yes 1 \n\mul_ful_pipe 0 for no, 1 for yes 1 \n\div_ful_pipe 0 for no, 1 for yes 0\n\num_load_bufs [0, 8] 0\n\num_store_bufs [0, 8] 0 \n\load_buf_latency [1, ) 1\n\store_buf_latency [1, ) 1\n\}\n\HelpIn help_section {\n\A Sample Startup File:}\n\
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -