Lisp Processor chip architecture
The basic architecture of Tamarin is based on an internal register file supplying data to the execution unit which then stores it. Additionally there additional functional units which buffer words to and from external memory, maintains the PC, obtains the instruction data, etc. The machine is controlled by horizontal microcode which is 120 bits wide. This controls each of the functional units.
Conventions
Clocking
Naming
Software principles
Byte codes
Tagged pointers
Functional Block Diagram
Register File
The register file is organizedas a collection of frames. Each frame is intended to store the information associated with a single function call. The word size is 34 bits. There are 4 to 8 frames with 40 words in each. Additionally, there is one frame of 10 words that stores global (non-stack related) information, such as the stack frame free list, etc.
The register file is given to address: the word within a frame and the frame number. Both the read and write addresses are presented over the wires. The read address is presented during nClock and the decoded address is latched on the upgoing edge of Clock. The write address is presented during Clock and is latched on the upgoing edge of nClock.
The register file returns two words: the word at the presented address and the word at address minus 1. This is done because the instruction set is stack based and most opcodes operate on the two top of stack words. Some opcodes need other words in the frame. However, those opcodes only need one word.
There are control signals which control which word or words get gated onto the D1 and/or D2 buses. The RD1addr microcode field controls which source gates onto D1. If it is zero, then the register file is gated onto D1. The same holds for D2 using the RD2addr microcode field. The addressed register location is normally placed onto D1 and the previous location is placed onto D2. If the DSwap microcode field is set, then the previous location is placed onto D1 and the addressed location is placed onto D2.
The R bus provides the data to be written into the register file at the end of the cycle. If the Waddr microcode field is non-zero and WriteOK control signal is true, then the R buss is written into the register file. This writing happens during Phi3 (nClcok&nClock2). If the WriteOctal microcode field is turned on, then eight consecutive locations are written. The low 3 bits of the word address must be zero. This is primarily used to initialize the Variable section of a frame during a function call.
Execution Units
The executions units perform various poerations on the data on the D1 and D2 buses and write the result to the R bus. These units are purely combinatorial logic and have no registers nor store any state. The units are an adder, logical unit, shifter, priority encoder, and a Tag shifter. The operation to be performed is selected by the EUop field of the microcode. The top three bits select the unit and the lower four bits select the specific operation. The EU condition code is returned from the adder.
The adder performs additions and subtractions on the data on the D1 and D2 buses. It also takes the EUCc microcode field to select which condition is placed on the EU Condition Result wire. The choices are Overflow, Carry, Zero result, or T.
The Logical unit performs any of the 16 possible logical operations on 2 inputs - D1 and D2. These operations include AND, OR, XOR, NAND, NOR, etc.
The Shifter takes a 64 bit input by concatenating the D1 and D2 data and left shifts that word to form a 32 bit result. The shift distance is the value of the MuxBus. Given that D1 and D2 can be set to zero or to the same value, a variety of shift types are possible.
The Priority Encoder takes the value on D1 and determines the number of zero bits before the first one bit. The result is placed on the R Bus.
The Tag shift unit is used to set and get the tag field of a pointer.
Special Registers
The Special register unit is another way to place data onto the D1 or D2 bus without using the register file. For example, the Register file can be used for D1 and a constant from Special Registers used for D2. It can place on D1 and D2 particular constants, the value of Temp Reg, or the value on MuxBus. A single temporary register is contained in this unit. When the RD2addr microcode field so indicates, the temporary register is written with the data on the R bus. This is written during Phi3 if the WriteOk clock field is on.
The value to be placed on D1 is selected by RD1addr. If the most significant bit is on, then this unit places a value on D1. The low-order bits select which value. For D1, the choice is MuxBus, Temp reg, or 2 constants. The 2 constants are determined by Lisp code. D2 is similiar with 6 constants to choose from.
DPCc
The Condition Code unit looks at the value on the D1 and D2 buses. It checks for a particular condition such as D1=0 or D2's Tag is integer, etc. The condition to be used is selected by DpCC micorcode field. The condition to be checked are hard coded in the chip by the Lisp configuration file. Each condition is made up of one or more conditions on D1 and D2. Each bit position can be a D1=zero, one, or Don't care, D2=zero, one, don't care, or D1=D2. The condition of each bit is anded together to form one row. One or more rows are connected to form the ultimate result which is placed on DpConditionResult.
Instruction Buffer and PC
The instruction buffer prefetches words of Lisp byte code and presents it to the rest of the machine for execution. It output three forms of data: newOpcode, newIBufN, and IBufData. NewOpcode is the next opcode to be executed. It is at the location that the Program COunter points at. The following byte is presented as
Memory Buffer, TLB
UCode Rom
General Control
Memory Control
Register Multiplexor