LM3000 Science Workshop Presentation

From BenningtonWiki

Jump to: navigation, search

Contents

[edit] Introduction

Eben

[edit] What is it?

The LM3000 is a (sort-of) Turing complete micro(sort-of)-processor. This means that it has a computational power equivalent to a universal Turing machine. This means that it can perform any calculation a universal Turing machine can, and therefore it can, theoretically, perform any calculation that any other Turing complete is capable of. This is somewhat disingenuous, as there are several severely limiting factors to our design which preclude our microprocessor from being fully Turing complete as the term applies to modern computers. Regardless, the LM3000 fulfills all of the requirements necessary for a machine (of any sort) to be called a computer. These requirements are:

1. Has state, i.e. is capable of remembering values, has memory.
2. Is capable of manipulating values, or changing its state.
3. Can make changes based on its state.

More specifically, our microprocessor uses a Harvard architecture, it features an 8-bit data-bus, and a separate 8-bit address-bus. It has 3 8-bit registers; an 8-bit ALU that can add and subtract, but cannot perform multiplication, bit-shifting, or bitwise logic operations (AND, OR, NOT, XOR). It has 512 bytes of program RAM. It's clock has performed reliably at 25 Hz, with a hypothetical maximum frequency of 500 kHz.

Joe says: not "has a computational power equivalent to" but "is theoretically equivalent to"; not "fully" Turing complete but "strictly" Turing complete; after #3, perhaps say "in other words, it's a machine that changes itself."

[edit] Historical Context

The LM3000 is in many ways roughly comparable to Konrad Zuse's Z3, built in 1941, which was the first working programmable, fully automatic computer (though the Z3 lacked the ability to branch). The LM3000 has approximately the same clock frequency (at 20 Hz it is 2X-4X faster than the Z3); it uses the binary system; it extensively uses Boolean algebra implemented w/ digital circuits as first described by Claude Shannon; etc.

The LM3000 also shares affinities w/ several other early computers. It is built with TTL integrated circuits that were available in the 1970s, and is in many ways the spiritual cousin of early home built hobby computers, such as the Apple I.

Joe says: TTLs were available in the 1960s (late); might name drop the ENIAC (1946).

[edit] How does it relate to modern computers?

The LM3000 is approx. 1/50 millionths as fast as a current lower-end computer, meaning that, all else being equal, a calculation that would take 1 second on a modern computer would take more than a year and a half on our computer. It's data and address buses are 2^-24 as large as those of a 32-bit computer, meaning that where our computer can only send numbers across the data bus as large as 256 (decimal), a modern computer can send numbers much larger then 4 billion.

Joe says: more importantly, it cannot address the billions of bytes of data that a modern computer can. Um, it can only address three.

[edit] The design principals of the LM3000 are relevent today

However, despite all of these differences, our microprocessor uses many concepts still used by modern computers today. It features a RISC (Reduced Instruction Set Computer) architecture, meaning that its instruction set is as simple as possible, featuring no esoteric functions which could be executed as a number of discrete functions, i.e. each instruction takes approx. the same amount of time, or the same number of clock cycles, to execute. It also features a Harvard architecture, meaning that data and instructions are physically separate (the antithesis of a von Neumann architecture), meaning that the microprocessor can be both reading an instruction and reading data from memory at the same time.

Joe says: perhaps mention that RISC is the latest MPU design architecture, everyone is RISC.

[edit] Why/how we built it

We built the LM3000 last term while studying digital logic in Joe Holt's Logic machines class. We had built several components necessary to a microprocessor already, and several students in the class decided to put all the pieces together to form a working microprocessor. Each component of the LM3000 was built as a discretely functioning component of the whole, similar to what von Neumann called "organs", and it's only through the coordinated interaction of each component that the properties necessary to a computer emerge. Each component can also be broken down into a number of constituent parts, i.e. each organ is reducible to a discrete number of simpler functional components, and no component more complex than a simple logic gate is irreducible (and even these are technically reducible to arrangements or transistors).

As a computer is reducible to a number of individually functioning components, and as those organs are then even further reducible to their respective components, an inherent property of computers became clear as we built our microprocessor. A computer is a specialized organization of very simple functional components (which need not be electronic in nature) into more complex modules (or organs), which together can do the work of a computer.

