66
HARDWARE DESCRIPTION LANGUAGE (HDL)

HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Embed Size (px)

Citation preview

Page 1: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

HARDWARE DESCRIPTION

LANGUAGE (HDL)

Page 2: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Development of digital IC technology

The following slides are adapted from “Digital Integrated Circuits - A Design Perspective,” 2003.J. M. Rabaey, A. Chandrakasan, B. Nikolic

Page 3: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

3

ENIAC - The first electronic computer (1946)

10 feet tall;1,000 square feet of floor- space; 30 tons;More than 70,000 resistors;

10,000 capacitors; 6,000 switches; 18,000 vacuum tubes;

Requires 150 kilowatts of power;

Page 4: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Transistor Age

1951: Shockley develops junction transistor which can be manufactured in quantity.

1947: Bardeen and Brattain create point-contact transistor

Page 5: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Early Integration

Jack Kilby, working at Texas Instruments, invented a monolithic “integrated circuit” in July 1959.

He had constructed the flip-flop shown in the patent drawing above.

Page 6: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Planar transistors

In mid 1959, Noyce develops the first true IC using planar transistors,

Page 7: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Practice Makes Perfect

1961: TI and Fairchild introduced first logic IC’s

1963: Densities and yields improve. This circuit has four flip-flops.

Page 8: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Continues development

1967: Fairchild markets the first semi-custom chip. Transistors (organized in columns) can be easily rewired to create different circuits. Circuit has ~150 logic gates.

1968: Noyce and Moore leave Fairchild to form Intel. By 1971 Intel had 500 employees;

By 2004, 80,000 employees in 55 countries and $34.2B in sales.

Page 9: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Continues development

1970: Intel starts selling a 1k bit RAM.

1971: Ted Hoff at Intel designed the first microprocessor. The 4004 had 4-bit busses and a clock rate of 108 KHz. It had 2300 transistors and was built in a 10 um process.

Page 10: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Exponential Growth

1972: 8088 introduced.

Had 3,500 transistors supporting a byte-wide data path.

1974: Introduction of the 8080.

Had 6,000 transistors in a 6 um process.

The clock rate was 2 MHz.

Page 11: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Today

Many disciplines have contributed to the current state-of-the-art in VLSI Design:

• Solid State Physics

• Materials Science

• Lithography and fab

• Device modeling

• Circuit design and layout

• Architecture design

• Algorithms

• CAD tools

To come up with chips like:

Page 12: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

12

Pentium 4 – 0.18 um t

0.18-micron process technology– Introduction date: November 20, 2000

(1.5, 1.4 GHz)– Level Two cache: 256 KB Advanced

Transfer Cache – System Bus Speed: 400 MHz– SSE2 SIMD Extensions– Transistors: 42 Million – Typical Use: Desktops and entry-level

workstations

Page 13: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

13

0.13-micron process technology (2.53, 2.2, 2 GHz)» Introduction date:

January 7, 2002» Level Two cache:

512 KB Advanced» Transistors: 55 Million

Pentium 4

Page 14: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

14

Pentium Pro - multichip module (MCM)

Page 15: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

15

• IBM chip has nine processor cores• 192 billion floating-point operations per second (192 G)• Typical Use: multimedia

Supercomputer for Sony's PlayStation 3

Page 16: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Moore’s Law

In 1965, Gordon Moore noted that the number of transistors on a chip doubled every 18 to 24 months.

He made a prediction that semiconductor technology will double its effectiveness every 18 months

Page 17: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Moore’s Law

161514131211109876543210

195

9

196

0

196

1

196

2

196

3

196

4

196

5

196

6

196

7

196

8

196

9

197

0

197

1

197

2

197

3

197

4

197

5

LO

G 2 O

F T

HE

NU

MB

ER

OF

CO

MP

ON

EN

TS

PE

R I

NT

EG

RA

TE

D F

UN

CT

ION

Source: Electronics, April 19, 1965.

Page 18: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Technology Directions: SIA Roadmap

