Week 5 HW

Noah Smith

1.    In Section 1, don't look at the logic equations provided to you. From the state table, find the logic equations for q1(n+1) and y and draw the sequential circuit for q1(n+1) and y. (10 points)

A diagram of a mathematical equation

Description automatically generated with medium confidence


2. Repeat the work in Section 3. Use two methods, the given one and the behavioral one. Show simulation results. (15 points)

Code and results for the logic expression method.

A computer screen shot of a code

Description automatically generatedA green and black screen

Description automatically generated

Code and results for the behavioural method.

A screenshot of a computer screen

Description automatically generated

A green and black screen

Description automatically generated
3. Similar to the sequence detector in Section 3, change the sequence to be detected to 1011, design the state diagram, draw the truth table, find the logic equations, and design the verilog module and testbench to verify the logic. (15 points)

Here is the hand work for the sequence detector for 1011.

A graph paper with math equations and formulas

Description automatically generated

Code for the sequence detector of 1011, I chose to use the behavioral method to do this as it was easier to troubleshoot than the logic equations. This behavioral method was built directly off the state diagram.

Simulation results of the  sequence detector.

A screenshot of a computer

Description automatically generated


4. Simulate the four types of shift registers in Section 5. (20 points)

Serial in Serial out code and simulation.

A screen shot of a computer program

Description automatically generated

A green graph on a black background

Description automatically generated

Serial in Parallel out code and simulation.

A screen shot of a computer program

Description automatically generated

A screenshot of a computer

Description automatically generated

Parallel in serial out code and simulation

A screen shot of a computer program

Description automatically generated

A screen shot of a computer

Description automatically generated

Parallel in parallel out code and simulation.

A screen shot of a computer program

Description automatically generated

A screenshot of a computer

Description automatically generated

5. Build a counter module and show the simulation results. (20 points)

I chose to implement the up down 4 bit counter with reset functions. Code and simulation below

A green and black screen

Description automatically generated

6. Find the logic equation of the following circuit and implement it in verilog. Show the simulation results. (20 points)

A math equations on a white background

Description automatically generated

A screen shot of a computer program

Description automatically generatedA screenshot of a video game

Description automatically generated