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

📄 help.html

📁 计算机系统结构的讲义,浓缩了一本一千多页的书.真的是好东西.
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p><h3><a name="startupformat">Format of a Startup File</a></h3><p>The startup file contains a sequence of parameter assignments.  Eachassignment is a variable-value pair with the following Tcl syntax:<pre>	varName ?value? </pre>If there is more than one item in a value (for example, multipleassembly code files and data files are required to be loaded beforeexecution) then these items should be wrapped by a pair of doublequotes or curly parenthesis.  There is no ordering of assignments;however, the end of assignments should be followed by a <pre>	Start</pre>command.  The configurable variables are listed in <a href="help.html#table1">Table 1</a>.  All the variables and commands are case sensitive: make sureto type them correctly.  Some variables are only meaningful incertain pipelining modes; <a href="help.html#table1">Table 1</a>gives the applicable mode to eachvariable in the last column.  Unpredictable results or core dumpswill appear if a variable is assigned under a wrong mode. A "must"means the corresponding variable must be set no matter what pipelining mode hasbeen chosen.  If a variable is not been specified in the startup file, itwill take the default value.  <a href="help.html#table2">Table 2</a>gives the domain of each variable and their default values.<p><center><a name="table1">Table 1.  Configurable Variables and Their Meanings</a></center><pre>VARIABLE           MEANING			   PIPELINE MODE    pipeline_mode      pipelining mode                 mustinput_files        code/data/initialize file name   muststart_address      start address in the code       BasicPipe,ScoreBoard,TomasulonumWords           memory size		           BasicPipe,ScoreBoard,Tomasulonum_int_units      number of integer units         ScoreBoard,Tomasulonum_add_units      number of FP adders             BasicPipe,ScoreBoard,Tomasulonum_mul_units      number of FP multipliers        BasicPipe,ScoreBoard,Tomasulonum_div_units      number of FP dividers           BasicPipe,ScoreBoard,Tomasuloint_latency        integer unit latency            BasicPipe,ScoreBoard,Tomasulofp_add_latency     FP adder latency                BasicPipe,ScoreBoard,Tomasulofp_mul_latency     FP multiplier latency           BasicPipe,ScoreBoard,Tomasulofp_div_latency     FP divider latency              BasicPipe,ScoreBoard,Tomasuloadd_ful_pipe       FP adder fully pipelined?       BasicPipe      mul_ful_pipe       FP multiplier fully pipelined?  BasicPipe      div_ful_pipe       FP divider fully pipelined?     BasicPipe num_load_bufs      number of load buffers          Tomasulonum_store_bufs     number of store buffers         Tomasuloload_buf_latency   load buffer latency             Tomasulostore_buf_latency  store buffer latency            Tomasulo</pre><center><a name="table2">Table 2.  Domain and Default Values for Configurable Variables</a></center><pre>VARIABLE           DOMAIN			   DEFAULT   pipeline_mode      BasicPipe,ScoreBoard,Tomasulo    noneinput_files        files with .s .d .i extension   nonestart_address      any legal address or symbol     0x1000numWords           [1, 16384]                      16384num_int_units      1                               1num_add_units      [1, 8]                          2     num_mul_units      [1, 8]                          2     num_div_units      [0, 8]                          2   int_latency        [1, )                           1fp_add_latency     [1, )                           2fp_mul_latency     [1, )                           5    fp_div_latency     [1, )                           19    add_ful_pipe       0 for no, 1 for yes             1     mul_ful_pipe       0 for no, 1 for yes             1             div_ful_pipe       0 for no, 1 for yes             0num_load_bufs      [0, 8]                          0num_store_bufs     [0, 8]                          0   load_buf_latency   [1, )                           1store_buf_latency  [1, )                           1</pre><p><h3><a name="startupsample">A Sample Startup File</a></h3><pre>	set pipeline_mode BasicPipe	set fp_add_latency 3	set num_add_units 1	set mul_ful_pipe 0	set fp_mul_latency 10	set num_div_units 1	set num_mul_units 1	set fp_div_latency 24	set input_files {f347.i f347.d f347.s}</pre><p><h3><a name="codeformat">Formats of Code and Data Files</a></h3><p><ol><li>Comments are started with a semicolon, and continue to the end of line.<li>Constants can be entered either with or without a preceding number sign.<li>The format of instructions and their operands are as shown in the    <i>CA:AQA</i> text.<li>Labels are defined by a group of non-blank characters starting with    either a letter, an underscore, or a dollar sign,     and followed immediately    by a colon.  They are associated with the address immediately   following the last block of information stored.  This has the negative   effect that if code follows a label following a block of   data that does not end on a word boundary (multiple of 4), the label   will not point to the first instruction in the code, but instead to 1   to 3 bytes before (since the address is only rounded when it is   necessary to correctly align data).  This is done so that if a label   is found in the middle of a data section, it will point to the start   of the next section of data without the data having to be aligned to a   word boundary.  The work-around for this is to use the <tt>.align</tt>(see below)   directive before labels that will not not be aligned with the data    following them.  Labels can be accessed anywhere else within that file,   and in files loaded after that if the label is declared as <tt>.global</tt>   (see below).<li>The text (code) is ended by a <tt>trap #0</tt> instruction.</ol><p>While the assembler is processing an assembly file, the data and instructionsit assembles are placed in memory based on either a text (code) or datapointer. Which pointer is used is selected not by the type of information, but by whether the most recent directive was <tt>.data</tt> or <tt>.text</tt>.   The programinitially loads into the text segment.The assembler supports several directives which affect how it loads the DLX memory.  These should be entered in the place where you would normally placethe instruction and its arguments.  The directives currently supported by <b>dlxview</b> are:<ul><li><tt>.align n  </tt><br>          Cause the next higher address with the lower n bits          zeroed (the next closest address greater that or equal to the          current address that is a multiple of 2^n).<li><tt>.ascii "string1", "string2", ...  </tt><br>          Store the strings listed on the line in memory as a list of           characters.  The strings are not terminated by 0 byte.<li><tt>.asciiz string1", "string2", ...  </tt><br> similar to <tt>.ascii</tt>, except each string is followed by a 0 byte (like C strings).<li><tt>.byte "byte1", "byte1", ...  </tt><br>          Store the bytes listed on the line sequentially in memory.<li><tt>.data [address]  </tt><br>          Cause the following code and data to be stored in the data area.          If an address was supplied, the data will be loaded starting at          that address, otherwise, the last value for the data pointer will          be used.  If we were just reading code based on the text (code)          pointer, store that address so that we can continue form there          later (on a <tt>.text</tt> directive).<li><tt>.double "number1", "number2", ...  </tt><br>          Store the numbers listed on the line sequentially in memory as           double precision floating point numbers. <li><tt>.float "number1", "number2", ...  </tt><br>          Store the numbers listed on the line sequentially in memory as           single precision floating point numbers. <li><tt>.global label  </tt><br>          Make the label available for reference by code found in files          loaded after this file.<li><tt>.space size  </tt><br>          Move the current storage pointer forwarded by size bytes (to leave          some empty space in memory).<li><tt>.text [address]  </tt><br>          Cause the following code and data to be stored in the text (code)           area. If the address was supplied, the data will be loaded starting           at that address, otherwise, the last value for the text pointer will          be used.  If we were just reading code based on the data pointer          store that address so that we can continue form there later (on a           <tt>.data</tt> directive).<li><tt>.word "word1", "word1", ...  </tt><br>          Store the words listed on the line sequentially in memory.</ul><p><b>DLXview</b> allows the user access to a few simple C library functions throughthe use of the <tt>trap</tt>operation.  Currently supported functions are: <b>open ()</b> (<tt>trap #1</tt>),<b>close ()</b> (<tt>trap #2</tt>), <b>read ()</b> (<tt>trap #3</tt>), <b>write ()</b> (<tt>trap #4</tt>), <b>printf ()</b> (<tt>trap #5</tt>). When the appropriate trap is invoked, thefirst argument should be located in the word starting at the address in r14,with the following arguments (as seen in a C statement calling the function)in words above that (r14+4, r14+8, ...).  The result from the function call will be placed in r1 (this means there is currently no support for the library functions that return floating point values).  If a double precisionfloating point value is to be passed to a library function, it will occupytwo adjacent words with the lower word the value of the even valued floating point register, and the higher word containing the value of the odd valuedfloating point register (f0 in 0r(14), f1 in 4(r14)).<p><b>Note:</b> The <b>dlxview</b> file loader is completely inherited from <i>DLXsim</i>, and thishelp section is directly copied from the <i>DLXsim User's Manual</i>. <p><h3><a name="registerformat">Format of Register Initialization File</a></h3><p>Two types of register initialization commands exist.  The first typeis used to initialize integer registers, and the second type is used to initialize floating point registers. <p>For register designators, any ofthe names "r0" through "r31" and "f0" through "f31" may be used.  The names "$0" through "$31"  may also be used (instead of "r0" through "r31"), however, it is safer to use "r" instead of "$" to avoid the confusion withTcl variables.  The name "pc" may be used to refer to the program counter.<ul><li><tt>put reg number</tt><br>           Store number in the register given by reg.  To store floating           point numbers (single or double precision), use the           <tt>fput</tt> command.<li><tt>fput reg number [precision]</tt><br>           Store number in the register given by reg.  If precision is            <tt>d</tt>,            the number is stored a double precision floating point number (in           two words).  If precision is           <tt>f</tt>,            or no precision is given,            the number is stored as a single precision floating point number.</ul><p><h3><a name="inputsamples">Sample Input Files</a></h3><p><pre>f347.s LL:ld      f2, 0(r1)   multd   f4, f2, f0   ld      f6, 0(r2)   addd    f6, f4, f6   sd      0(r2), f6   addi    r1, r1, 8   addi    r2, r2, 8   sgti    r3, r1, done   beqz    r3, LL   nop   trap    #0f347.i   put     r1      0x1000   put     r2      0x2000   fput    f0      3.14    df347.d   .data   0x1000   .double 1.00, 1.01, 1.02, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09    .double 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19    .double 1.20, 1.21, 1.22, 1.23, 1.24, 1.25, 1.26, 1.27, 1.28, 1.29    .double 1.30, 1.31, 1.32, 1.33, 1.34, 1.35, 1.36, 1.37, 1.38, 1.39    .double 1.40, 1.41, 1.42, 1.43, 1.44, 1.45, 1.46, 1.47, 1.48, 1.49    .double 1.50, 1.51, 1.52, 1.53, 1.54, 1.55, 1.56, 1.57, 1.58, 1.59    .double 1.60, 1.61, 1.62, 1.63, 1.64, 1.65, 1.66, 1.67, 1.68, 1.69    .double 1.70, 1.71, 1.72, 1.73, 1.74, 1.75, 1.76, 1.77, 1.78, 1.79    .double 1.80, 1.81, 1.82, 1.83, 1.84, 1.85, 1.86, 1.87, 1.88, 1.89    .double 1.90, 1.91, 1.92, 1.93, 1.94, 1.95, 1.96, 1.97, 1.98, 1.99    .global done   done:    .double 0   .data   0x2000   .double 2.00, 2.01, 2.02, 2.03, 2.04, 2.05, 2.06, 2.07, 2.08, 2.09    .double 2.10, 2.11, 2.12, 2.13, 2.14, 2.15, 2.16, 2.17, 2.18, 2.19    .double 2.20, 2.21, 2.22, 2.23, 2.24, 2.25, 2.26, 2.27, 2.28, 2.29    .double 2.30, 2.31, 2.32, 2.33, 2.34, 2.35, 2.36, 2.37, 2.38, 2.39    .double 2.40, 2.41, 2.42, 2.43, 2.44, 2.45, 2.46, 2.47, 2.48, 2.49    .double 2.50, 2.51, 2.52, 2.53, 2.54, 2.55, 2.56, 2.57, 2.58, 2.59    .double 2.60, 2.61, 2.62, 2.63, 2.64, 2.65, 2.66, 2.67, 2.68, 2.69    .double 2.70, 2.71, 2.72, 2.73, 2.74, 2.75, 2.76, 2.77, 2.78, 2.79    .double 2.80, 2.81, 2.82, 2.83, 2.84, 2.85, 2.86, 2.87, 2.88, 2.89    .double 2.90, 2.91, 2.92, 2.93, 2.94, 2.95, 2.96, 2.97, 2.98, 2.99 </pre><p><a href="help.html#contents"><i>Return to Contents</i></a><p><hr><A HREF="mailto:gba@ecn.purdue.edu"><address>gba@ecn.purdue.edu</address></A></body></html>

⌨️ 快捷键说明

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