Top Banner
ECE 459/559 Secure & Trustworthy Computer Hardware Design VLSI Design Basics Garrett S. Rose Spring 2016
35

ECE 459/559 Secure & Trustworthy Computer Hardware Design

Dec 12, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ECE 459/559 Secure & Trustworthy Computer Hardware Design

ECE 459/559 Secure & Trustworthy

Computer Hardware DesignVLSI Design Basics

Garrett S. RoseSpring 2016

Page 2: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● Brief overview of VHDL

– Behavioral VHDL

– Structural VHDL

● Simple examples with VHDL

● Some VHDL for SIMON encryption

Recap

Page 3: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● Circuit-level view

– Transistors as switches

– Static CMOS circuits

● Top-down design flows

– VHDL to silicon

Summary

Page 4: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● VLSI – Very Large Scale Integration● CMOS – Complimentary Metal-Oxide Semiconductor● ASIC – Application Specific Integrated Circuit● FPGA – Field Programmable Gate Array● SoC – System on Chip● NoC – Network on Chip

● HDL – Hardware Description Language (VHDL or Verilog)● RTL – Register Transfer Language

Some General Terms

Page 5: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● We can view MOS transistors as electrically controlled switches

● Voltage at gate controls path from source to drain

g

s

d

g = 0

s

d

g = 1

s

d

g

s

d

s

d

s

d

nMOS

pMOS

OFF ON

ON OFF

Transistors as Switches

Page 6: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A Y

0

1

VDD

A Y

GNDA Y

CMOS Inverter

Page 7: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A Y

0

1 0

VDD

A=1 Y=0

GND

ON

OFF

A Y

CMOS Inverter

Page 8: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A Y

0 1

1 0

A Y

CMOS Inverter

Page 9: ECE 459/559 Secure & Trustworthy Computer Hardware Design

• Pull-up net (PUP) off when pull-down (PDN) on

• PUP implemented as complement of PDN(Complementary MOS)

• If two FETs in parallel in PDN, counterparts in series in PUP

• Output (Y) connected to VDD or GND, never both

More Complex Gates:Pull-Up and Pull-Down Nets

Page 10: ECE 459/559 Secure & Trustworthy Computer Hardware Design

• Pull-up net (PUP) off when pull-down (PDN) on

• PUP implemented as complement of PDN(Complementary MOS)

• If two FETs in parallel in PDN, counterparts in series in PUP

• Output (Y) connected to VDD or GND, never both

More Complex Gates:Pull-Up and Pull-Down Nets

Page 11: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A B Y

0 0

0 1

1 0

1 1A

B

Y

CMOS NAND Gate

Page 12: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A B Y

0 0 1

0 1

1 0

1 1

A=0

B=0

Y=1

OFF

ON ON

OFF

CMOS NAND Gate

Page 13: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A B Y

0 0 1

0 1 1

1 0

1 1

A=0

B=1

Y=1

OFF

OFF ON

ON

CMOS NAND Gate

Page 14: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A B Y

0 0 1

0 1 1

1 0 1

1 1

A=1

B=0

Y=1

ON

ON OFF

OFF

CMOS NAND Gate

Page 15: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A B Y

0 0 1

0 1 1

1 0 1

1 1 0

A=1

B=1

Y=0

ON

OFF OFF

ON

CMOS NAND Gate

Page 16: ECE 459/559 Secure & Trustworthy Computer Hardware Design

A B Y

0 0 1

0 1 0

1 0 0

1 1 0

A

BY

CMOS NAND Gate

Page 17: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● Y pulls low if ALL inputs are 1● Y pulls high if ANY input is 0

A

B

Y

C

3-Input NAND Gate

Page 18: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● The term “ASIC” has been applied to many design styles● Technically, refers only to application specific circuits

(i.e., any microchip you design yourself)● Often, ASIC is used to refer to automated designs developed using

some hardware description language● Usually want an ASIC fast – clear design flows applied● ASICs are low volume integrated circuits● In recent years, ASICs are less common since an FPGA can be used

to implement desired function-- Some might say... “FPGA is the new ASIC”

The ASIC

Page 19: ECE 459/559 Secure & Trustworthy Computer Hardware Design

Requirements

SimulateRTL Model

Gate-levelModel

Synthesize

Simulate Test Bench

ASIC/SoC Place & Route

TimingModel Simulate

Typical ASIC Design Flow

Page 20: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● RTL design and verification – must write the HDL code– Can use VHDL or Verilog

● Synthesis – compiles HDL design description into a gate level netlist

● Floorplanning – before place & route, must decide where functional modules will be placed on the die or FPGA

● Place & Route– Placement – determines where standard cells are placed– Routing – adds wires (configures switch blocks) connecting gates to

implement final design● Every step must include simulation & verification

ASIC Design Steps

Page 21: ECE 459/559 Secure & Trustworthy Computer Hardware Design

Placement of CellsASIC Standard Cell View

Page 22: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● SoC implies a system of fairly high level blocks (e.g., memory, processors, DSP, etc.) integrated into one design

● SoC often refers to heterogeneous systems encompassing a great deal of functionality, often mixed signal

● Complex blocks are designed individually and not modified at the highest level – each block essentially a “black box”

● Designers often use intellectual property (IP) cores for the building blocks of higher level designs

