verilog: modeling, simulation ands th id synthesisacm31201/old class work/ece 526/lectures/lecture...

33
ECE 526 ECE 526 Verilog: Modeling, Simulation dS th i and Synthesis 1 Slides © Dr. Nagi El Naga and Dr. Ronald W. Mehler

Upload: dinhphuc

Post on 06-Mar-2018

224 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

ECE 526ECE 526

Verilog: Modeling, Simulation d S th iand Synthesis

1Slides © Dr. Nagi El Naga and Dr. Ronald W. Mehler

Page 2: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

New Title, DescriptionECE 526: Verilog HDL for Digital Integrated Circuit DesignPrerequisite: ECE 320/L Corequisite: ECE 526L This coursePrerequisite: ECE 320/L. Corequisite: ECE 526L. This course covers use of Verilog Hardware Description Language for the design and development of digital integrated circuits, i l di k d ASIC d FPGA Hi hi lincluding mask-programmed ASICs and FPGAs. Hierarchical top down vs. bottom up design, synthesizable vs. non-synthesizable code, verification, hardware modeling, simulation system tasks, compiler directives and subroutines are all covered and illustrated with design examples. Lab exercises emphasize use of professional compilation and

2

exercises emphasize use of professional compilation and simulation tools for debugging and verification.

Page 3: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Instructor

• Dr. Ronald W. Mehler• Jacaranda 3303Jacaranda 3303• (818) 677 2495

Offi H T d & Th d 2 00 3 00• Office Hours: Tuesday & Thursday, 2:00 – 3:00

3

Page 4: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Course Web Page

http://www.csun.edu/~rmehler/mehler_files/ece_526.htm

4

Page 5: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

PrerequisitePrerequisite

ECE 320: Theory of Digital SystemsBoolean algebra, combinational and sequential circuits, number systems, etc.

Advised:At least two 400-level computer engineering courses such as 420, 422 and 425.

Neither ECE526 nor any other 500-level course is a beginner’s course.

5

Page 6: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

BooksTextbook: Samir Palnitkar, "Verilog HDL, A guide to digital

design and Synthesis," Second Edition. SunSoft Press, Sun Microsystems Inc Mountain View California 2003Microsystems, Inc., Mountain View, California, 2003.

Interesting Reading: Thomas L. Friedman “The World Is Flat: A Brief History yof the Twenty-first Century,” Farrar, Straus and Giroux, 2005.

Andy Kessler “Running Money ” Collins 2004Andy Kessler “Running Money,” Collins, 2004.

Michael Lewis “The New New Thing: A Silicon Valley Story,” 1999

6

y,

Page 7: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Lab Manual

• ECE 526 Verilog HDL Laboratory• Purchase photocopy at CSUN BookstorePurchase photocopy at CSUN Bookstore• Updated for this semester

7

Page 8: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Lab Access

• To use the lab, you will need a user ID and password.p

• If you are registered, you should have one of eachof each.

• If you don’t know what yours are, see the web siteweb site– http://www.csun.edu/it/helpdesk/outages/accou

nts htmlnts.html8

Page 9: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

COURSE POLICYCOURSE POLICY1. Homework and laboratory exercises will be assigned. They will be

collected on due dates Keep a copy of all solutions because homeworkcollected on due dates. Keep a copy of all solutions because homework solutions might not be returned. No late homework will be accepted.

2. Three exams will be given (two midterm exams and one final exam). Tentative dates of the midterm exams are Tuesday, October 6 andTentative dates of the midterm exams are Tuesday, October 6 and Tuesday, November10.

3. Exam solution should be in Blue Books. (These can be bought at the bookstore.) Absolutely no other solution papers will be accepted. The Blue Books will be collected at the beginning of the semester and returned back on the exam day.

4. Exams are cumulative; study everything for every exam.5 Ab l t l k F ill b5. Absolutely no make-ups on exams. For emergency, you will be

