Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.59 KB

File metadata and controls

51 lines (36 loc) · 1.59 KB

Howto use this project

Build everything

To build everything you can either enter each subfolders and build anything particular part of the project you want or you can use the command make which will build the assembler, the simulator and the netlist corresponding to the microprocessor.

Run a program

To run a program written in our assembly language, you can do the following:

# ./run.sh <file.x>
#
# This example will run the program ./assembler/tests/test_ram.x infinitely
./run.sh ./assembler/tests/test_ram.x

Or, if you want the programm to run only for a given amount of step, you can add an option at the end of the command:

# ./run.sh -n <nb_step> <file.x>
#
# This example will run the program ./assembler/tests/test_ram.x during 11 simulator steps
./run.sh -n 11 ./assembler/tests/test_ram.x

You can also add an option to choose if you want to print the registers at each step or to print a 7-segment formated output to represent a clock (using registers from x0 to x13).

# ./run.sh -n <nb_step> --clk <file.x>
#
# This example will run the program ./assembler/tests/test_7seg.x during 11 simulator steps and output it as a clock
./run.sh -n 11 --clk ./assembler/tests/test_7seg.x

Run the clocks programs

To run the digital clock in real time you can do:

./run.sh --clk ./assembler/tests/clk_real_time.x

For the fast-forward mode, you can do:

./run.sh --clk ./assembler/tests/clk_goes_vroom.x

Notice that the clock takes some time to initialize because of the double dabble algorithm.