📄 script.h
字号:
HelpIn help_black {\n\foo:}\n\HelpIn help_green {\n\ set pipeline_mode BasicPipe\n\ set fp_add_latency 3\n\ set num_add_units 1\n\ set mul_ful_pipe 0\n\ set fp_mul_latency 10\n\ set num_div_units 1\n\ set num_mul_units 1\n\ set fp_div_latency 24\n\ set input_files {f347.i f347.d f347.s}\n\ Start\n\}\n\}\n\ ";char HelpControl_tcl[] = "\proc HelpControl {{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 HelpControl]\n\ $t delete 1.0 end\n\HelpIn help_black {\n\If a button is enabled, the inside text is black; If it is disabled, the \n\inside text is gray. \n\} \n\HelpIn help_section {\n\Configure:}\n\HelpIn help_black {\n\When dlxview is invoked without using a startup file, or right after the processor\n\state reset, you need to press this button to configure the machine to be \n\simulated. In the popped mode configuration window, there are three radio \n\buttons on the top. Among them, click the pipelining mode you want to\n\simulate, another larger parameter configuration window will\n\appear. You can configure your machine by slider dragging or radio\n\button clicking. Once complete, you can exit the configuration windows by\n\pressing the \"Ok\" button in the parameter configuration window first, and\n\then pressing the \"Ok\" button in the mode configuration window.\n\}\n\HelpIn help_black {\n\In the middle of a simulation session, the \"configure\" button on the control\n\panel can be pressed again to check the current configurations. However, \n\the sliders and buttons on the configuration windows are disabled, i.e.,\n\you cannot change your processor configuration once it has started. To \n\abort the current configuration, press \"reset\" button on the control\n\panel first, and then configure your machine from there.\n\}\n\HelpIn help_black {\n\It is worth to mention that in the text book, the latency of a functional unit\n\is defined as the number of intervening cycles between an instruction that \n\produces a result and an instruction that uses the result (See textbook Page \n\189). For example, the integer unit will have latency \"0\", which is somewhat\n\unintuitive. In dlxview, he latency of a functional unit is defined as the total number of clock cycles an instruction will stay in this functional unit. \n\Therefore, the \"latency\" you chose is one clock cycle more than the \n\specification from the textbook.\n\}\n\HelpIn help_black {\n\For more information on the configurable parameters, please refer to\n\tables in the }\n\HelpIn HelpStart {starting DISC }\n\HelpIn help_black {session.\n\}\n\HelpIn help_section {\n\Load:}\n\HelpIn help_black {\n\DLXview forces you to configure the processor before file loading. A file\n\selection window will pop up after you press the enabled \"load\"\n\button. DLXview accepts three types of files before a simulation session\n\begins. The *.s files are assembly code file, *.d files are data\n\file. It is not necessary to have a separate data file. Code file and\n\data file can be merged into a single *.s file. *.i files contain\n\commands to initialize the registers to be used. It is possible to add\n\a few instructions in the assembly code to do the same job, the catch\n\is that the code segment you are interested in won't start at clock\n\cycle one. Register initialization work are unavoidable in some\n\situations. For instance, you want to examine the execution of a loop\n\in which some instructions have have pre-specified operands.\n\Letting this loop starting at clock cycle one, as most of the examples\n\and exercises in the textbook did, will make it easier to focus on the\n\loop instructions themselves without worrying about other minor facts\n\such as the dependency between an loop instruction in the first\n\iteration of a loop and an instruction outside the loop. It is much\n\handier to write a separate register initialization file under these\n\case.\n\}\n\HelpIn HelpCodeFormat {\n\ Format of code file and data File.}\n\HelpIn HelpInitFormat {\n\ Format of register initialization file.}\n\HelpIn HelpInputSample {\n\ Sample input files.\n\}\n\HelpIn help_black {\n\When you choose to load related input files at the same time, clicking\n\the left mouse button on the file selection window for any one of the\n\files you intended to load will highlight these files as a group,\n\given the related files have the same base name. Press \"Load\" button\n\in the Load window to load these files. When you choose to load a\n\single file, the contents of the clicked file will appear to the right\n\of the file selection window, so that you can check whether you select\n\the correct file. You can load as many file as you can and switch\n\between related and single load mode. When all the files you are\n\interested are loaded, press \"Done\" button to close load window. Note,\n\if you choose the files and then press \"Done\" directly without pressing\n\\"Load\" first, no file is actually loaded.\n\}\n\HelpIn help_section {\n\Edit:}\n\HelpIn help_black {\n\\"edit\" button can be invoked any time during a simulation session to \n\revise current DLX code and edit new input files. When the edit window\n\pops up, the assembly code executed by the current simulation session will\n\be automatically copied into the edit window. If a totally new \n\assembly file is going to be edited, simply press \"Clean\" button\n\in the edit window to get rid of the old files. When editing is completed, \n\the new file can be directly loaded into the dlxview to start another simulation\n\session by pressing \"Load\" button in the edit window. Before the new\n\file is actually loaded, a dialog box will ask if any other data file\n\needs to be loaded first. If the answer is \"No\", then the *d file used in the\n\current simulation session will be loaded first by default. Once a newly\n\edited file has been loaded into the simulator through the edit window, \n\the current simulation session is interrupted, and the processor is \n\reset in order to run the latest loaded file. With the help of code editor,\n\you can change the assembly code being executed at any time and tries the\n\another simulation without leaving the dlxview environment.\n\}\n\HelpIn help_section {\n\Step forward:}\n\HelpIn help_black {\n\If no instruction in the loaded code has entered the pipeline yet,\n\pressing \"step forward\" will pop up a window to let you enter the\n\starting address. Otherwise, the simulation will continue from\n\wherever execution previously stopped and run the next instruction.The \n\clock cycle will always advance to the first stage of the newly processed \n\instruction. \n\}\n\HelpIn help_section {\n\Step forward:}\n\HelpIn help_black {\n\If no instruction in the loaded code has entered the pipeline yet,\n\pressing \"next cycle\" will pop up a window to let you enter the starting\n\address. Otherwise, the simulation will advance by exact one clock cycle.\n\The simulator will not necessary proceed to the next instruction, because\n\of the stalls of the pipeline. Pressing \"next cycle\" continuously will\n\show you every detail happened in a pipeline.\n\}\n\HelpIn help_section {\n\Go:}\n\HelpIn help_black {\n\If no instruction in the loaded code has entered the pipeline yet,\n\pressing \"go \" will pop up a window to let you enter the starting address. \n\Otherwise, the simulation will continue from wherever execution\n\previously stopped and will not stop until the execution terminates\n\naturally. Do not forget to put a \"trap #0\" instruction at the end of\n\your assembly code, otherwise, the simulator will continuously fetch \n\new \"nop\" instructions from the folowing zeroed memory.\n\}\n\HelpIn help_section {\n\Step back:}\n\HelpIn help_black {\n\This button provides you the flexibility to back step one instruction and\n\view the state of the processor at the clock cycle when the last instruction\n\entered the pipeline. If more than 1K clock cycles has already been\n\simulated, it will take a little while to move the pipeline to an earlier\n\state. Be patient!\n\}\n\HelpIn help_section {\n\Previous cycle:}\n\HelpIn help_black {\n\The button provides you the flexibility to wrap back the state of \n\the processor for exact one clock cycle. If more than 1K clock cycles has \n\already been simulated, it will take a little while to move the pipeline \n\to an earlier state. Be patient!\n\}\n\HelpIn help_section {\n\Reset:}\n\HelpIn help_black {\n\Whenever you want to change the pipelining mode, the configuration of\n\the processor, or simulate a new piece of code, \"reset\" button is the right\n\place to go. The choices provides by the reset window are quit self-\n\explainable.\n\}\n\HelpIn help_section {\n\Trace:}\n\HelpIn help_black {\n\\"trace\" button provides the capability to produce an instruction trace\n\or a memory reference trace. You can feed it into a trace-driven simulator\n\or dinero cache simulator later to do further analysis. Enter the file name\n\in which you want to save the trace, the trace will be collected starting from \n\the current instruction. Normally, the trace file is not available until\n\the current simulation session ends, i.e, the simulation stops naturally or\n\is interrupted by a reset. However, when you press any of the \"step back\"\n\or \"previous cycle\" button during the simulation, the tracing process is \n\stopped automatically to avoid producing garbage wrapped around trace. \n\In this case, a trace file containing the information from when you started \n\the tracing up to the last instruction will be generated. \n\}\n\HelpIn help_section {\n\Quit:}\n\HelpIn help_black {\n\Lets you say good-bye to dlxview.\n\}\n\}\n\ ";char HelpCodeFormat_tcl[] = "\proc HelpCodeFormat {{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 HelpCodeFormat]\n\ $t delete 1.0 end\n\HelpIn help_black {\n\1. Comments are started with a semicolon, and continue to the end of line.\n\2. Constants can be entered either with or without a preceding number sign.\n\3. The format of instructions and their operands are as shown in the \n\ Computer Architecture book.\n\4. Labels are defined by a group of non-blank characters starting with \n\ either a letter, an underscore, or a dollar sign, and followed immediately \n\ by a colon. They are associated with the address immediately\n\ following the last block of information stored. This has the bad\n\ effect that if you have code following a label following a block of\n\ data that does not end on a word boundary (multiple of 4), the label\n\ will not point to the first instruction in the code, but instead to 1\n\ to 3 bytes before (since the address is only rounded when it is\n\ necessary to correctly align data). This is done so that if a label\n\ is found in the middle of a data section, it will point to the start\n\ of the next section of data without the data having to be aligned to a\n\ word boundary. The work-around for this is to use the }\n\HelpIn help_italic {.align }\n\HelpIn help_black {(see below).\n\ directive before labels that will not not be aligned with the data \n\ following them. Labels can be accessed anywhere else within that file,\n\ and in files loaded after that if the label is declared as }\n\HelpIn help_italic {.global }\n\HelpIn help_black {\n\ (see below).\n\5. The text (code) is ended by a \"trap #0\" instruction.\n\}\n\HelpIn help_black {\n\}\n\HelpIn help_black {\n\While the assembler is processing an assembly file, the data and instructions\n\it assembles are placed in memory based on either a text (code) or data\n\pointer. Which pointer is used is selected not by the type of information, \n\but by whether the most recent directive was }\n\HelpIn help_italic {.data }\n\HelpIn help_black {or }\n\HelpIn help_italic {.text. }\n\HelpIn help_black {The program\n\initially loads into the text segment.\n\The assembler supports several directives which affect how it loads the DLX's \n\memory. These should be entered in the place where you would normally place\n\the instruction and its arguments. The directives currently supported by \n\dlxview are:\n\}\n\HelpIn help_italic {\n\.align }\n\HelpIn help_black {n Cause the next higher address with the lower n bits\n\ zeroed (the next closest address greater that or equal to the\n\ current address that is a multiple of 2^n).\n\}\n\HelpIn help_italic {\n\.ascii }\n\HelpIn help_black {\"string1\", \"string2\", ...\n\ Store the strings listed on the line in memory as a list of \n\ characters. The strings are not terminated by 0 byte.\n\}\n\HelpIn help_italic {\n\.asciiz }\n\HelpIn help_black {\"string1\", \"string2\", ...\n\ similar to }\n\HelpIn help_italic {.ascii, }\n\HelpIn help_black {except each string is followed by\n\ a 0 byte (like C strings).\n\}\n\HelpIn help_italic {\n\.byte }\n\HelpIn help_black {\"byte1\", \"byte1\", ...\n\ Store the bytes listed on the line sequentially in memory.\n\}\n\HelpIn help_italic {\n\.data }\n\HelpIn help_black {[address]\n\ Cause the following code and data to be stored in the data area.\n\ If an address was supplied, the data will be loaded starting at\n\ that address, otherwise, the last value for the data pointer will\n\ be used. If we were just reading code based on the text (code)\n\ pointer, store that address so that we can continue form there\n\ later (on a }\n\HelpIn help_italic {.text } \n\HelpIn help_black {directive).\n\}\n\HelpIn help_italic {\n\.double }\n\HelpIn help_black {\"number1\", \"number2\", ...\n\ Store the numbers listed on the line sequentially in memory as \n\ double precision floating point numbers. \n\}\n\HelpIn help_italic {\n\.float }\n\HelpIn help_black {\"number1\", \"number2\", ...\n\ Store the numbers listed on the line sequentially in memory as \n\ single precision floating point numbers. \n\}\n\HelpIn help_italic {\n\.global }\n\HelpIn help_black {label\n\ Make the label available for reference by code found in files\n\ loaded after this file.\n\}\n\HelpIn help_italic {\n\.space }\n\HelpIn help_black {size\n\ Move the current storage pointer forwarded by size bytes (to leave\n\ some empty space in memory).\n\}\n\HelpIn help_italic {\n\.text }\n\HelpIn help_black {[address]\n\ Cause the following code and data to be stored in the text (code) \n\ area. If the address was supplied, the data will be loaded starting \n\ at that address, otherwise, the last value for the text pointer will\n\ be used. If we were just reading code based on the data pointer\n\ store that address so that we can continue form there later (on a \n\}\n\HelpIn help_italic {.data } \n\HelpIn help_black {directive).\n\}\n\HelpIn help_italic {\n\.word }\n\HelpIn help_black {\"word1\", \"word1\", ...\n\ Store the words listed on the line sequentially in memory.\n\DLXview allows the user access to a few simple C library functions through\n\the use of the }\n\HelpIn help_italic {TRAP }\n\HelpIn help_black {operation. Currently supported functions are: \n\}\n\HelpIn help_italic {open ()}\n\HelpIn help_black {(trap #1), }\n\HelpIn help_italic {close ()}\n\HelpIn help_black {(trap #2), }\n\HelpIn help_italic {read ()}\n\HelpIn help_black {(trap #3), }\n\HelpIn help_italic {write ()}\n\HelpIn help_black {(trap #4), \n\}\n\HelpIn help_italic {printf ()}\n\HelpIn help_black {(trap #5), When the appropriate trap is invoked, the\n\first argument should be located in the word starting at the address in r14,\n\with the following arguments (as seen in a C statement calling the function)\n\in words above that (r14+4, r14+8, ...). The result from the function call \n\will be placed in r1 (this means there is currently no support for the \n\library functions that return floating point values). If a double precision\n\floating point value is to b e passed to a library function, it will occupy\n\two adjacent words with the lower word the value of the even valued floating \n\point register, and the higher word containing the value of the odd valued\n\floating point register (f0 in 0r(14), F1 in 4(r14)).\n\}\n\HelpIn help_black {\n\}\n\HelpIn help_black {\n\}\n\HelpIn help_black {\n\}\n\HelpIn help_black {\n\}\n\HelpIn help_black {\n\
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -