COMBINATIONAL DESIGN
TOPICS
Dataflow Style Behavioral Style
Lookup tables
OPERATORS
VHDL operators listed from higher to lower
precedence
Miscellaneous ** abs not
Multiplying * / mod rem
Sign + -
Adding + - &
Shift sll srl sla sra rol ror
Relational = /= < <= > >=
Logical and or nand nor xor xnor
LOGICAL OPERATORS
A B not A A and B A nand B A or B A nor B A xor B A xnor B
0 0 1 0 1 0 1 0 1
0 1 1 0 1 1 0 1 0
1 0 0 0 1 1 0 1 0
1 1 0 1 0 1 0 0 1
entity mux4to1 is
Port ( I : in STD_LOGIC_VECTOR
(3 downto 0);
S : in STD_LOGIC_VECTOR
(1 downto 0);
nE : in STD_LOGIC;
Y : out STD_LOGIC);
end mux4to1;
EXAMPLE: 4-TO-1 MULTIPLEXER
Concurrent signal assignment using Boolean
expression:
I3 I2 I1 I0 A1 A0
X X X 1 0 0
X X 1 0 0 1
X 1 0 0 1 0
1 0 0 0 1 1
EXAMPLE: PRIORITY ENCODER
entity PEncoder is
Port ( I : in STD_LOGIC_VECTOR (3 downto 0);
A : out STD_LOGIC_VECTOR (1 downto 0));
end PEncoder;
decoder3to8
A(3)
G1 D(8)
nG2A
nG2B
SEATWORK 3-1
2. Given the entity diagram, create a dataflow
VHDL description of a 8-input priority encoder.
Use conditional signal assignment with don’t care
conditions and std_match function. (Note: Follow
the truth table of the 74LS148 for the behavior of
the system).
PEncoder
nI(8) nGS
nE A(3)
nEO
LOOKUP TABLE
A simple way to describe a combinational system
For single output systems, use a constant vector