0% found this document useful (0 votes)
21 views29 pages

1 Introduction

Uploaded by

aho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views29 pages

1 Introduction

Uploaded by

aho
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING

DIGITAL DESIGN
Dr. Alper SARIKAN
Spring 2023
OUTLINE

○ Introduction
○ History of VHDL
○ History of Verilog
○ VHDL or Verilog
○ Digital Design Flow
○ FPGA or ASIC
○ FPGA or Microcontroller
○ FPGA Internal Structure
○ Number Systems
○ Boolean Algebra

Introduction 2
INTRODUCTION

○ Hardware Description Language (HDL) is text based


expression to
● Model
● Analyze
● Design
○ Text based  Any text editor can be used.
○ Currently, two HDLs are mainly used to model digital systems
● VHDL
○ VHDL stands for “VHSIC Hardware Description Language”, where VHSIC
stands for “Very High Speed Integrated Circuit”.
● Verilog

Introduction 3
HISTORY OF VHDL

○ The development of VHDL was initiated in 1981 by the United States


Department of Defense to address the hardware life cycle crisis, when
various components making up a system were individually verified using a
wide range of different and incompatible simulation languages and tools.
○ VHDL-87: DoD gives all the rights to IEEE to encourage industry
acceptance. IEEE reviewed the language and released the standard in
1987
○ VHDL-93: IEEE 1164 supports 9 logic levels. Therefore, IEEE released
VHDL-93 standard to support IEEE 1164 and add some extra features,
such as support of xnor.
○ VHDL 2000: Added protected types in VHDL. The rest is similar to VHDL
1993
○ VHDL 2002: Similar to VHDL 2000 except few additions.
○ VHDL 2008: Add support for synthesizable fixed-point and floating-point
numbers

Introduction 4
HISTORY OF VERILOG

○ 1983/1984: Verilog was invented at Automated Integrated Design


Systems (renamed to Gateway Design Automation in 1985).
○ 1990: Gateway was bought by Cadence Design Systems
○ 1991: Cadence organized OVI (Open Verilog International)
○ 1995: Cadence decided to make the language available for
standardization. IEEE standardized it as Verilog-95 using OVI
documents. Meanwhile Cadence initiated the creation of Verilog-A
to model analog circuits.
○ 2001: Extensions to Verilog-95 was added and released as Verilog
2001 standard. Verilog 2001 standard is a significant upgrade from
Verilog-95. It adds support for signed nets and built-in operators
○ 2005: Verilog 2005 has minor corrections and spec clarifications.

Introduction 5
VHDL OR VERILOG

○ “VHDL or Verilog” is the first important question if you want


to start to use Hardware Description Language.

○ VHDL ○ Verilog
● Similar to ADA ● Similar to C
● I/O and Operation in ● I/O and Operation in the
different blocks same block
● Allow new types ● Does not allow new types
● Package, Library concepts ● No Library concept for
for complex system design complex system design
● Switch models are not ● Switch models are available
supported by default for low level modeling

Introduction 6
VHDL OR VERILOG

○ Gate Level: Operations are


modeled with Logic Gates
○ Logic Level: The relationship
between input and outputs are
defined with Boolean equations
○ RTL (Register Transfer Logic):
The system is modeled as data
transfer between registers
○ Algorithm: The response of the
system to inputs
○ System: The operation of whole
system is modeled
○ Verilog is preferred due to its similarity to C.
○ Experienced designers prefer VHDL due to the library and package
capability of VHDL.
Introduction 7
DIGITAL DESIGN FLOW

○ System requirements are given by the


customer, system designer, and etc.
○ Functional design started at algorithm of
behavioral level depending on system
complexity.
○ Functional verification is performed to check
the functional design meets requirements.
○ Synthesis is used to convert functional design
to logic gates.
○ Place & Route is for placing the logic gates
within the allowed area and routing the signal
connection among the cells.
○ If the design meets functional and timing
specification, the product is sent to
manufacturing.

Introduction 8
FPGA OR ASIC

○ FPGA: Field Programmable Gate Array


● Consists of Logic Gates and programmable interconnected
● Antifuse FPGA: One-time programmable, Does not require extra
memory to store configuration
● SRAM based FPGA: Allows reprogramming, Requires extra
memory to store configuration
○ ASIC: Application Specific Integrated Circuit
● Includes Digital and Analog circuits
● Lower power, lower area and higher speed than FPGA for the
same technology
● Higher cost than FPGA for low production numbers
● No reprogramming available, any change on the circuit requires
remanufacturing

Introduction 9
FPGA OR MICROCONTROLLER

○ FPGA ○ Microcontroller
● Programmed using HDL, such ● Programmed using C or
as VHDL or Verilog assembly
● Allows real-time parallel ● Real-time parallel processing
processing is not available.
● Peripheral circuits need to be ● Peripheral circuits are
designed. predesigned.
● Peripheral circuits operation is ● Peripheral circuits operation is
determined by design. controlled using registers
● Response to any situation at ● Response to any situation
nanoseconds requires couple of clock cycles
● Most I/O pads are general ● I/O pads are shared between
purpose different peripheral circuits
● It can operate at any clock ● Allowed clock rates are
rate determined by manufacturer
Introduction 10
FPGA OR MICROCONTROLLER