● Repository of useful, yet free IP: www.OpenCores.org

System on Chip (SoC)

Page 23: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● Start with high level HDL description

● Some blocks synthesized from HDL, some custom

● Research opportunities in power/temp. management, interconnection issues, etc.

● Example: an ultrasound image processing system

-- Revision:-- Revision 0.01 - File Created-- Additional Comments:-- --------------------------------------------------------------------------------library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity SRAD_Top is Port ( clk : in std_logic; ExtRST : in std_logic; NewFrm : in std_logic; DataIn : in std_logic_vector(7 downto 0); Addr_R : out std_logic_vector (13 downto 0); Dsp_Addr : out std_logic_vector (13 downto 0); DataOut : out std_logic_vector(7 downto 0); InAdMux : out std_logic; DisAdMux : out std_logic; Dsp_WE : out std_logic; VGA_Ena : out std_logic; SRAD_Clk : out std_logic

);end SRAD_Top;

architecture Structure of SRAD_Top is

COMPONENT Antilog Port ( D : in std_logic_vector(7 downto 0);

System on Chip Design

Page 24: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● On-chip communication major design consideration for IP blocks

● Shared Bus (broadcast)– Low area– Poor scalability– High energy consumption

● Network on Chip (point-to-point)– Scalability– Low energy consumption– High area

SoC Communication

Page 25: ECE 459/559 Secure & Trustworthy Computer Hardware Design

Bus Basics

● Bus communications follows strict order – serial nature

● Can broadcast – multiple destinations at the same time

Module1

Module2

Module3

Module4

First Second

Module1

Module2

Module3

Module4

Page 26: ECE 459/559 Secure & Trustworthy Computer Hardware Design

Bus Basics

● Bus communication operates in units of cycles, messages and transactions

Page 27: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● As more and more complex systems are integrated, interconnection becomes a critical issue

● An NoC is literally a network (usually passing packets) on the chip not unlike the networks of macroscopic systems such as supercomputers, LANs, or the internet

● NoC has become more attractive since bus architectures only allow two devices to communicate at a time

● The on-chip network can be implemented in a variety of ways such as a simple crossbar, Clos, mesh, and so on

Network on Chip (NoC)

Page 28: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● Networks can be implemented on chip to circumvent issues:

– Synchronization – NoC may be globally asynchronous

– Multiple paths to avoid faults and allow many connections

– Cool, low-power operation

Network on Chip (NoC)

Page 29: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● Some tools useful in flow:– RTL Verification – ModelSim– Synthesis – Design Compiler– Place & Route – Cadence Encounter

● RTL (register transfer level) code written in VHDL or Verilog using any text editor (e.g., gedit on Linux) can be verified using NCLaunch, ISim or ModelSim

● Design Compiler takes high level HDL code and synthesizes to a gate-level netlist (this is a Verilog netlist)

● Encounter takes the Verilog netlist from Design Compiler as input to place and route the final design

Design Flow Revisited

Page 30: ECE 459/559 Secure & Trustworthy Computer Hardware Design

RTL Design

Design Compiler

Encounter

VHDL

Verilog Netlist

Final Layout

Behavioral Design

Synthesis

Place & Route

ModelSim

ModelSim(with library)

Verify

Verify

Design Flow Revisited – Silicon

Page 31: ECE 459/559 Secure & Trustworthy Computer Hardware Design

RTL Design

ISE/Vivado/XST

ISE/Vivado

VHDL

Netlist

Prog File

Behavioral Design

Synthesis(fairly generic)

“Design Implementation”-- Translate, Map, Place & Route(mostly proprietary)

ModelSim

ModelSim(with library)

Verify

Verify

Design Flow Revisited – FPGA

Page 32: ECE 459/559 Secure & Trustworthy Computer Hardware Design

RTL Design

ISE/Vivado/XST

ISE/Vivado

VHDL

Netlist

Final Design

Each stage has verification and loop(s) back

Simulation

Simulation

Still More...

Timing AnalysisPower Analysis

Equivalence

Page 33: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● HDL description – likely starts high-level then becomes more structured with time– It all starts here...

● Constraints – extra files are included with HDL indicating performance targets to synthesis and other tools– Timing constraints needed to meet performance targets– Pin placement also falls under constraints– Can constrain tool to place blocks at certain locations

● CAD tool options – tools can be “tweaked” to use different algorithms, seed parameters, etc.

What the Designer Controls

Page 34: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● The design always begins with the initial behavioral description – the RTL code

● The RTL description is a very high level form written in some HDL, either VHDL or Verilog

● RTL describes the design in terms of microarchitectural components such as registers & ALUs

● A lower level HDL form would be a gate level netlist and even lower than that is transistor level-- netlists can be written in an HDL such as Verilog

Coding for Circuits

Page 35: ECE 459/559 Secure & Trustworthy Computer Hardware Design

● Fault-injection attacks – force circuit-level faults to disrupt desired behavior

● Hardware Trojans – circuit- and/or logic-level circuits added to a design for malicious purposes

● Reverse engineering – need to hide design details at all levels (circuit, logic, RTL, etc.)

● How would you encrypt a circuit (design and implementation)?● Several mitigation techniques exist for HW security that can be

applied at various levels of abstraction

Relationship to Security?