<- previous index next ->
Get paper handout, fill in values for registers and memory as we discuss the instructions in this lecture. The program starts with PC set to address zero. The instructions are defined on cs411_opcodes.txt Some things slightly different for CMPE, will have extra "ce" in some file names part1.asm part1.abs part1.abs address instruction assembly language 00000000 8C010074 lw $1,w1($0) 00000004 8C020078 lw $2,w2($0) 00000008 8C03007C lw $3,w3($0) 0000000C 00000000 nop 00000010 00000000 nop 00000014 00232020 add $4,$1,$3 00000018 00222822 sub $5,$1,$2 0000001C 000133C2 sll $6,$1,15 00000020 00023C03 srl $7,$2,16 00000024 0003400B cmpl $8,$3 00000028 0022480D or $9,$1,$2 0000002C 0023500F and $10,$1,$3 00000030 00435818 div $11,$2,$3 00000034 0062601B mul $12,$3,$2 00000038 AC010080 sw $1,w4($0) 0000003C 300D0074 addi $13,w1 00000040 00000000 nop 00000044 00000000 nop 00000048 8DAE0004 lw $14,4($13) 0000004C 31AF0008 addi $15,8($13) 00000050 3C100010 lwim $16,16 00000054 00000000 nop 00000058 00000000 nop 0000005C ADE30008 sw $3,8($15) 00000060 00000000 nop 00000064 00000000 nop 00000068 00000000 nop 0000006C 00000000 nop 00000070 00000000 nop 00000074 11111111 w1: word 0x11111111 00000078 22222222 w2: word 0x22222222 0000007C 33333333 w3: word 0x33333333 00000080 44444444 w4: word 0x44444444 After the CPU has executed the first instruction: General Registers RAM memory initial final $0 00000000 -------- $1 11111111 00000074 11111111 -------- -------- ____________ $2 00000078 22222222 ______________ -------- ____________ $3 0000007c 33333333 ______________ -------- ____________ $4 00000080 44444444 ______________ -------- ____________ $5 00000084 xxxxxxxx ______________ -------- ____________ $6 ______________ $7 ______________ $8 ______________ $9 ______________ $10 ______________ $11 ______________ $12 ______________ This is part of your project: part1.abs and the result of running that small program part1.chk: part1.chk Note the large amount of information printed each clock time. Note that it takes 5 clock cycles to finish an instruction. Basic MUX Truth Table and Schematic How MUX are used to route data You can see much of the code for the above in the starter code for Proj1: part1_start.vhdl There are basic design principles for computer architecture and many apply to broader applications. Design Principle 1: Simplicity is best achieved through regularity. A few building blocks, used systematically, will have fewer errors, be available sooner and sell for less. A uniform instruction set allows better compilers. Design Principle 2: Smaller is faster: Smaller feature size means signals can move faster. Shorter paths, less stages, allow completion sooner. Design Principle 3: Good design requires good compromises. There are no perfect architectures. There are kluges. Design Principle 4: Make the common part fast. Amdahl's law, be sure you are maximizing speedup. Pentium 4 Hyper threading Intel Core Duo AMD quad core, one core shown $329 for just 1/2 quad core processor a 4 CPU, 8GB RAM configuration Now 12-core 16GB RAM, 3 hard drives, 2 DVD writers Practice safe computing! Beware Malware, Spyware and Adware: Do everything you can to keep malware from infecting your systems, malware authors do all they can to keep their work from being detected and removed. By looking at the methods that malware uses to keep itself safe, you can better root it out and remove it before the damage is done. Downloading attachments is the primary way malware gets into your system. HW3 assigned
<- previous index next ->