You are on page 1of 35

1

Introduction

Dr. Hadeer A. Hosny


First term
2022-2023
2 Instructor Information
Instructor Information
 Dr. Hadeer A. Hassan
 E-mail: hadeer_ahmed123@yahoo.com
TA Information
 Eng. Ibrahim
 Eng. Silvana
Course Information
 Name: Embedded systems
 Lecture Hrs. : 2 Hrs/week,
 Tutorial/ Practical: 2 Hrs/week
3 Course Assessment
 Grading:
 Attendance
 Quizzes
 Assignments
 Midterm Exam
 Final Exam
4 Points to be covered:
 What is an embedded system?
 Different components of embedded systems.
 Abstract and Hierarchy concept of hardware design.
 Levels of design description.
 Sequential versus Structure design.
 Register Transfer Level
 CAD versus MPs
 HDL
 Verilog versus VHDL
 Design flow
 Hardware implementation
 FPGA
 Outline of course content.
What is an embedded system?
5

 The basic definition of an electronic embedded system is a system


that contains a combination of hardware and software.

 Hardware includes the processing unit (microcontroller or


microprocessor), inputs, and outputs.

 The software which is loaded onto a microcontroller is a set of


instructions that govern how the system runs.

 An embedded system is designed for a specific function or functions


of a self-contained system or part of a larger subset of systems.
Why we study embedded
6
system?
Examples of embedded systems
7
Different components of an
Embedded System
8

An Embedded system consists of Hardware and Software.


Hardware:
 Power Supply
 The power supply supplies the entire system with electricity which is
needed for all parts of the embedded system to operate.
 The voltage requirements of the embedded system all depend on the
voltage specifications of the devices being used.

 Processor
 The processor (either a Microcontroller or Microprocessor) is a vital part of
an embedded system.
 It gets programmed with all instructions on how the embedded system
should operate.
 It has the job of communicating with other components of the system and
controlling the flow of data.
Different components of an
9
Embedded System
An Embedded system consists of Hardware and Software.
Hardware:
 Memory
 Memory is needed to store the program code (set of instructions that
determines how the embedded system functions), and data like variables and
constants.
 Microcontrollers have the advantage of having memory in-built on their chips.

 Timer/Counters
 Timers and counters are needed when you need to generate a delay, count
time between two specific events

 Input and Outputs


 Inputs provide information to the embedded system from the external world.
 This can be in the form of a button press, or sensors sensing changes in
temperature.
 Outputs allow the embedded system to display information via LED screens or
rotate a motor like in a car.
Different components of an
10
Embedded System
An Embedded system consists of Hardware and Software.
Hardware:
 Communication
 In order to talk with other devices in an embedded system, it will
require some means of communication.
 Below are some of the communication methods available:
• UART (Universal Asynchronous Receiver and Transmitter)
• USB (Universal Serial Bus)
• ETHERNET
Different components of an
11
Embedded System
An Embedded system consists of Hardware and Software.
Software:
 Software is a set of instructions (program code) that can be written in a
programming language.
 Programming languages can range from Assembly, C and Python.
 But, the programming language is only one part of the Software
component.

 Other components include:


 Integrated Development Environment (IDE): is a software where the
developer can write code in a specific language.
 Compiler: converts the code that has been written in an IDE into
machine code which is then loaded onto the microcontroller
Embedded System Design

FPGAs
Schematic capture
Hardware Description Languages (HDLs)
VHDL
Verilog
Microprocessors and Microcontrollers
Programming languages
Assembly language
C, C++, Python
Abstract and Hierarchy
concept of hardware design
 Any digital system to be designed must be divided into a
number of small parts and each part is divided into a number of
smaller parts this is known as “Abstract and Hierarchy concept of
design ”.

Logic transistors
Adders
gates
CPU
Logic
gates transistors
Adders
and
registers
Levels of design description

Algorithmic level
Levels supported by Level of description
Register Transfer Level
HDL (VHDL) most suitable for synthesis
Logic (gate) level

Circuit (transistor) level Levels supported by


Level supported by Commercial & Custom
Physical (layout) level Analog Circuit simulators
Layout Simulator
like Proteus
like Magic: layout editor
Sequential versus Structure
design

 Structure design : means the each hardware component give


its output to next one and so on without feedback.

 Sequential design: means there is feedback in hardware


design and needed in our practical life.
Register Transfer Level
(RTL)
 In digital circuit design, register-transfer level (RTL) is a design
abstraction which models a synchronous digital circuit in terms
of the flow of digital signals (data) between hardware registers,
and the logical operations performed on those signals.
 A synchronous circuit consists of two kinds of elements:
 Registers (Sequential logic) : synchronize the circuit's
operation to the edges of the clock signal, and are the only
elements in the circuit that have memory properties.
 Combinational logic: performs all the logical functions in the
