An interactive testbench runner for HDL. Uses ModelSim under the hood. Integrates with Canvas assignments for easy grading.
Install ModelSim via this link
The tool will verify ModelSim is installed and an appropriate version on startup.
You can download Python from this link.
You can verify Python is working properly by running python -V
in a terminal window. It should print something similar to:
$ python -V
Python 3.10.1
Note: DD_Grader has been tested with Python 3.10.1 and is not guaranteed to work on other versions.
There are two ways to download the tool. For those who only plan to use the tool (and will not contribute), follow option 1. For those interested in contributing, follow option 2.
There are two methods to select students to grade: By section number, or via a list of names.
On the Canvas Assignment page, press "Download submissions".
This will collect all student submissions and download them in one file titled submissions.zip
.
Copy submissions.zip
into the project directory, or specify the zip archive path in the CLI args via --submissions <path>
.
grader.py
To run the testbenches for Lab 1 with all default values (a "submissions.zip" folder and a "students.txt" file in the project root directory), run the following command:
python grader.py --lab 1
If you want to use a section, you must provide the --section
flag:
python grader.py --lab 1 --section 12345
Be sure to supply values for --submissions
, --student-list
, or --all-students-file
if they do not use the default file name.
submissions.zip
pathTo specify a path for the submissions.zip file, use --submissions <path>
.
This can be useful if you want to maintain multiple labs' worth of submissions. You can rename the file to submissions_lab2.zip
for example, and specify this name in the CLI args.
After running a command to start the grader, the program will print the students it was able to find in the submissions.zip
file.
Then, ModelSim will begin running, and a prompt will appear:
----------------------------------------
(1/9) Student name
- Press return to move to next student
- Press r to rerun simulation
- Press g to rerun simulation in the ModelSim GUI
- Press n to skip this student
- Press q to quit
----------------------------------------
> <type your response here>
Pressing return will either run the simulation for the first time, or move to the next student.
If multiple testbenches are used to grade a particular lab, the simulator will ask the user to press Enter
to continue on to the next testbench.