WashU2-1 - Jon Turner/David M. Zar Basic operation...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Jon Turner/David M. Zar Basic operation Instruction set Programming and simulating the processor Design of the WashU-2 Processor – Part 1 ‹#› WashU-2 Block Diagram Memory stores programs and data » organized as set of numbered memory words » memory word can hold a 16 bit value » processor can read from or write to any word Fetch & execute cycle » read word whose address is in Program Counter (PC) and store it in Instruction Register (IR); then increment PC » perform instruction using Accumulator (ACC), Arithmetic & Logic Unit (ALU) and possibly Indirect Address Register (IAR) IREG, PC, IAR and ACC are all 16 bit registers Controller coordinates actions of other components Data & Address Buses carry data between components Controller IREG Data Bus Address Bus Memory 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A FFFF . . . PC IAR ACC enable read/write ALU ‹#› WashU-2 Instruction Set 0000 halt – halt execution 0001 negate – ACC := – ACC 01xx branch – PC := PC + ssxx (sign-extended addition) 02xx branch if zero – if ACC = 0 then PC := PC + ssxx 03xx branch if positive – if ACC > 0 then PC := PC + ssxx 04xx branch if negative – if ACC < 0 then PC := PC + ssxx 05xx indirect branch – PC := M [ PC+ ssxx] 1xxx immediate load – ACC := sxxx 2xxx direct load – ACC := M [pxxx] (p=high digit of PC ) 3xxx indirect load – IAR := M [pxxx]; ACC := M [ IAR ] 5xxx direct store – M [pxxx] := ACC 6xxx indirect store – IAR := M [pxxx]; M [ IAR ] := ACC 8xxx add – ACC := ACC + M [pxxx] cxxx and – ACC := ACC and M [pxxx] ‹#› Using the WashU-2 Processor Reset by setting pressing “north” button » this restarts the processor, but does not re-initialize memory » use program button to re-initialize memory Using single step mode » press west button to enter single-step mode, press again to execute one instruction » press south button to exit single step mode Using display » display shows IREG ACC SnoopAdr PC IAR SnoopData » when switch(3)=0, knob controls Snoop Address register » when switch(3)=1, knob controls Snoop Data register • press east button to load SnoopData value into M[SnoopAdr] » press down on knob to change value by larger increments ‹#› Simple Program Repeat: wait for new input to be present; read input and add it to running sum Address Instruction Comment 0000 1000 (ACC = 0) -- sum = 0 0001 5011 (M[0011] = ACC)...
View Full Document

This document was uploaded on 11/06/2011.

Page1 / 17

WashU2-1 - Jon Turner/David M. Zar Basic operation...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online