Docsity

VHDL Code for Sequential Logic Design Exam 1b - Fall 2007, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 4110 - Sequential Logic Design
Exam 1b - Fall 2007
NOTES: Closed book, except one sheet of handwritten notes is allowed. Show ALL your
work for full credit. Please draw and write NEATLY (If I cannot read it, I must mark it
WRONG). Do all work in pencil and put all answers on one side of your engineering
paper, with one problem per page. Double or triple-space your code. Clearly label all
answers with the problem number. Follow all the specified class formats, including
VHDL. 50 points, 30 minutes.
1. [50 pts] Concisely write the minimal-complexity ARCHITECTURE portion of a
VHDL file that has the following ENTITY portion. Within this single architecture:
Implement truth table 1 in the dataflow style with concurrent simple signal
assignment statements.
Implement truth table 2 in the dataflow style with concurrent conditional signal
assignment statements.
Implement output h as the logical XOR of all the f and g bits in the structural
style. Assume that a separate 3-input XOR gate entity, called MyXor3, has
already been created, with 3 input STD_LOGIC bits followed by a STD_LOGIC
output bit in its port list. Do NOT write code for the MyXor3 entity/architecture!
Additional simple assignments may be used wherever necessary. In all truth tables, don’t
cares are indicated as “x”; use them to simplify your code and the final logic circuit. Plan
your VHDL code structure before writing the final version to ensure that it is easily
readable!
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY problem IS
PORT ( a, b : IN STD_LOGIC ;
f, h : BUFFER STD_LOGIC ;
g : BUFFER STD_LOGIC_VECTOR(1 DOWNTO 0) ) ;
END problem ;
Truth Table 1: Truth Table 2:
a b | f a b | g
----|-- ----|---
0 0 | 1 0 x | 01
0 1 | 1 1 0 | 1x
1 0 | 0 1 1 | 00
1 1 | 1

Partial preview of the text

Download VHDL Code for Sequential Logic Design Exam 1b - Fall 2007 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

ECE 4110 - Sequential Logic Design

Exam 1b - Fall 2007

NOTES: Closed book, except one sheet of handwritten notes is allowed. Show ALL your

work for full credit. Please draw and write NEATLY (If I cannot read it, I must mark it

WRONG). Do all work in pencil and put all answers on one side of your engineering

paper, with one problem per page. Double or triple-space your code. Clearly label all

answers with the problem number. Follow all the specified class formats, including

VHDL. 50 points, 30 minutes.

1. [50 pts] Concisely write the minimal-complexity ARCHITECTURE portion of a

VHDL file that has the following ENTITY portion. Within this single architecture:

Implement truth table 1 in the dataflow style with concurrent simple signal

assignment statements.

Implement truth table 2 in the dataflow style with concurrent conditional signal

assignment statements.

Implement output h as the logical XOR of all the f and g bits in the structural

style. Assume that a separate 3-input XOR gate entity, called MyXor3, has

already been created, with 3 input STD_LOGIC bits followed by a STD_LOGIC

output bit in its port list. Do NOT write code for the MyXor3 entity/architecture!

Additional simple assignments may be used wherever necessary. In all truth tables, don’t

cares are indicated as “x”; use them to simplify your code and the final logic circuit. Plan

your VHDL code structure before writing the final version to ensure that it is easily

readable!

LIBRARY ieee; USE ieee.std_logic_1164.ALL; ENTITY problem IS PORT ( a, b : IN STD_LOGIC ; f, h : BUFFER STD_LOGIC ; g : BUFFER STD_LOGIC_VECTOR(1 DOWNTO 0) ) ; END problem ; Truth Table 1: Truth Table 2: a b | f a b | g ----|-- ----|--- 0 0 | 1 0 x | 01 0 1 | 1 1 0 | 1x 1 0 | 0 1 1 | 00 1 1 | 1