allowed to miss only one midterm exam with no penalty. The final exam must be taken to pass the course.

9

Page 10: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

COURSE POLICYCOURSE POLICY6. The weights of the exams and exercises will be as follows:

Exam #1 30%Exam #2 30%Fi l E 35%Final Exam 35%

Total 95%7. The remaining 5% will be given on homework as well as the general

impression given by each student Talking to neighbors or coming late toimpression given by each student. Talking to neighbors or coming late to the class disturbs the class and give a bad impression. Please avoid doing that and participate in classroom discussions to guarantee a big portion of the 5%.

8. Your final grade will directly reflect the total number of points you will get. The following are the percentages for each grade:

Grade A 90-100% Grade C 68-75%G d A 85 90% G d C 65 68%Grade A- 85-90% Grade C- 65-68%Grade B+ 82-85% Grade D+ 60-65%Grade B 78-82% Grade D 55-60%Grade B- 75-78% Grade D- 50-55%

10

Grade C+ 72-75% Grade F Below 50%

Page 11: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Course Policy

• ECE 526 and ECE 526L are separate courses.

• Courses are co-requisites. It is required to take both concurrently.

• ECE 526L grade will be solely the average of all lab reports.

• Lab reports will have no bearing on ECE 526 grade.

11

Page 12: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Academic Dishonesty

• Claiming credit for someone else’s work is the ultimate sin in academia.

• Your instructor is as hard core as they come on this.

• Not only will cheating result in an F in the course, it may result in expulsion from the university.

• International students found guilty of academic dishonesty may be deported.

12

Page 13: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

It’s NOT a Victimless Crime

• Giving diplomas to engineers who don’t know engineering quickly damages the g g q y greputation of the university.

• A cheater prevents those who come afterA cheater prevents those who come after from even getting interviews.

13

Page 14: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Swine Flu

14

Class presentation materials will be made available on the course web site. If you are sick, stay home and don’t infect anyone else.

Page 15: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

The only stupid question is one you don’t ask.

“Better to keep your mouth shut and be thought a fool than

15

Better to keep your mouth shut and be thought a fool than to open it and remove all doubt.” -- Mark Twain

Page 16: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Homework

• Review ECE 320 material, prepare for assessment test

• Read Palnitkar through Chapter 2• Read Lab Manual through Experiment 1• Read Lab Manual through Experiment 1• Make sure you have access to your UNIX

account• No deliverables this week

16

Page 17: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

What’s an ASIC, Anyhow?

• Application Specific Integrated Circuit– Processors are generally NOT considered ASIC

though design methodology is essentially identical. Processors (including DSP’s) are multi-purpose devicesmulti-purpose devices.

• Pretty much all integrated circuits are developed using ASIC methodologydeveloped using ASIC methodology.

• Many times more ASIC’s are designed every year than GP Processors

17

every year than GP Processors.

Page 18: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

ASIC Classes

FPGACustom Mask

Full Custom Standard Cell Gate Array

U t t dSt t d18

UnstructuredStructured

Page 19: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

It’s a Hot FieldIt s a Hot Field

• Brief | Detailed | View jobs on map• Results 1-25 of 350 Next » • ASIC ENGINEER POSITION-OPPORTUNITY OF A LIFETIME!! The Select Group

Raleigh, NC 27607 Aug 20ASIC ENGINEERS - Multiple Positions! Our client, new to the Raleigh market and growing rapidly, has won numerous awards and is ready to make their mark here in the Triangle!!! They are working with gr ... More

• Senior ASIC Design Verification Engineer Cisco SystemsSan Jose, CA 95134 Aug 20We are seeking a Senior ASIC Design Engineer with specialized knowledge in digital ASIC design and networking t h l i t j i i th d i f th N t G ti ASIC f C t l t 4K d Mtechnologies to join in the design of the Next Generation ASICs for our Catalyst 4K produc ... More

