1
ECE 508: WKSP: Verilog Workshop
Lecture 5: My Solution to Homework #1
Behavioral Level Modeling (cont’d)
Questions about Homework #2
Finite State Machines in Verilog
Roy Kravitz
Electrical and Computer Engineering
Maseeh College of Engineering and Computer Science
ECE 508 WKSP: Verilog Workshop
Homework #1 Solution
Project Assignment:
..\misc\hw1.pdf
Solution:
..\examples\bcd_adder_solution.docx
Results:
..\examples\BCD adder results.txt

** Subscribe** to view the full document.

2
ECE 508 WKSP: Verilog Workshop
Design Task:
Implement a 4-bit BCD Adder
4-bit Adder
Detect
sum > 9
4-bit Adder
Multiplexer
C
out
(Adder 1)
Adjust
X
Y
Generate C
out
C
out
SUM
C
in
6
0
Logic Equations:
·
Adjust = C
out
(Adder 1) | (Sum(Adder 1) > 9)
·
C
out
= C
out
(Adder 1) | Cout (Adder 2)
Adder 1
Adder 2
ci
a
b
s
Co
4-bit Ripple Carry Adder
1-bit Full Adder
4-bit BCD Adder
2:1 Mux
ECE 508 WKSP: Verilog Workshop
Combinatorial Design in Behavioral Verilog