VLSI Design Project 2009/2010

Microprocessor Research


Research

In order that you might make informed choices of features to include in your microprocessor designs, you are required to undertake some basic research.

The topics for research are listed below:

  1. Microprocessor Types

  2. Subroutines

  3. Test and Branch

  4. Instruction Set Coding

  5. Interrupts

Each student should write a report on just one of these topics. No two students in the same team should choose the same topic (You will have to negotiate in your teams to decide who will cover each topic).

To achieve a good mark, you will need to make a comparative study of two or more processors and illustrate your discussion with assembly language code for these processors. (Including well written assembly language examples in your report demonstrates that you have a good understanding of the issues and of the machines studied.)

Reading

You should read as widely as possible in support of this research. You may like to start with lecture notes linked from the course web page[1] and with the Processor Design chapter in the course textbook by Gajski[2]. Other textbooks worth looking at are Computer Organization & Design[3] and Computer Architecture: A Quantitative Approach[4] both by Patterson & Hennessy and used as core texts for courses in ECS.

You should study at least one standard RISC machine such as MIPS, SPARC or DLX and at least one simple CISC machine such as 8086 (or even the 8080), Z80, 6809 or 6502.

You may also like to consider more quirky processors such ARM or Transputer. The ARM is a novel RISC machine with an interesting approach to condtional execution (and in later Thumb versions an interesting approach to coding efficiency). The Transputer is a good example of a zero-address architecture and takes an interesting approach to building immediate values within its operand register and an alernative approach to coding efficiency.

Although microcontrollers (e.g. AVR/PIC) may contain interesting features, they are generally too specialised to be of interest in the context of this exercise.

Note that I have not mentioned machines such as the Pentium since they are an order of magnitude more complex than the processor that you will be building.

You should use both the library (especially good for older processors) and the Web when looking for information.

Although individual reports will be written, the research itself is a team exercise. Feel free to divide the task of searching for information and then get together with your team mates to exchange reading matter.

Detailed Guidance

In the following sections, detailed guidance is provided for each of the research topics:
  1. Microprocessor Types

    You should discuss these issues in relation to at least one RISC and one CISC machine. In addition you will have to consider less common machines such as a stack based machine supporting zero address arithmetic.

    Note that a modern CISC machine such as a Pentium is said to have a Register-Memory architecture although it may execute register-register as well as register-memory instructions. Similarly many modern instruction sets include both 2 address and 3 address instructions.

    Example Code

    To illustrate your discussion, you should provide outline code for evaluating the following expression:

    	X = ( A - B ) - ( C - 100 )
    
    for each of the following types of machine:

    where each of A, B & C is loaded from memory and X is stored to memory.

    note that this is not the same as evaluating X = ((( A - B ) - C ) + 100 ) since the conditions that will cause arithmetic overflow will be different.

    Extra credit will be available for actual assembly language for appropriate machines (instead of generic outline code).

  2. Subroutines

    You should discuss these issues in relation to at least one RISC and one CISC machine. The main difference here is that unlike CISC machines, most RISC machines do not have built in support for a stack. This gives rise to different automated behaviour on subroutine call and return.

    Example Code

    To illustrate your discussion, you should provide assembly language code (targetting one of the machines you have researched) for:

    Extra credit will be available if two versions are provided, one for a typical CISC machine and one for a typical RISC machine.

    Note that this use of the stack for passing parameters and results constitutes a calling convention. It may not match calling conventions that you find documented for different processors that you research, but it can be implemented on any processor which supports a stack. It is also the calling convention used for all examples that you need to write for this course.

  3. Test and Branch

    You should discuss the operation of test/compare and conditional branch in processors which do support condition code flags (Carry, Negative, oVerflow, Zero) and in those which don't. (The MIPS processor is a good example of a processor which doesn't support condition code flags).

    To complete your discussion of condition code flags, you should explain how the Carry flag is used to support multi-word addition (e.g. 64 bit addition in a 32 bit machine - using add with carry).

    Example Code

    To illustrate your discussion, you should provide short sections of assembly language to show how you might perform a number of different test and branch functions on a number of different machines (with a discussion of the affected flags).

    e.g. Branch if Rx less than or equal to Ry

  4. Instruction Set Coding

    You should discuss the orthogonality found in the instruction coding of a typical RISC processor in terms of the bit fields within the instruction allowing selection of function and operands.

    You should discuss code density offered by typical RISC and CISC machines. You should also discuss code density in less standard machines such as ARM Thumb or T800 Transputer (both of which are 32-bit machines where the instruction width is narrower than the data width).

    Example Code

    To illustrate your discussion, you should provide short sections of assembly language (along with a calculation of the number of bytes required for code storage) to demonstrate the comparative benefits of different processors in terms of code density.

  5. Interrupts

    You should discuss the interrupt cycle of one or more machines (preferrably one RISC and one CISC).

    In each case you should discuss the processor's response to an external interrupt including interrupt mask check, automated context save and selection of interrupt service routine location (where these occur).

    In addition you should describe the actions of a typical interrupt service routine including any explicit context save (to ensure that data belonging to the interrupted routine is not corrupted) and the actions required to return from the subroutine.

    You may also like to discuss the implementation of nested interrupts (i.e. one interrupt that interrupts another).

    Example Code

    To illustrate your discussion, you should provide assembly language code (targetting one of the machines you have researched) for context save at the beginning of an interrupt service routine and for recovery of saved information and return from interrupt at the end of an interrupt service routine.

    note that you will only have to write code for the explicit context save - there will be no code relating to any automated context save.

    Extra credit will be available if two versions are provided, one for a typical CISC machine and one for a typical RISC machine.

Report

As the deliverable for this stage of the design you should write one report per team member.

The main body of the report should be between 700 and 1000 words in length (not including title page, contents page, figures, assembly language code, appendices).

The full report including title page, contents page and all appendices should be no longer than 10 sides of A4.

Report Structure

The report should be bound to the cover using three large staples along its left hand edge (there is no need for a plastic ring binder for such a short report).

Handin

A PDF version of the full report (including all appendices) and another of the main body (not including any appendix) should be submitted via the C-Bass system.

A paper copy of the full report (including all appendices) should then be handed in to the School Office (there is no need to hand in a copy of the C-Bass receipt since the cover page will have a barcode on it which is used by the school office to process your submission).

In addition, a PDF version of the main body of the report (not including any appendix) should be submitted to the JISC plagiarism system.

Plagiarism

When marking this work, I want to find out what you have learned during your research. In order to guage your understanding, I need to see your explanations in your words (not explanations from text books or Wikipedia copied and pasted into your report).

As mentioned earlier, where any material is copied from another source, the source must be clearly acknowledged. Copied text must be surrounded by quotation marks "..." to show clearly that it is copied. If you copy material from the another source (including but not limited to: the internet, text books, the work of other students past or present) without quotation marks "..." and appropriate acknowledgement, this is considered as plagiarism. I will be checking very carefully for evidence of plagiarism. In the event that any plagiarism is found, penalties will be imposed in accordance with the University's disciplinary policy.


References:


Bibliography:


Keywords:


Iain McNally
3-2-2010