• ASIC Design Engineer CyberCodersLos Angeles 90001 Aug 20Location Los Angeles, CA; Long Beach, CA Salary $90,000 - $110,000 Education Bachelor of Science Category Engineering Experience Required At least 2 Years Short Description ASIC Engineer - VHDL or Ver ... More SR S C/ASIC D i S i d T l• SR SoC/ASIC Designer SemiconductorTalent.comPortland, OR 97201

19More every day: Monster search done Aug. 20.

Page 20: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Digital Design

• Virtually all digital design is now done in ASICs.

• Virtually all ASICs are designed using an HDL and logic synthesis.

• Verilog is the HDL of choice among most engineers and companies, particularly in California.

• A few use VHDL.

20

Page 21: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Karnaugh Map

0 1 1 0

1 1 1 0

1 0 0 1

0 0 0 1

21

Page 22: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Minimize Functions Manually

0 1 1 0

1 1 1 0

1 0 0 1

0 0 0 1

22Sometimes it takes a few tries to find the best implementation.

Page 23: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Translate to Gates

“Best” design may be smallest, fastest, lowest power,

23

Best design may be smallest, fastest, lowest power, quickest to market. Any one design will not be best in all categories.

Page 24: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Redundancy For Reliability

A

OUTSEL

B

The smallest design might not be the most desirable.

24

The smallest design might not be the most desirable.

Page 25: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Four-bit CounterFour bit Counter

25

Image © Texas Instruments

Page 26: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Encode States (half table shown)Encode States (half table shown)A B C Current NextA B C Current

StateNext State

0 0 0 0 10 0 0 00 0 0 1 10 0 1 0 10 0 1 0 10 0 1 1 00 1 0 0 10 1 0 0 10 1 0 1 00 1 1 0 1

26

0 1 1 0 10 1 1 1 0

Page 27: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Manual Minimization Limits

• Anyone can make a K-map for 4 inputs.

5 i t i bit t di b t till bl B d 6?• 5 inputs is a bit tedious, but still manageable. Beyond 6?

• Useful devices tend to have a lot of states and inputs.

• Sum of products may not be the best implementation.

• Consider something so basic as a stoplight controller—pretty simple compared to a Pentium-class processor.

27

Page 28: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Stoplight Controller• States: Red, Yellow, Green for each direction.

• Left-turn arrows: maybe 4, maybe 8

• Right-turn arrows: maybe 4

• Pedestrian lights: several possible statesg p

• Sensors: push buttons and magnetic detectors

• Emergency Services override• Emergency Services override

• Fail-safe mode

i l ll i f h i i i h h28

• Once a single controller is perfect, synchronize it with the rest of the city.

Page 29: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

29

Page 30: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Moore’s Law2005: “Cell” processor has 234 million transistors

2006: Intel produces 153 megabit SRAM with > 1 billion transistors2006: Intel produces 153 megabit SRAM with > 1 billion transistors

2007: “Peryn” dual-core has 410 million, quad-core will have 820

30Who is going to design all those gates?Image © Intel, Inc.

Page 31: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Engineering Density in the USA

31

Page 32: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

EDA : Electronic Design gAutomation

The process of using computer-based software systems to design very large-scale integrated (VLSI) circuits.(VLSI) circuits.

All modern integrated circuits are designed with lEDA tools.

This course uses Verilog HDL for hardwareThis course uses Verilog HDL for hardware description and the NC Verilog simulator from Cadence for simulation.

32

Page 33: Verilog: Modeling, Simulation andS th id Synthesisacm31201/Old Class Work/ECE 526/Lectures/Lecture … · Verilog: Modeling, Simulation andS th id Synthesis ... • Read Lab Manual

Course OutlineCourse Outline1. Introduction to EDA (Electronic Design ( g

Automation).2. Introduction to Hardware Modeling2. Introduction to Hardware Modeling3. Verilog primitive operators and structural

modelingmodeling4. Design verification: folded into other topics5. Synchronization and synchronous design6. Top down and bottom up methodology

337. Library modeling