circuit and it typically consists of logic gates.
Register Transfer Level
(RTL)
 For example, a very simple synchronous circuit is shown in the
figure. The inverter is connected from the output, Q, of a register
to the register's input, D, to create a circuit that changes its state
on each rising edge of the clock, clk. In this circuit, the
combinational logic consists of the inverter.

 The RTL focuses on describing the flow of signals between


registers.
 Register-transfer-level abstraction is used in hardware
description languages (HDLs) like Verilog and VHDL to create
high-level representations of a circuit.
Register Transfer Level
(RTL)

RTL

Control unit: DataPath:


To control the sequence of Include the hardware part
executing hardware more needed to be executed
than one time sequential
CAD (Computer Aided Design)

RTL: is complex and hard


in case of designing a
complex system.

Solution

Computer help us in deign hardware circuits


(CAD)
by describing to computer what I need to
design and he is responsible for determining
data path and control unit
CAD versus MPs

 CAD: learn how to design the hardware circuits in a professional


way using VHDL language.

 Microprocessor : contains a number of general registers and ALU


which act as the DataPath part of the RTL.
 Also, contains a control unit which performs the fetch and execute cycle
and contains PC register and ROM .
 ROM we write in it programs (software) with programming language
Assembly, C, and others to perform a specific task.
Proteus

 The Proteus Design Suite is a software tool suite used primarily


for electronic design automation.

 The software is used mainly by electronic design engineers


and technicians to create schematics and electronic prints
for manufacturing printed circuit boards (PCB) printed circuit
board.

 Proteus is used to design a circuit and generate the PCB for


implementation.
HDL

 HDL (High Definition Language): is language used to describe


the hardware to computer and used to make :
 1) Verification: to be sure the hardware work correct.
 2) Implementation: generate file after verification to be
implemented on FPGA.
 Model and document digital systems
 Hierarchical models
 System, RTL (Register Transfer Level), gates

 Different levels of abstraction


 Behavior, structure

 Verify circuit/system design via simulation


HDL

• VHDL = VHSIC Hardware


Description Language
• Verilog – created in 1984
(VHSIC = Very High Speed
by Philip Moorby of
Integrated Circuits)
Gateway Design
Automation.
• Developed 1983 – based
on ADA
• Based on the C language
• Based on the ADA
language
24
Design Flow

Steps for hardware design:


1. Describe hardware with VHDL
2. Syntax check
3.Functional verification
4. Generate file to run on FPGA (implementation )
Hardware implementation

FPGA ASIC PCB

Field Application
Programmable Use Proteus
Specific
Gate Array. software to
Integrated Circuit
Is a generate PCB
Used in
programmable then implement it
manufacturing of
hardware using printed
ICs
board and
commercial
components

Use output file from HDL in fabrication


Embedded System Design

Microprocessor FPGA

ASIC
FPGA
Goal: We will learn FPGA to be able to design entire
embedded system as a single FPGA.
Use VHDL to design all hardware including the MPU.
FPGA

Configurable Logic Blocks


CLB
Block RAMs

Block RAMs
I/O Blocks

Block RAMs

Programmable Connection
Switches
Xilinx Spartan 3E

Slice
Configurable logic block (CLB)
Logic Cell (LC)
16-bit SR
Slice Slice
16x1 RAM

CLB CLB Logic cell Logic cell 4-input


LUT

Logic cell Logic cell


LUT MUX REG

Logic Cell (LC)


Slice Slice 16-bit SR
16x1 RAM
CLB CLB Logic cell Logic cell 4-input
LUT

Logic cell Logic cell


LUT MUX REG
Look Up Tables
 Combinatorial Logic is stored in 16x1 SRAM Look Up
Tables (LUTs) in a CLB Look Up Table
 Example: 4-bit address
Combinatorial Logic
A B C D Z
A (24 )
0 0 0 0 0
B
Z 0 0 0 1 0 2
C
D
0 0 1 0 0 = 64K
0 0 1 1 1
0 1 0 0 1
 Capacity is limited by number of 0 1 0 1 1
inputs, not complexity . . .
 Choose to use each function 1 1 0 0 0
generator as 4 input logic (LUT) or 1 1 0 1 0
as RAM 1 1 1 0 0
WE 1 1 1 1 1
G4
G3 G
G2 Func.
Gen.
G1
Potential Advantages

 Minimize overall system cost


 Minimize development time
 Minimize per unit cost
 Implement only the hardware and software needed for a
particular design
34
Outline of course
 Contents going to be covered during the course:
 Introduction to embedded systems, FPGA, and HDL
 VHDL basics
 VHDL for Combinational circuits
 VHDL for Sequential circuits
 AVR family and architecture.
 Learning embedded C of AVR microcontroller.
 AVR I/O
 AVR timer and counter.
 AVR communication peripherals
35

You might also like