Bhanupal22600/RISC-V-Assembler-and-Simulator
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
////------------------------ FOR Students-----------------------//// // 1. we have simple and hard tests both at the assembler level and simulator level. 2. The tests for assembler and simulator are independent. 3. Assembler test content is within "tests/assembly/". The folder simpleBin, hardBin, errorGen contains the files for input assembly code. The folder bin_s contains the exact machine code file corresponding to the tests inside simpleBin. Similarly for bin_h. The folder user_bin_s, user_bin_h contains the machine code created by student's Assembler for simpleBin, hardBin respectivly. 4. Simulator test content is within "tests/bin/", tests/traces/". The folder "tests/traces/" contains correct expected simulator traces. The folder "tests/bin/" contains simultor traces generated by student's simulator. 5. Please make sure that the Assembly code file and the corresponding binary code file should have the same name for the evaluation framework to work. Current project 2024 1. Assembler => 10 simple test (0.1 x 10), 5 hard test (0.2 x 5) 2. Simulator => 5 simple test (0.4 x 5), 5 hard test (0.8 x 5) Utilization steps (for students) This framework is for python users only. Assembler must take a assembly code file as input and produce a machine code file as output. All input and output files need to be stroed with ".txt" extensions. Format $python3 Assembler.py input_assembly_code_file_path output_machine_code_file_path 1. Rename your assembler code file as "Assembler.py" 2. Place this file inside the already created SimpleAssembler folder. For linux users: $python3 src/main.py --no-sim --linux For windows user: >python3 src\main.py --no-sim --windows Simulator must take a machine code file as input and produce a trace file as output. All input and output files need to be stored with ".txt" extentions. Format $python3 Simulator.py input_machine_code_file_path output_trace_file_path 1. Rename your simulator code file as "Simulator.py" 2. Place this file inside the already created SimpleSimulator folder. For linux users: $python3 src/main.py --no-asm --linux For windows user: >python src\main.py --no-asm --windows // ////------------------------ FOR Students-----------------------//// ////------------------------ FOR TAs-----------------------//// // 1. Design the Assembly code(the program should end with halt) and store in automatedTesting/tests/assembly/simpleBin/ 2. Run the framework to evaluate the assembler with the below steps. (a) Jump inside the automatedTesting directory. The flag --linux for linux users and --windows for window users (b) $python3 src/main.py --no-sim --linux 3. The assembly code in binary format is generated inside the directory automatedTesting/tests/assembly/user_bin_s 4. Copy all these files and store in the directory automatedTesting/tests/bin/simple/ 5. Run the framework to evluate the simulator with the below steps. (a) Jump inside the automatedTesting directory. The flag --linux for linux users and --windows for window users (b) $python3 src/main.py --no-asm --linux 6. The traces will be generated in the directory automatedTesting/tests/user_traces/simple/ 7. Now open your assembly code form the directory automatedTesting/tests/assembly/simpleBin, and traces from automatedTesting/tests/user_traces/simple/ Mathe the reqadable trace as per the designed assembly code. // ////------------------------ FOR TAs-----------------------////