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 pre-RISC machine such as 8086 (or even the 8080), Z80, 6809 or 6502 (note that I have chosen to describe these machines as pre-RISC rather than CISC since they are not significantly more complex than the first generation of RISC machines).
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 conditional 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 alternative 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 (execept possibly as a simple example of interrupt support).
Note that I have not mentioned machines such as the Pentium and its descendants 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
Note that you will need to treat these concepts separately in order to get a good mark.
You should discuss these concepts in relation to at least one Register-Register machine and one Register-Memory 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 the Pentium and its descendants are said to have Register-Memory architecture although they 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 ) - ( ~A | 33 )for each of the following types of machine:
where each of A & B is loaded from memory and X is stored to memory.
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 machine which has built-in support for a stack and one machine which does not have built-in support for a stack (note that almost all machines will declare one register to be a stack pointer but such a declaration does not imply built-in support for a stack). In general a machine with built-in support for a stack will access data on the stack automatically during subroutine call and return instructions while a machine without such support might make similar accesses but only with additional instructions.
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 machine with built-in support for a stack and one with no such support.
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 almost any general purpose processor. 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
Do not simply look at test and branch functions that are simple to code on all machines. A test and branch function that is easy to code on some machines but can be coded with more difficulty on others provides a greater insight into the issues.
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.
Do not waste your time searching for a perfectly orthogonal instruction set. Here we are interested in the practical benefits and drawbacks of orthogonality, not orthogonality for its own sake.
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).
Producing an intruction set with optimal code density is a mathematical problem based on information theory. Various processor designers have used information theory to a greater or lesser degree to improve the code density of their instruction sets. You might want to consider such work in your research.
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 which uses only processor registers for automated context save on interrupt and one which uses the stack for automated context save on interrupt).
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 service routine.
You may also like to discuss the implementation of nested interrupts (i.e. one interrupt that interrupts another).
note that many machines, even those which are described as having a reduced instruction set, have complex interrupt behaviour - for this reason you might like to consider early RISC architectures such as ARM610.
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 machine which uses only processor registers for automated context save on interrupt and one which uses the stack for automated context save on interrupt.
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 1400 and 1600 words in length (not including title page, contents page, list of references, bibliography, appendices). Assembly language examples should be included in the main body of the report and will count against the word limit.
You should include a declaration of the number of words that you have used at the end of the conclusions section of the report.
The full report including title page, contents page and all appendices should be no longer than 10 sides of A4.
Since the maximum word count is small, you will have to craft your report carefully. My advice is to introduce a concept and then give processor and code examples of that concept within the same section of text rather than introducing repetition by separating the theory from the practice. This is not a hard and fast rule but may help you to concentrate on including relevant information on the processor examples rather than other material that does not relate to the research topic.
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.
Presentation of Research
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 title page, table of contents, list of references, bibliography and appendices) and another of the main body (not including title page, table of contents, list of references, bibliography and appendices) should be submitted via the C-Bass system.
A paper copy of the full report (including title page, table of contents, list of references, bibliography and 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 title page, table of contents, list of references, bibliography and appendices) 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 28/1/2014
[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, information theory, 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
28-1-2014