Year 1999 2002 2005 2008 2011 2014 Feature size (nm) 180 130 100 70 50 35 Logic trans/cm 2 6.2M 18M 39M 84M 180M 390M Cost/trans (mc) 1.735 .580 .255 .110 .049 .022 #pads/chip 1867 2553 3492 4776 6532 8935 Clock (MHz) 1250 2100 3500 6000 10000 16900 Chip size (mm 2) 340 430 520 620 750 900 Wiring levels 6-7 7 7-8 8-9 9 10 Power supply (V) 1.8 1.5 1.2 0.9 0.6 0.5 High-perf pow (W) 90 130 160 170 175 183

Page 19: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Integrated Circuits

Full-CustomASICs

Semi-CustomASICs(std cell)

UserProgrammable

PLD FPGA

PAL PLA PML LUT(Look-Up Table)

MUX Gates

World of Integrated Circuits

Page 20: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

• designs must be sentfor expensive and timeconsuming fabricationin semiconductor foundry

• bought off the shelfand reconfigured bydesigners themselves

ASICApplication Specific

Integrated Circuit

FPGAField Programmable

Gate Array

• designed all the wayfrom behavioral descriptionto physical layout

• no physical layout design;design ends with a bitstream used to configure a device

ASIC versus FPGA

Page 21: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Off-the-shelf

Low development cost

Short time to market

Reconfigurability

High performance

ASICs FPGAs

Low power

Low cost inhigh volumes

Which Way to Go?

Page 22: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

What is an ASIC Chip ?

• Application Specific Integrated Circuit

• A chip that is produced to perform a specific function i.e. microcontroller

• Limited interconnect layers, dedicated routing channels

• Intellectual Properties for timing and performance. DLLs, PLLs, DDRs, RAMs

• Fabricated System-On-Chip

Page 23: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

ASIC Design Flow (Overview)

Page 24: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Source: [Brown99]

What is an FPGA Chip ?

• Field Programmable Gate Array

• A chip that can be configured by user to implement different digital hardware

• Configurable Logic Blocks (CLB) and Programmable Switch Matrices. Sea-of-gates

• Bitstream to configure: function of each block & the interconnection between logic blocks

I/O Block

I/O B

lock

I/O Block

I/O B

lock

Page 25: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

FPGA Design Flow (Overview)

HDL SOURCE

LOGIC SYNTHESISTO GATES

MAPPINGPLACEMENTROUTING

BITSTREAMGENERATIONAND PROGRAMMING(UNIQUE TO FPGAs)

Page 26: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

FPGA Chips

HDL DESIGN SOFTWARES

Page 27: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

What is HDL?• Hardware Description Language : A type of

programming language for sampling and modeling of electronic & logic circuit designs

• It can describe the circuit’s operation, design and organization

• By using CAD tools, it can be used for test and verify through simulations

• Also used to model the intended piece of device like ASICs, FPGAs, CPLDs and others

• Various kinds : VHDL, Verilog HDL, AHDL etc

Page 28: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Why HDL?• Software solution due to :

– Limits in hardware solutions – Increasing design complexity– Increasing cost in time and investment– Increasing knowledge requirement– Inadequacy of other existing languages

• Text-based rather than schematic design– Easier development– faster time-to-market– synthesis and analysis– Documentation

Page 29: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

• Programming languages such as C or Java cannot serve as HDLs (unless modified significantly).

• Programming languages are modeled after a sequential process, where operations are performed in a sequential order (order matters).– This is amenable to the human thinking process, in which an algorithm is

unfolded into a recipe or step-by-step process– This process matches the basic operation of a hardware computing platform.

• HDLs such as VHDL (VHSIC (Very High Speed Integrated Circuit) HDL) and Verilog were developed to support the underlying characteristics of hardware– Connections of parts– Concurrent operations– Concept of propagation delay and timing

These characteristics cannot be captured by traditional PLs

Programming Language (PL) vs Hardware Description Language (HDL)

Page 30: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

A Dataflow Language

