DSD Mod5
DSD Mod5
Structural representation
of a “buzzer” circuit
The behavioral level can be further divided into two kinds of
styles: Data flow and Sequential.
The dataflow representation describes how data moves through
the system. This is typically done in terms of data flow between
registers (Register Transfer level). The data flow model makes use
of concurrent statements that are executed in parallel as soon as
data arrives at the input.
sequential statements are executed in the sequence that they are
specified.
VHDL allows both concurrent and sequential signal assignments
that will determine the manner in which they are executed.
Mixed level design consists both behavioral and structural
design in one block diagram.
Basic Structure of a VHDL file
(a) Entity
Each entity is modeled by an entity declaration and an
architecture body.
The entity declaration as the interface to the outside
world that defines the input and output signals.
entity AND3 is
port (in1, in2, in3:in std_logic;
out1:out std_logic);
end AND3;
entity dff_sr is
port (D,CLK,S,R:in std_logic;
Q,Qb: out std_logic);
end dff_sr;
architecture architecture_name of NAME_OF_ENTITY is
-- Declarations
-- components declarations
-- signal declarations
-- constant declarations
-- function declarations
-- procedure declarations
-- type declarations
:
begin
-- Statements
:
end architecture_name;
The types of Architecture are:
(a) The behavioral Model
(b) Structure Model
(c) Mixed Model
Architecture behavioral of BUZZER is
begin
WARNING <= (not DOOR and IGNITION)or (not SBELT and IGNITION);
end behavioral;
The “<=” symbol represents an assignment operator and assigns the value of the
expression on the right to the signal on the left.
Concurrency
The signal assignments in the above examples are concurrent
statements. This implies that the statements are executed when one or
more of the signals on the right hand side change their value (i.e. an
event occurs on one of the signals).
a change of the current value of a signal is called an event.
Digital systems are basically data-driven and an event
which occurs on one signal will lead to an event on another
signal, etc. Hence, the execution of the statements is
determined by the flow of signal values. As a result, the
order in which these statements are given does not matter
Event Scheduling:
The mechanism of delaying the new value is called scheduling an event. In the above
example, assignment to signals S and CO does not happen instantly. The after
(keyword) clause delays the assignment of the new value to S and CO by 3 ns.
end behv2;
The statement WHEN…..ELSE conditions are executed one at a time in sequential
order until the conditions of a statement are met. The first statement that matches the
conditions required assigns the value to the target signal. The target signal for this
example is the local signal Q. Depending on the values of signals S and R, the values
Q,1,0 and Z are assigned to Q.
If more than one statements conditions match, the first statement that matches
does the assign, and the other matching state.
In with …select statement all the alternatives are checked simultaneously to find a
matching pattern. Therefore the with … select must cover all possible values of the
selector
Structural Descriptions
component_label:component_name port map(signal_mapping);
The result of the rem operator has the sign of its first operand while the result of the mod
operators has the sign of the second operand.