50 likes | 157 Views
Explore the microcoded implementation of a CPU architecture, focusing on instruction set, addressing modes, register sets, and the microcoded approach. Learn about machine definitions, microprograms, and test programs. Modify an existing program to incorporate an additional instruction and optimize microprogram content.
E N D
Microcoded Implementation of a CPU Archtecture Summary from Matlo Handout
What Identifies CPU Architecture • Instruction set • Addressing mode • Direct e.g. ac := ac + m[x] • Indirect e.g. m[ac] := m[sp]; sp:=sp+1 • local e.g. ac := ac + m[sp+x] • Register sets • 16 registers, 16-bit wide
Microcoded Approach • Control store simulates architecture • Microinstructions and instructions share the resources • .def: Machine definition • .mal: Microprogram • .asm: Test program
c dcd Register File b dcd a dcd b a c 4 3 2 1 latch latch mar mmux mpc increment mbr amux Control Store ALU amux cond alu mar b a addr sh mbr rd enc wr c n,z shifter
Assignment 1 • Modify such that • It does not use a shifter. • It implements the new instruction: multiply from memory MULD (ac := ac * m[x]) Rewrite the code for the MAC-1 program fact.asm (contained in the micmac distribution) so that it uses MULD. • Then modify one.mal so that it only contains instructions necessary to run fact.asm.