DATAFLOWCONTROLFLOW

EX: C language assignment EX: VHDL signal assignment

X = A & B; X <= A and B;

X is computed out of A and B ONLY each time this assignment is executed

A PERMANENT link is created between A, B, and X

X is computed out of A and B WHENEVER A or B changes

Page 31: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

A Dataflow Language (cont’d)

DATAFLOWCONTROLFLOW

EX: C language assignment EX: VHDL signal assignment

X = A & B;------X = C & D;

X <= A and B;------X <= C and D;

YES YES NO NO

Page 32: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Introduction toVHDL

(part 1)

Page 33: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

• VHSIC Hardware Description Language– VHSIC stands for Very High Speed Integrated

Circuit

• Jointly developed in 1983 by Intermetrics, IBM & Texas Instruments

• Initially used by the US Dept. of Defense

• IEEE Standard in 1987 then enhanced and restandardized in 1993

What is VHDL?

Page 34: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

• Near-approach to industry– High density electronic design– Multidisciplinary – electronics, microelectronics,

communications, instrumentations and control

• Technology related– Reconfigurable– Actual implementation

• System Design– System throughput recognition– problem solving ability– debugging techniques

Using VHDL as UniMAP’sOBE and PBL

Page 35: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

VHDL CAD tool in this subject

Page 36: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

VHDL Main Features

TimingDataflow

Structure

Behavior

Page 37: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

VHDL Main Features

• Supports the whole design process from high to low abstraction levels :

• System and algorithmic level• Register Transfer Level• Logic level• Circuit level (to some extent)

• Suitable for specifications either in behavioral or structural domain

• Precise simulation semantics is associated with the language definition :• Timing simulations specified• Output simulation is uniquely identified and independent of the

VHDL implementation

VHDL specifications are accepted by hardware synthesis tools

Page 38: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Case Sensitivity

• VHDL is not case sensitiveExample:

Names or labelsdatabusDatabusDataBusDATABUS

are all equivalent

Page 39: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Free Format• VHDL is a “free format” language No formatting conventions, such as spacing

or indentation imposed by VHDL compilers. Space and carriage return treated the same way.Example:

if (a=b) then

orif (a=b) then

orif (a =b) then

are all equivalent

Page 40: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Comments

• Comments in VHDL are indicated with a “double dash”, i.e., “--”

Comment indicator can be placed anywhere in the line Any text that follows in the same line is treated as a comment Carriage return terminates a comment No method for commenting a block extending over a

couple of linesExamples:-- main subcircuitData_in <= Data_bus; -- reading data from the input FIFO

Page 41: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

VHDL Architectures

• Does not allow a layout description

Behavioral

Structural

Algorithmic

FSM

RTL

Gate

Layout

Abstraction Levels VHDL Architectures

How it works

How it is connected

Page 42: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

VHDL WRITTEN FORMAT

Library / Package Declaration

Entity Declaration

Architecture Flow

Page 43: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Example VHDL Code• 3 sections to a piece of VHDL code• File extension for a VHDL file is .vhd• Name of the file is usually the entity name

(nand_gate.vhd)LIBRARY DECLARATION

ENTITY

ARCHITECTURE

LIBRARY ieee;USE ieee.std_logic_1164.all;

ENTITY nand_gate ISPORT( a : IN STD_LOGIC;

b : IN STD_LOGIC; z : OUT STD_LOGIC);

END nand_gate;

ARCHITECTURE model OF nand_gate ISBEGIN

z <= a NAND b;END model;

Page 44: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

LIBRARY / PACKAGE DECLARATIONLibrary ieee;Use ieee.std_logic_1164.all;Use ieee.std_logic_signed.all;Use ieee.std_logic_unsigned.all;Use ieee.std_logic_arith.all;

Library work;Use work.my_package.entity_name;Use work.my_package.function_name;

Page 45: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Library Declarations

Use all definitions from the package

std_logic_1164

LIBRARY ieee;USE ieee.std_logic_1164.all;