Joe says: good.

[edit] How does it work?

Reid and Angela

  • "A simple machine that operates at ridiculous speeds"
  • "A machine that changes itself"
  • Statistics and parts

[edit] Presentation notes

[show block diagram]

=====Quick Overview=====
This microprocessor uses 16-bit instructions stored in its two RAM chips. It runs through the program with the program counter and branch unit. The instruction decoder takes the instructions and coordinates data movement on the data bus. 8-bit values are stored in the three registers (R0-R2). Math is handled by the Arithmetic Logic Unit (ALU), which is adept at adding and subtracting. The status register watches the ALU output and manages the state of its zero flag.

=====Information Transfer=====
Information in a microprocessor is transferred between units through the concept of a “bus.” A bus is a set a connections to all relevant units and enables the output and input of a given set of units to have access to the same information. Two important buses on our microprocessor are the Data Bus and the Address Bus. On each bus, there is a “contract,” where only one unit puts information onto the data bus, and any relevant unit can receive the information. The information would be unintelligible if more than one unit put information on the bus at the same time.

[Show ALU schematic]
=====Arithmetic Logic Unit=====
Math operations are performed in three steps.

  • 1. Load the first operand into the ALU
  • 2. Load the second operand into the ALU
  • 3. Perform the operation (indicating the destination register).

The ALU grabs any/all eight bit numbers off of the data bus, but only when the instruction decoder tells it to does it load whatever number is on the bus into one of its registers called Registers A and B. Addition is performed through two 4-bit adders. Subtraction is performed by modifying the values using two’s compliment (ask later if interested) and then adding. The result is then held until the instruction decoder tells it to output to the data bus.

=====Registers=====
Registers hold 8-bit values. They can either write to the data bus or read from the data bus. Programs use the registers for temporary value storage. In our program, the registers are used to store values such as the variable, x, and the step size, dx. Registers can also be used as ranges or counters as shown in some of our other programs.

[Show Program Counter and Branch Unit Schematic]
=====Program Counter and Branch Unit=====
The program counter monitors which instruction in the program the microprocessor is on. This number is delivered to the instruction and operand RAM as a RAM address. The program counter is incremented by the clock, or can be set to an instruction address by the branch unit.
Once an instruction is executed, the clock increments the program counter. This is the new address from which the instruction RAM and operand RAM will pull data.
However, when we have branches, the program counter instead loads a address from the data bus. Unconditional branches occur every time they appear. Conditional branches use the flag from the Status Register to determine if the conditions are met.

=====Program Memory=====
The program memory consists of two 8-bit RAM chips.
One is the Instruction RAM, which stores the codes for which parts of the microprocessor are activated at which time. This involves all commands: MOV, ADD, SUB, and BRA commands.
The other is the Operand RAM, which stores any values the program needs to provide known as immediates. This can provide values for the registers to hold, values to be added/subtracted in the ALU, or addresses for the branches to lead to.

=====Status Register=====
The Status Register's job is to check the digits on the data bus after every ALU instruction and flag the branch unit when all 8 digits on the data bus are zero.

[Show Instruction Decoder Schematic]
=====Instruction Decoder=====
The instruction decoder is functionally the same as a de-multiplexer. The instruction decoder makes possible a coherent and organized instruction set with which programmers may use. The instruction decoder orchestrates the operation of the input and output enable of each chip. It was designed around the microprocessor's unique instruction set, which was itself designed in a logical, 1 byte manner.

There are four instruction types:

  • Move to registers
  • Move to ALU
  • Arithmetic functions: add, subtract, compare
  • Branches: unconditional, branch if equal, branch if not equal

The instruction decoder is composed entirely of combinatorial logic which translates the software into hardware instructions.

[edit] Single step run-thru

ALL

[edit] Goals

ALL

[edit] Q&A

ALL

[edit] Pictures

1. Zuse's Z3 (and Z1, Z4, etc.): a.
2. Apple II: Maybe Italian, but I think I'm just going to hold up an Apple II board instead. That wasn't a very informative picture, but it would have been funny.
3.Block Diagram

Personal tools