○ FPGA ○ Microcontroller
● Timing of digital circuits ● Timing of digital circuits is
should be guaranteed by the guaranteed by the
designer manufacturer
● Usually, more expensive ● As cheap as couple of dollars

○ The answer of the question FPGA or Microcontroller


depends on the application
● The time constant in a refrigerator is around minutes. Therefore, a
cheap microcontroller will suffice.
● A network controller should switch data at gigabit/s requires
parallel processing. Therefore, a FPGA is suitable

Introduction 11
FPGA INTERNAL STRUCTURE

○ Main FPGA Structure


● Logic Block
● Programmable
Interconnect
● I/O Pad
○ Extra Circuits
● Clock Generator (PLL or
Delay Line)
● SRAM Memory
● Hardware Multiplier
● DSP Blocks
● Serial-Parallel Converter
● Parallel-Serial Converter

Introduction 12
FPGA INTERNAL STRUCTURE

○ Logic Blocks realize combinational


circuits using lookup tables.
○ The advantage of this technique is
that the area does not depend on
the Boolean equation complexity.
○ For example
● 2-input AND gate has 4 possible
outputs.
● These outputs are programmed to the
memory input of the MUX, which
selects one of the inputs depending on
the A and B inputs

Introduction 13
FPGA INTERNAL STRUCTURE

○ Logic blocks have also D Flip-


Flop to realize synchronous
circuits.
○ Using MUXs the output of the
combinational block either
connected to D Flip-Flop input
or routed to the Logic Block
output.
○ The number of inputs for the
MUX to realize combinational
circuits depends on the FPGA
Family. Some new FPGA’s uses
6 input MUX.
Introduction 14
NUMBER SYSTEMS

○ The main advantage of digital systems is faster calculation of


mathematical expressions than humans.
○ Humans use base-10 during calculations
○ For example
● 23.4510 = 2 × 101 + 3 × 100+4 × 10−1+5 × 10−2
○ Digital operations are performed in base-2, because there are
only two levels (0 and 1) are defined.
○ To convert any base-2 number to base-10, every digit is
multiplied with the power of two that it represents.
● 10.012 = 1 × 21 + 0 × 20+0 × 2−1+1 × 2−2 = 2.2510

Introduction 15
NUMBER SYSTEMS

○ To convert any base-N number represented as


● 𝑁𝑁 = 𝑎𝑎 𝑘𝑘𝑎𝑎 𝑘𝑘−1 ⋯ 𝑎𝑎2𝑎𝑎1𝑎𝑎0𝑎𝑎−1𝑎𝑎−2 ⋯ 𝑎𝑎−𝑙𝑙+1𝑎𝑎𝑙𝑙 𝑅𝑅

○ To base-10, every digit is multiplied with the power of R that


it represents
● 𝑁𝑁 = 𝑎𝑎𝑘𝑘 × 𝑅𝑅 𝑘𝑘 + 𝑎𝑎𝑘𝑘−1 × 𝑅𝑅 𝑘𝑘−1 + ⋯
+𝑎𝑎2 × 𝑅𝑅 2 + 𝑎𝑎1 × 𝑅𝑅1 + 𝑎𝑎0 × 𝑅𝑅0
+𝑎𝑎−1 × 𝑅𝑅−1 + 𝑎𝑎−2 × 𝑅𝑅−2 + ⋯
+𝑎𝑎−𝑙𝑙+1 × 𝑅𝑅−𝑙𝑙+1 + 𝑎𝑎−𝑙𝑙 × 𝑅𝑅−𝑙𝑙
○ 𝑎𝑎𝑖𝑖 is the i’th digit value and allowed values are between 0 and
R − 1. If R is greater than 10, letters from the alphabet is
used. For example, base-16 allowed digit values are
● 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Introduction 16
Introduction 17
Introduction 18
BOOLEAN ALGEBRA

○ Boolean Algebra is developed by George Boole in 1847 to


solve logic problems.
○ In Boolean algebra, a variable has only two possible values.
○ “0” represents open position of a switch.
○ “1” represents close position of a switch.
○ Basic mathematical operations are AND, OR and NOT
○ NOT operation gives the complement of a variable

Introduction 19
Introduction 20
Introduction 21
Introduction 22
Introduction 23
Introduction 24
BOOLEAN ALGEBRA

○ AND operation is used to implement logical conjuction

○ OR operation is used to implement logical disjunction

Introduction 25
BOOLEAN ALGEBRA

○ NOR Gate ○ XOR Gate

○ NAND Gate ○ XNOR Gate

Introduction 26
BOOLEAN ALGEBRA

○ Another widely used digital circuit is MUX


○ A 2-to-1 MUX selects one of its inputs depending on the
select input.
○ If A is “0” the output is the same as the I0 input
○ If A is “1” the output is the same as the I1 input

Introduction 27
BOOLEAN ALGEBRA

○ The select one of the input idea can be generalized for n-to-1
MUX
○ The control input is considered as n-bit number and to
determine the input to select, it is converted to base-10.

Introduction 28
BOOLEAN ALGEBRA

○ Truth table is used to list the input combinations and their


respective outputs.
○ For example, generate the truth table for the following circuit

○ This circuit is defined using IF-ELSE statement

Introduction 29

You might also like