SCAB computer

SCAB computer

The SCAB computer is a Reduced Instruction Set Computer (RISC). It has four instructions and does not use any operand which means that only 2 bits per instruction is needed to code all instructions. Although the instruction set and instruction size is small, the language form by its instruction set is Turing complete. The SCAB is an esoteric or academic computer. as many instructions are needed to do simple operation. However, the SCAB has a very simple architecture and the number of transistor to make a SCAB is extremely limited. Therefore, its performance relative to the number of transistor might still be interesting. For example a huge number of SCAB could easily be integrated in a single chip and massive parallelization could make this concept attractive.

Architecture and instruction set

The data address size and program address size can be selected arbitrarily and should be adjusted to the available memory. The size of a word in the data memory is 1 bit. The size of a word in the program memory is 2 bit. The computer could be Harvard or Von Newman architecture depending on the hardware implementation.

The SCAB has two registers in addition to the data address space. The first register is a working register (w) allowing to address the data memory (dm) and the second is a program counter register (pc) allowing to address the program memory (pm).

Data located at the top of the data memory is a mapping of special registers. The top of the data memory contains 2 registers: (wl) is working register literal having the same size as (w) and (pcl) program counter register having the same size as (pc). Additional special register mapped in the data space may be needed to implement additional hardware features such as timer, interrupt, general purpose IO, computed goto, indirect addressing…

The set and clear instructions set and clear respectively the bit in the data memory at location w then increment w and pc. The arm instruction copy wl in the register w, the register wl is cleared and pc is incremented. The branch instruction increment pc if the bit in the data memory at location w is set otherwise the register pcl is copied in pc.

At reset the pc register is reset. Any code is an arbitrary suite of mnemonic S, C, A and B.

Emulator

The SCAB machine can easily be emulated in software. The following C++ code will emulate the SCAB machine.

#define PC_SIZE 12
#define W_SIZE 10

typedef enum {S,C,A,B} Instruction;

int main(){ Instruction pm [1<< PC_SIZE] ={A,A,C,S,C,S,A,C,C,C,C,C,C,C,C,C,C,C,C,A,A,B}; bool dm [1<< W_SIZE] ; unsigned int w,pc=0,i;

for(;;) { pc&=(1<< PC_SIZE)-1; w&=(1<< W_SIZE)-1; switch(pm [pc] ) { case S: dm [w] =true; w++; pc++; break; case C: dm [w] =false; w++; pc++; break; case A: for(i=0,w=0;i< W_SIZE;i++) { if(dm [i] ) w+=1<< i; dm [i] =false; }; pc++; break; case B: if(dm [w] ) pc++; else for(i=0,pc=0;i< PC_SIZE;i++) if(dm [W_SIZE+i] ) pc+=1<< i; }

References

* [http://myspace.voo.be/project/SCAB/ The SCAB computer]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • plant disease — ▪ plant pathology Introduction       an impairment of the normal state of a plant that interrupts or modifies its vital functions.       All species of plants, wild and cultivated alike, are subject to disease. Although each species is… …   Universalium

  • Strike action — Female tailors on strike. New York City, February, 1910 …   Wikipedia

  • Minor characters in Bloom County — The following are minor characters from Berkeley Breathed s comic strip Bloom County. Though significant enough to have appeared multiple times in the strip, they were not crucial to the strip s overall development, and disappeared without much… …   Wikipedia

  • The Wild — Infobox Film name = The Wild |220px caption = New York, Samson, and his friends are going to The Wild to find Ryan, Samson s son starring = Kiefer Sutherland Jim Belushi Greg Cipes Eddie Izzard Janeane Garofalo Richard Kind William Shatner… …   Wikipedia

  • List of Statutory Instruments of the United Kingdom, 1992 — This is a complete list of all 1922 Statutory Instruments published in the United Kingdom in the year 1992. NOTOC 1 100* North Hull Housing Action Trust (Transfer of Property) Order 1992 S.I. 1992/1 * Merchant Shipping (Radio Installations)… …   Wikipedia

  • scar — Fibrous tissue replacing normal tissues destroyed by injury or disease. [G. eschara, scab] cigarette paper scars atrophic scars in the skin at sites of minor lacerations over the knees, shins, and elbows of persons with Ehlers Danlos syndrome.… …   Medical dictionary

  • March to the Stars —   …   Wikipedia

  • Virtual band — A virtual band (also called a virtual group or cartoon band), in music, is any group whose members are not flesh and blood musicians, but animated characters. The music is recorded (and, in the case of concerts, performed) by human musicians and… …   Wikipedia

  • The Adventures of Jimmy Neutron: Boy Genius — Jimmy Neutron redirects here. For other uses, see Jimmy Neutron (disambiguation). The Adventures of Jimmy Neutron: Boy Genius The series second and last title card Gen …   Wikipedia

  • John Romero — Infobox Person name = John Romero image size = 200px birth date = Birth date and age|1967|10|28 birth place = Colorado Springs, Colorado death date = death place = occupation = Video game designer spouse = Raluca Alexandra PleşcaAlfonso John… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”