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:
Microprocessor Types
Subroutines
Test and Branch
Instruction Set Coding
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.)
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.
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.
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).
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.
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.
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).
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
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).
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.
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).
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.
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
Cover
Created by cover page printing system.
Title Page
The title page should include the following text:
ELEC6027: VLSI Design Project
Part 1: Microprocessor Research
Topic: (e.g. Test and Branch)
together with your name, your team name, the date and the name of the course tutor (me).
Contents page
Introduction
You may find this is quite short, being merely an introduction to the material presented in the report.
Main Body
One or more sections covering your research topic.
Here you should include appropriate figures and code snippets to illustrate your discussion. Ensure that all figures and code snippets are properly explained in your text.
Where text, figures or code snippets are 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.
Conclusion
Here I would like you to discuss how the issues raised in your report will affect your processor design. Where you have seen different processors opting for different solutions to the same problem you should discuss their relative merits in the context of your design.
References
This is your opportunity to show that you have read widely. No document or web page may appear in this section unless it has been properly referenced from the main text. Each document should be allocated a unique key (e.g. the simple number keys, [n], which have been used in this document).
Bibliography
Here you should list other sources that contain useful information but have not been explicitly referenced from the main text.
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).
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.
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:
[1] McNally B I, Full Custom Design Exercise, http://users.ecs.soton.ac.uk/bim/notes/fcde, last viewed on 1/2/2010
[2] Gajski D D, Principles of Digital Design,
Prentice Hall 1997, pp388-433
[3] Patterson D A and Hennessy J L,
Computer Organization and Design, Morgan Kaufmann 1993
Bibliography:
Hockney R W and Jesshope C R, Parallel Computers 2,
Adam Hilger 1988
- includes information on the Transputer architecture
Stallings W, Computer Organization and Architecture,
6th Edition Prentice Hall 2003
- includes much information on Intel processors such as the 8085
Zaks R, Programming the 6502,
4th Edition Sybex 1983
- a good book on a simple pre-RISC processor
Zaks R, Programming the Z80,
3rd Edition Sybex 1981
- another book by Zaks covering a popular but more complex pre-RISC processor
Keywords:
microacrhitecture, programming model, instruction set, assembly language, addressing modes, stack, call stack, stack frame, subroutine, flag register, status register, condition code register, branch, orthogonal instruction set, code density, interrupt
Most of these keywords return useful articles when typed into Wikipedia. A notable exception is "programming model" since there is actually no Wikipedia article on programming models although phrases like "6502 programming model" or "Z80 programming model" yield interesting articles via internet searching.
Iain McNally
3-2-2010