ENTITY nand_gate ISPORT( a : IN STD_LOGIC;

b : IN STD_LOGIC; z : OUT STD_LOGIC);

END nand_gate;

ARCHITECTURE model OF nand_gate ISBEGIN

z <= a NAND b;END model;

Library declaration

Page 46: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Library Declarations - Syntax

LIBRARY library_name;

USE library_name.package_name.package_parts;

Page 47: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Commonly Used Libraries• ieee

– Specifies multi-level logic system including STD_LOGIC, and STD_LOGIC_VECTOR data types

• std– Specifies pre-defined data types

(BIT, BOOLEAN, INTEGER, REAL, SIGNED, UNSIGNED, etc.), arithmetic operations, basic type conversion functions, basic text i/o functions, etc.

• work– User-created designs after

compilation

Needs to be explicitly declared

Visible by default

Page 48: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Design Entity

Design Entity - most basic building block of a design.

One entity can have many different architectures.

entity declaration

architecture 1

architecture 2

architecture 3

design entity

Page 49: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

ENTITY DECLARATION

• Specifies the input and output signals of the entity

• Format :Entity entity_name isport (port_names : mode data_type);End entity_name;

1

2

3

Page 50: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

(1) Rules for Entity NameGeneral rules of thumb (according to VHDL-87)

1. All names should start with an alphabet character (a-z or A-Z)

2. Use only alphabet characters (a-z or A-Z) digits (0-9) and underscore (_)

3. Do not use any punctuation or reserved characters within a name (!, ?, ., &, +, -, etc.)

4. Do not use two or more consecutive underscore characters (__) within a name (e.g., Sel__A is invalid)

5. All names and labels in a given entity and architecture must be unique

6. Cannot end with an ‘_’ underscore7. Cannot have a blank space to separate words

Page 51: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

(2) Common Data Type

• Std_logic data– bit logic– std_logic– std_logic_vector (b downto a) or std_logic_vector (a to b) :

array of bit logic• Signed, Unsigned• Integer• Boolean• Legal values for std_logic : 0,1,Z,-,L,H,U,X,W

– Only the first 4 are used in synthesis

Page 52: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

(3) Port Modes: SummaryThe Port Mode of the interface describes the direction in which data travels with respect to the component

– In: Data comes in this port and can only be read within the entity. It can appear only on the right side of a signal or variable assignment.

– Out: The value of an output port can only be updated within the entity. It cannot be read. It can only appear on the left side of a signal assignment.

– Inout: The value of a bi-directional port can be read and updated within the entity model. It can appear on both sides of a signal assignment.

– Buffer: Used for a signal that is an output from an entity. The value of the signal can be used inside the entity, which means that in an assignment statement the signal can appear on the left and right sides of the <= operator

Page 53: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Example 1

Full AdderA

B

Cin

SUM

Cout

Entity Full_Adder isPort ( A,B,Cin : in std_logic;

SUM, Cout : out std_logic);

End Full_Adder;

Page 54: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Example 2

4 bit Full Adder

A[3..0]

Cin

SUM[3..0]

Cout

B[3..0]

Entity Full_Adder isPort ( A,B : in std_logic_vector(3 downto 0);

Cin : in std_logic;SUM : out std_logic_vector(3 downto 0);Cout : out std_logic);

End Full_Adder;

Page 55: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

ARCHITECTURE• The Internal Aspect of a Design Unit• Can be behavioral (RTL) or structural• Always associated with single entity• Single entity can have multiple architectures

architecture architecture_name of entity_name is{architecture_declarative_part}

begin{architecture_descriptive_part}

end [architecture_name];

architecture architecture_name of entity_name is{architecture_declarative_part}

begin{architecture_descriptive_part}

end [architecture_name];

Page 56: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

ARCHITECTURE DATA OBJECTS3 kinds of data object declared and used in architecture:

1. Signal – variable data used to connect internal modulesExample signal cnt : std_logic_vector(2 downto 0);

2. Constant – fixed value throughout the design Example constant length : std_logic_vector(3 downto 0) := “0101”;

