Computer Laboratory

Course pages 2013–14

Advanced Computer Design

Exercise 2 - Cyan Processor

  1. copy the source code and Makefile from: /usr/groups/ecad-labs/ACS-ACD/bluespec-examples/CyanProc
  2. build and run using: make run
  3. look through the design
  4. add a multiply instruction
    • use opcode "OpMUL" replacing Op04 in CyanTypes
    • extend the ALU in CyanProc.bsv
  5. create a new assembler routine to compute factorials:
    • fact(1)=1, fact(n)=n*fact(n-1)
    • base it on FibProg.bsv
    • import your new program, assemble and run

Assessment

Demonstrate that you can calculate fact(10)

Optional

Add relative addressing for branch instructions (i.e. the offset from the current PC is stored rather than the absolute target address)