

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A homework assignment for a digital design course focusing on modelsim and verilog. The assignment includes creating a profile document, completing a modelsim tutorial, solving number format problems, implementing a priority encoder using structural verilog, and designing state machines for a counter and parity detector. Students are expected to follow best practices and submit their work to the course website.
Typology: Exercises
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Please Note: To receive full credit, you must use the following best practices in all homework assignments :
Use meaningful names for modules, ports, and wires when possible. Use underscores to break up long binary and hex numbers into groups of 4 digits to make them more readable. Ex: 12’b1001_0011_ Show your work if you wish to receive partial credit. All figures & graphs should include a number and caption (handwritten is OK). When printing waveforms, ensure that the relevant signal transitions are clearly visible. All HDL source must be typed, and at a minimum should be loaded into ModelSim to ensure syntactic correctness. Syntax errors in HDL source will be penalized heavily. Do NOT submit handwritten code. All HDL source developed for any problem must be uploaded to the corresponding Dropbox on the course website by the homework due date.
1. (4pts) Create a DOC file (using MS Word, Open Office, etc.) containing the following:
Your name (and a hint on pronunciation if necessary) A photograph of yourself Your year in school (Junior, Senior, Grad Student, …) Your department/major If you have had experience using Verilog or another HDL in another course or job, briefly mention it.
Save the file as yourname_profile.doc and submit it to the Dropbox on the Learn@UW website. Additionally, complete the exam time survey on the Learn@UW site if you have not already done so.
2. (6pts) Welcome to ModelSim
Complete the ModelSim tutorial posted on the Learn@UW site and fill in the following statement.
I solemnly swear under pain of karmic retribution that I have completed the ModelSim tutorial. If I had any problems, I discussed them with the TA.
__________________________ (sign your name here)_
Also, print out and attach a copy of the wave window (similar to the one shown in Figure 8. of the tutorial) using the directions given in Appendix B.
3. Number Format Refresher (10pts)
Complete the following problems and give your answers in the specified base. For this problem, assume that values are to be treated as signed, and in 2’s complement format. If a bit value is unknown, represent it with an x.
12 ’b1100_1101_
16 ’d +16’hE42A 17 ’h
8 ’b0011_
7 ’d
4. First Structural Verilog (8 pts)
Implement the priority shown in Fig. 1 using only structural Verilog. Load your Verilog source into ModelSim to make sure it compiles without errors. Submit a print-out of your source.
Fig. 1: 4-Input Priority Encoder