Computer Laboratory

Course pages 2012–13

Advanced Computer Design Exercise - Cyan Processor

  1. copy the source code and Makefile from: /usr/groups/ecad-labs/ACS-ACD-1213/bluespec-examples/CyanProc
  2. build and run using: make run
    • As before you'll need to set-up the paths to Bluespec, but we've discovered a bug in gcc version 4.6 and have also installed gcc version 4.5 ready for Bluesim to use. For this lab you'll need to source a different setup script which sets the CC environment variable to point to this older gcc:
      source /usr/groups/ecad-labs/ACS-ACD-1213/scripts/tools-setup-cyan-bluespec.bash
  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


Demonstrate that you can calculate fact(10)


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