Sorting Visualizer in RARS RISC-V

About the Project

This project offers an engaging and educational experience for those interested in understanding the mechanics of the insertion sort algorithm, a fundamental sorting technique with a complexity of O(n^2). At its core, the project uses RARS RISC-V Assembly programming and GLIR to provide a visual representation of the sorting process. The visualization vividly displays the sorting of an array in ascending order, making it an excellent tool for educational purposes.

For a deeper exploration, you're invited to clone the repository and explore the "webpage" folder, where the complete functionality of the lab, including detailed explanations and interactive elements, is available through an HTML interface.

Features

Running the App/Program

Clone the Repository: Begin by cloning the repository to your local machine.

Navigate to the 'Code' Folder: Once cloned, access the "code" folder within the repository.

Running the Program: Windows: Open Git Bash and execute java -jar rars1_6.jar visualizer.s. Mac: Open Terminal and run rars1_6 visualizer.s.

Customizing the Array: To alter the array being sorted, edit the .data section in visualizer.s, setting the array and its length as desired.

Modifying the Sorting Speed: Slow down the sorting process by editing the visualizer function in visualizer.s. Add a sleep ecall before every call to the draw function. An example of the sleep ecall is provided in the function.

Tools/Methods Used

GitHub Repository: Private (Available upon request)