📄 http:^^www.cs.wisc.edu^~cs354-2^cs354^lec.notes^case.studies.html
字号:
and the technology was pushed to its limits. 2. Include only what was necessary, but on that, a "don't spare the horses" philosophy was used. This means that extra hardware was used (not paying attention to the cost) wherever it could to make the machine faster. And, at the same time, any functionality that wasn't necessary (in Semour's opinion) was left out. We'll see soon what that really means. Just remember: if something seems out of place to you, or some functionality of a computer that you think is essential and was not included in the Cray 1, it wasn't necessary! And, leaving something out made the machine faster. What the Cray 1 is good for: it was designed to be used for scientific applications that required lots and lots of floating point manipulations. It wouldn't make a good instructional machine (don't want to hook lotsa terminals up to it!), and it wouldn't be much fun to try to implement a modern operating system on. How it is used: most often, a separate (not as fast/powerful) computer was hooked up as what is commonly called a host computer. The host is where you do all you editing and debugging of programs. The host also maintains a queue of jobs to be run on the Cray. One by one the jobs are run, so the only thing that the Cray is doing is running the final jobs -- often with LOTS of data. Although its operating system would allow it, the "multi-tasking" (had more than 1 program running simultaneously) ability was not often used. instruction set fixed length instructions either 16 or 32 bit (no variablility that depends on the number of operands) number of operands possible for an instruction 0-3 number and kind of instructions op codes are 7 bits long -- giving 128 instrucitons This includes complete integer and floating point instructions. Notice that missing from the instruction set are: character (byte) manipulation, duplicates of anything (!), integer divide, etc. Data representation is vastly simpified from what we've seen so far! There are ONLY 2's complement integers, and floating point numbers! ALL accesses to memory are done in WORD chunks. A word on the Cray 1 is 64 bits. All instructions operate on a single size of data -- Either a 64 bit word, or on an address (24 bits). addressing modes (strikingly similar to MIPS) Register Mode. An instruction (op code) specifies exactly where the data is. Base Displacement Mode. Used only for load and store instructions. REGISTERS: There are an ENORMOUS number of registers. There are 5 types of registers. S registers -- 'S' stands for scalar. These are 64 bit regs. They are used for all sorts of data, but not addresses. There's 8 of them. T registers -- These are 64 64bit backup registers for the S registers. If you were to do some heavy programming on the Cray 1, you'd find these registers very useful. This is partially because you run out of S registers quickly, so you need temporary storage, but don't want your program to store to main memory (slow!). There's also an instruction that allows you to load a block of memory to the T registers. That's 1 instruction to do a bunch of loads. A registers -- 'A' stands for address. These are 24 bit regs. They are used for addresses, and to a rather limited extent, integer counters. B registers -- These are backups to the A regs and are used in the same manner as the T regs. V registers -- 'V' stands for vector. There are 8 sets of V regs. Each set has 64 64-bit registers! That is a lot! They are used mainly for processing large quantities of "array" data. Their use makes the Cray 1 very fast. A single instruction that uses a vector register (1 set) will cause something to happen to each of the 64 registers within that set. (SIMD) hardware stack no support for stack accesses at all! There is no special stack pointer register. cache none. There's so many registers that there isn't really a need for one. size of machine A bit bigger than 2 refridgerators. speed of machine Significantly faster than the VAX and 68000. For a while, it was the fastest machine around. price of machine As an analogy to some very pricey restaurants: If you need to see the prices on the menu, you can't afford to eat there. Probably about $3 million for the basic machine when they first came out. A Cray 1 came with a full time hardware engineer, (a field service person). Why? Down time on a Cray is very expensive due to the way they are expected to be used. Waiting for field service to come was considered too expensive. how many instructions get executed at one time its debatable. There can be more than 1 instruction at some point in its execution at 1 time. It is a pipelined machine. This can only go so far (only 1 new instruction can be started each clock cycle). complexity of ALU There are actually quite a few alu's in the machine. Cray calls them functional units. Each one is a specialized piece of hardware that does its own job as fast as can be done. Each of them could conceivably be working at the same time.on the VAX----------The VAX was a popular and commercially successful computerput out in the early 1970's by DEC (Digital Equipment Corp).It might be characterized by the term CISC. RISC (Reduced Instruction Set Computer) CISC (Complex Instruction Set Computer)A CISC computer is often characterized by 1. many instructions 2. lots of addressing modes 3. (this one is debatable) variable length instructions 4. memory-to-memory architectureSome details:LOTS OF INSTRUCTIONS integer arithmetic different opcode for varying size data logical different opcode for varying size data address manipulations bit manipulations control instructions conditional branches, jumps, looping instructions procedure mechanisms call and return instructions (there were more than 1!) floating point character string manipulations crc (Cyclic Redundancy Check) decimal string arithmetic presuming representation of binary coded decimal string edit overall: more than 200 instructions opcodes were of variable length, but always a multiple of 8 -- most opcodes were specified in the first 8 bits of an instruction.REGISTERS 16 32-bit general purpose registers, except that they really weren't all general purpose R15 is the PC -- note that the user can change the PC at will! R14 is a stack pointer R13 is a frame pointer R12 is an argument pointer (address of where a procedure's parameters are stored -- sometimes on the stack, and sometimes in main memory)DATA TYPES byte word (16 bits) longword (32 bits) quadword (64 bits) octaword (128 bits) F floating point (32 bits -- 7 bits of exponent) D floating point (64 bits -- 7 bits of exponent) G floating point (64 bits -- 10 bits of exponent) H floating point (128 bits -- 15 bits of exponent) character string (consecutive bytes in memory, specified always by a starting address and the length in bytes) numeric string (the ASCII codes that represent an integer) packed decimal string (consecutive sequence of bytes in memory that represent a BCD integer. BCD digits are each in 4-bit quantities (a "nibble") example: the integer +123 is represented by 0001 0010 0011 1100 (1) (2) (3) (+) numbering a<7-4> a<3-0> a+1<7-4> a+1<3-0>each instruction operates on a fixed data typeOPERAND ACCESS the number of operands for each individual instructions is fixed the location of operands is definitely not fixed, they can be in memory, or registers, and the variety of addressing modes that specify the location of an operand is large! equivalent of MIPS add $2, $3, $4 addl3 R3, R4, R2 ^^ ||-- 3 operands | |--- operate on a 32 bit quantity ( there is also addb3, addw3, addb2, addw2, addl2) (and this is just for 2's complement addition!) This is a VERY simple use of addressing modes. The syntax of operand specification allows MANY possible addressing modes -- every one discussed in chapter 8, plus more! for example addl3 (R3), R4, R2 uses Register Direct addressing mode for the first operand -- operation the address of the first operand is in R3, load the operand at the address, add to the contents of R4, and place the result into R2 The addressing mode for each operand can (an often is) be different!One type addressing mode (not discussed in the text) sticks out --auto-increment and auto-decrement They have the side effect of changing the address used to get an operand, as well as specifying an address. addl3 (R3)+, R4, R2 operation the address of the first operand is in R3, load the operand at the address, then increment the contents of R3 (the address), then add data loaded from memory to the contents of R4 and place the result into R2 the amount added to the contents of R3 depends on the size of the data being operated on. In this case, it will be 4 (longwords are 4 bytes)MACHINE CODETogether with each operand is an addressing mode specification.Each operand specification requires (at least) 1 byte.Format for the simple addl3 R3, R4, R2 8-bit opcode 0101 0011 0101 0100 0101 0010 ^ ^ ^ ^ ^ ^ | | | | | | ---- | ---------- | --------- | -- mode (register = 5) | | | |------------|-----------|--- which registerFormat for the addl3 (R3), R4, R2 same 8-bit opcode 0110 0011 0101 0100 0101 0010 ^ ^ ^ ^ ^ ^ | | | | | | ---- | ---------- | --------- | -- mode | | | |------------|-----------|--- which registerEach instruction has an 8-bit opcode.There will be 1 8-bit operand specifier for each operand that the instruction specifies.Because of the large number and variety of addressing modes,an operand specification can be much more than 1 byte.Example: Immediates are placed directly after their specificationwithin the code.PERFORMANCE the term MIPS (millions of instructions per second) really came from the VAX -- the VAX 11 780 ran at just about 1 MIPS note that this term is misleading -- Instructions take variable times to fetch and execute, so the performance depends on the programSIZE one version: the VAX11 750 was about the size of a large-capacity washing machine another version: the VAX11 780 was about the size of 2 refridgerators, standing side by side</pre>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -