Digital Systems Design Course: COE 424 Lebanese

Digital Systems Design
Course: COE 424
Lebanese American University
Homework #3
Spring 2015
Problem 1:
While respecting the order implied by the parentheses, implement the following function in VHDL.
g = (A - (B + C)) - (D - ((E + F) - G))
a.
b.
Implement a behavioral design
Implement a structural design after implementing behavioral descriptions of the adder and
subtractor (no resource constraints).
c. Implement a structural design if one adder is available (unlimited subtractors), after
implementing behavioral descriptions of multiplexers and registers.
d. Implement a structural design if one adder and one subtractor are available.
For all structural cases above, assume 2-input arithmetic components only with 20 ms delay for adders,
25 ms delay for subtractors, 10 ms delay for registers, and 15 ms delay for multiplexers – irrespective
of the size of registers and multiplexers.
With the exception of the presence or absence of control signals, all designs must have the same entity
declaration in VHDL. Any select and enable signals can be provided externally; no need to generate
them internally. Submit your paper designs.
Problem 2:
Design a VHDL testbench in order to test all four architecture implementations given in Problem #1
above.
In the testbench, you should have a process which changes the input vector in the following way: each
input (A, B, C, D, E, F, G) can take one of two different values: 2 or 5; thus, the input vectors should
be:
(2, 2, 2, 2, 2, 2, 2), (2, 2, 2, 2, 2, 2, 5), (2, 2, 2, 2, 2, 5, 2), (2, 2, 2, 2, 2, 5, 5), … (5, 5, 5, 5, 5, 5, 5).
Problem 3:
Control generation:
a. Design a behavioral VHDL design of an automated controller producing the control signals of
Problem #1 part (d).
b. Design a structural paper design (no VHDL required!) of an automated controller producing
the control signals of Problem #1 part (d).
Note:
The assignment is to be typed and submitted at class-time. Note that:
1. Hand-written assignments will NOT be accepted.
2. Assignments submitted by email will NOT be accepted.
3. Late assignments will NOT be accepted.
4. Figures can be drawn by hand. Leave the right amount of space in your typed document to draw
your figures.
5. Common work and/or cheating are NOT accepted. All parties involved will receive a zero that
will NOT be dropped when computing the grades at the end of the semester.
Due Date:
Tuesday April 7, 2015.