












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













Fall 2006
Fall 2006
Fall 2006
Levels of Description of a Digital System
ArchitecturalFunctional/BehavioralRegister TransferLogic Circuit
models programmer's view at ahigh level; written in your favoriteprogramming languagemore detailed model, like theblock diagram viewmodel is in terms of datapath FUs,registers, busses; register xferoperations are clock phaseaccuratemodel is in terms of logic gates;delay information can be specifiedfor gates; digital waveformsmodel is in terms of circuits(electrical behavior); accurateanalog waveforms
LessAbstractMoreAccurateSlowerSimulation
Special languages + simulation systems for describing the inherent
parallel activity in hardware (VHDL and verilog) Schematic capture + logic simulation package like
LogicWorks
Fall 2006
Why Simulate First? ^ Physical breadboarding
z^ discrete components/lower scale integration precedesactual construction of the prototype z^ verification of the initial design
z^ high level constructs means faster to design and test z^ can play “what if” more easily z^ limited performance (can’t usually simulate all possibleinput transitions) and accuracy (can’t usually modelwiring delays accurately), however
Fall 2006
Entity Interface ^ Externally visible characteristics
z^ Ports: channels of communication
-^ (inputs, outputs, clocks, control) z^ Generic parameters: define class of components -^ (timing characteristics, size, fan-out) entity
name_of_component
is
port(a,b:
in
std_logic; y: out
std_logic);
end
name_of_component;
Fall 2006
Architecture Body ^ Internal behavior or structure of circuit z^ Declaration of module’s internal signals z^ Description of behavior of circuit
-^ concurrent behavioral description - collection of ConcurrentSignal Assignment (CSA) statements executed concurrently -^ process behavioral description - CSAs and variableassignment statements within a process description -^ structural description - system described in terms of theinterconnections of its components architecture
behavioral
of
name_of_component
is
signal
s1,s2:
std_logic;
begin
description
of
behavior
of
ports
and
signals;
end
behavioral;
Fall 2006
Things to Notice ^ <= indicates a Concurrent Signal Assignment (CSA)
z^ like “real” logic, nor_nor “process” is in an infinite loop
z^ they change when ever the inputs (a, b, or c) change z^ std_logic conforms to the IEEE 1164 standard
-^
library
use
IEEE.std_logic_1164.all; entity
nor_nor_logic
is
Fall 2006
Modeling Delays ^ Can model temporal, as well as functional behavior,with delays in CSAs
z^ t0 changes 1 ns after a or b changes entity
nor_nor_logic
is
port
(a,b,c:
in
std_logic;
y:
out
std_logic);
end
nor_nor_logic; architecture
concurrent_behavior
of
nor_nor_logic
is
signal
t0:
std_logic;
begin
t
(a
nor
b)
after
ns;
y^
(t
nor
c)
after
ns;
end
concurrent_behavior;
Fall 2006
Entity-Architecture Features ^ Entity defines externally visible characteristics
z^ Ports: channels of communication
-^ signal names for inputs, outputs, clocks, control z^ Generic parameters: define class of components -^ timing characteristics, size (fan-in), fan-out
z^ Declaration of internal signals z^ Description of behavior
-^ concurrent behavioral description: collection of ConcurrentSignal Assignment (CSA) statements (indicated by <=)executed concurrently; can also model temporal behaviorwith the delay annotation -^ process behavioral description: CSAs and variableassignment statements within a process description -^ structural description: system described in terms of theinterconnections of its components
Fall 2006
New Object: Signals ^ Digital systems are about signals, not variables^ signal
value
expressions
after
time
expression
z^ signals are analogous to wires and change when ever theirinputs change - time-value pairs resulting in a waveform z^ std_logic conforms to the 9-value IEEE 1164 standard forsignals
-^
When a signal has multiple drivers(e.g., a bus), the value of the resultingsignal is determined by a resolutionfunction
for std_logic
and
std_logic_vector
the
resolution function (lookuptable) is provided by std_logic_
package
Fall 2006
Constant Objects ^ Constant parameters provide default values
z^ may be overridden on each instance z^ attach value to symbol as attribute entity
nor_nor_logic
is
port(a,b,c:
in
std_logic;
y:
out
std_logic);
end
nor_nor_logic; architecture
concurrent_behavior
of
nor_nor_logic
is signal
t0:
std_logic;
constant
gate_delay:
Time
ns;
begin
t
(a
nor
b)
after
gate_delay;
y^
(t
nor
c)
after
gate_delay;
end
concurrent_behavior;
Fall 2006
Bit-Vector Data Types ^ Std_logic_vector (31 downto 0) is equivalent to a32-bit bus
z^ Can convert it to a 32 bit integer entity
nand
is
port(a,b:
in
std_logic_vector
downto
y: out
std_logic_vector
downto
end
nand32; architecture
concurrent_behavior
of
nand
is
begin
y^
a nand
b;
end
concurrent_behavior;
331 W05.
Fall 2006
Selected Signal Assignment Statement
z^ all choices are evaluated, but only one must be true entity reg_file
is
port(addr1,addr2:
in
std_logic_vector (
downto
0);
dout1,
dout2:
out
std_logic_vector
(31 downto
0));
end
reg_file; architecture behavior
of
reg_file
is
signal
reg0:
std_logic_vector
(
downto
:=
to_stdlogicvector
(x”00000000”);
signal
reg1,reg2:
std_logic_vector
(
downto
:=
to_stdlogicvector
(x”ffffffff”);
beginwith
addr
select dout
<=
reg
after
5
ns^
when
“00”,
<=^
reg
after
5
ns^
when
“01”,
<=^
reg
after
5
ns^
when
others;
with
addr
select dout
<=
reg
after
5
ns^
when
“00”,
<=^
reg
after
5
ns^
when
“01”,
<=^
reg
after
5
ns^
when
others;
end
behavior;
Fall 2006
Summary ^ Introduction to VHDL
-^ entity = symbol, architecture ~ schematic, signals =wires
-^ can be specified using CSAs -^ can be specified using one or more processes andsequential statements
-^ behavioral models of each component must be provided