3. Variable – internal representations not physically visible and declared within a process.

Example variable cnt : std_logic_vector(2 downto 0);

Page 57: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Architecture Examples

Architecture ex1 of system isBegin

y <= A and (not B);z <= not a xnor (b xor c);

End ex1;

Architecture ex2 of another_system isSignal x1, x2 : std_logic_vector(2 downto 0);

Beginx1 <= A and (not B);z <= x1 + x2;

End ex2;

Page 58: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

• Two architecture flavors: Behavioral & Structural

architecture TWO of MUX2 is component MX2 -- a macro from a library port (A, B, S:in std_logic; Y :out std_logic); end component;begin-- instantiate MX2 U1: MX2 port map(A=>AIN, B=>BIN, S=>SIN, Y=>YOUT); end TWO;

architecture TWO of MUX2 is component MX2 -- a macro from a library port (A, B, S:in std_logic; Y :out std_logic); end component;begin-- instantiate MX2 U1: MX2 port map(A=>AIN, B=>BIN, S=>SIN, Y=>YOUT); end TWO;

architecture ONE of MUX2 isbegin YOUT <= (AIN and not SIN) or (BIN and SIN);end ONE;

architecture ONE of MUX2 isbegin YOUT <= (AIN and not SIN) or (BIN and SIN);end ONE;

Declarative part

BehavioralBehavioral

StructuralStructural

Descriptive part

Page 59: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Operators

Page 60: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Single Wire Versus Bus

wire

a

bus

b

1

8

SIGNAL a : STD_LOGIC;

SIGNAL b : STD_LOGIC_VECTOR(7 downto 0);

Page 61: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Single versus Double Quote

• Use single quote to hold a single bit signal– a <= ‘0’, a <=‘Z’

• Use double quote to hold a multi-bit signal– b <= "00", b <= "11"

Page 62: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Standard Logic VectorsSIGNAL a: STD_LOGIC;SIGNAL b: STD_LOGIC_VECTOR(3 DOWNTO 0);SIGNAL c: STD_LOGIC_VECTOR(3 DOWNTO 0);SIGNAL d: STD_LOGIC_VECTOR(7 DOWNTO 0);SIGNAL e: STD_LOGIC_VECTOR(15 DOWNTO 0);SIGNAL f: STD_LOGIC_VECTOR(8 DOWNTO 0); ……….a <= '1';b <= "0000"; -- Binary base assumed by defaultc <= B"0000"; -- Binary base explicitly specifiedd <= "0110_0111"; -- You can use '_' to increase readabilitye <= X"AF67"; -- Hexadecimal basef <= O"723"; -- Octal base

Page 63: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Priority Dataflow

position of parenthesis

RTL netlist layout

Page 64: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Vectors and ConcatenationSIGNAL a: STD_LOGIC_VECTOR(3 DOWNTO 0);SIGNAL b: STD_LOGIC_VECTOR(3 DOWNTO 0);SIGNAL c, d, e: STD_LOGIC_VECTOR(7 DOWNTO 0);

a <= "0000"; b <= "1111"; c <= a & b; -- c = "00001111"

d <= '0' & "0001111"; -- d <= "00001111"

e <= '0' & '0' & '0' & '0' & '1' & '1' & '1' & '1'; -- e <= "00001111"

Page 65: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Exercise

1. Generate the VHDL code for a logic circuit of a Half Adder and simulate in Quartus II

2. Using the Half Adder in Question 1, generate and simulate the VHDL code for a logic circuit of a Full Adder.

3. What do you think a VHDL code representation for a 4-bit logic circuit of a 2-to-1 Multiplexer looks like? Simulate your VHDL code in Quartus II to show the dataflow operation.

Page 66: HARDWARE DESCRIPTION LANGUAGE (HDL). Development of digital IC technology The following slides are adapted from “Digital Integrated Circuits - A Design

Next Chapter

• VHDL Architecture writing design styles– Concurrent Statements– Sequential Statements– Behavioral vs Structural