Digital System Design - 0
Digital System Design - 0
Sep. 2014
Note: Some teaching materials are arranged from my past research work. 3
Evaluation
4
Combinational and Sequential
Systems
Combinational system Sequential system
The
put
6
Specification and implementation,
analysis and design
Specification
(function and other
characteristics)
Analysis Design
Implementation 7
Hierarchical implementation
8
Top-down approach Bottom-up approach
Levels of an implementation:
Module, Logical, Physical
Logical (gate and For example: Compute
t
flip-flop) level
Modules level Z( t ) = ∑ X ( i )
i =0
At Modules level:
The system consists of
two registers and an adder.
At Logical level:
These modules are
Implemented with gates and
Flip-flops.
At Physical level:
These component are
transistors and power supplies.
Physical level
9
VHDL-based description of a
system
Use work.ALL;
Entity sample_system IS
PORT (xin: IN BIT_VECTOR;
z : OUT BIT_VECTOR;
clk : IN BIT);
END sample_system;
Avalon™ Bus
an embedded processor IP (Intellectual
On-Chip
Property) and an application IP into a ROM Timer
Your Design
Application
IP Here
FPGA
11
Hardware/Software co-design
The requirement for high sampling
frequency control (~10kHz, or ~MHz) but
fixed computation is designed by hardware.
The requirement for flexible processing and
low computation power (under 1kHz) is
designed by software.
12
ModelSim/Simulink Co-simulation using
EDA Simulator Link
• A co-simulation work by Electronic Design Automation (EDA) Simulator
Link has been gradually applied to verify the effectiveness of the Verilog
and VHDL code in the digital system.
• EDA Simulator Link lets you use MATLAB code and Simulink models as a
test bench that generates stimulus for an HDL simulation and analyzes the
simulation’s response.
13
ModelSim/Simulink co-simulation
for cosine
14
Hardware implementation of Sin/Cos
function
GEN : block
begin FSM for computing the cosine function
process (CLK)
begin
if CLK'event and CLK='1' then θ (15..7)
step<=step+1; LUT
mult_r1(46..23)
if step=0 then (cos)
sin_addr <= sita(15 downto 7); x
cos_addr <= sita(15 downto 7); ∆θ (6..0) LUT
Cos_16=
addr1(23..8)
dsin_addr <= sita(6 downto 0); (dcos)
dcos_addr <= sita(6 downto 0);
+
elsif step=2 then LUT
(sin)
-
mult_a1 <= cos_sita;
mult_b1 <= dcos_sita;
x
LUT mult_r2(46..23)
mult_a2 <= sin_sita;
(dsin)
mult_b2 <= dsin_sita;
elsif step=3 then
adda1 <= mult_r1(46 downto 23); s0 s1 s2 s3 s4
addb1 <= -mult_r2(46 downto 23);
elsif step=4 then
cos_16 <= addr1(23 downto 8);
step <= x"00"; cos(θ + ∆θ ) = cos(θ ) cos(∆θ ) − sin(θ ) sin( ∆θ )
end IF;
end IF;
end process; Four LUTs are built.
end block GEN;
15