LC-3b Assembler and Micro-Architecture Emulator
A C-based simulator for LC-3b assembly programming language
Background
Little Computer 3b, or LC-3b, is a type of computer educational assembly language (low level programming language). It features a relatively simple instruction set, but can be used to write moderately complex assembly programs, and is a theoretically viable target for a C compiler. The language is less complex than x86 assembly but has many features similar to those in more complex languages.
Note
This project involved building an assembler in C for the LC-3b instruction set. Since this is an educational project currently used by many universities around US for teaching computer architecture, I will not release the source code openly which I developed to solve this problem. If you are interested to learn more about this solution from an experienced developer standpoint or just a curious individual, you can let me know. If you are currently a student in any class which uses this, I will not release the source code to you (I will easily find out if you know your concepts well, hence do not contact me with unsolicited requests).
Summary
This project was developed in 4 stages:
Little Computer 3b, or LC-3b, is a type of computer educational assembly language (low level programming language). It features a relatively simple instruction set, but can be used to write moderately complex assembly programs, and is a theoretically viable target for a C compiler. The language is less complex than x86 assembly but has many features similar to those in more complex languages.
Note
This project involved building an assembler in C for the LC-3b instruction set. Since this is an educational project currently used by many universities around US for teaching computer architecture, I will not release the source code openly which I developed to solve this problem. If you are interested to learn more about this solution from an experienced developer standpoint or just a curious individual, you can let me know. If you are currently a student in any class which uses this, I will not release the source code to you (I will easily find out if you know your concepts well, hence do not contact me with unsolicited requests).
Summary
This project was developed in 4 stages:
- An LC-3b Assembler whose job is to translate assembly language source code into the machine language (ISA) of the LC-3b.
- Second part of the simulator takes in as the input a file which is an assembled LC-3b program. The simulator then executes the input LC-3b program, one instruction at a time, modifying the architectural state of the LC-3b after each instruction. The simulator is partitioned into two main sections: the shell and the simulation routines.
- Third part of the simulator is a cycle-level simulator for the LC-3b. The simulator will take two inputs, namely, Afileentitleducode3whichholdsthecontrolstore and AfileentitledisaprogramwhichisanassembledLC-3bprogram. The simulator will execute the input LC-3b program, using the microcode to direct the simulation of the microsequencer, datapath, and memory components of the LC-3b.
- The final part of the simulator involved building a pipelined simulator for the LC-3b instruction set which will execute the program in a parallel/pipelined fashion.