lecture5 - ECE 4514 Digital Design II Spring 2008 Lecture...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 4514 Digital Design II Spring 2008 ecture 5: Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 5: How HDL Simulation Works Lecture 5: How HDL simulation works A tool & methodology Lecture Patrick Schaumont
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Today's topic b We look at the simulation mechanism of Verilog Verilog Model of a hardware circuit (many gates) Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 5: How HDL Simulation Works Modelsim Verilog Simulator Sequential Machine Simulator creates the illusion of parallel activites in model Simulator is a software program running on a PC
Background image of page 2
HDL simulation is different from C execution b Need to express concurrency (things happening simultaneously) b Need to model time b Need to model non-standard wordlengths Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 5: How HDL Simulation Works b Need to model non-standard values (X,Z) b Need organization in modules rather than functions
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
HDL simulation is different from C execution b Need to express concurrency (things happening simultaneously) b Need to model time b Need to model non-standard wordlengths Simulation Time + Concurrency Model (events, cycles, . .) Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 5: How HDL Simulation Works b Need to model non-standard values (X,Z) b Need organization in modules rather than functions New data types, custom syntax
Background image of page 4
Focus of this lecture b Need to express concurrency (things happening simultaneously) b Need to model time Simulation Time + Concurrency Model (events, cycles, . .) Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 5: How HDL Simulation Works Understand the concept of event driven simulation Understand how gate-level models are simulated Understand how behavioral models are simulated Objectives:
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The need for concurrent hardware models a b Let's write a simulation for this circuit in C clk Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 5: How HDL Simulation Works int a, b; void clock_cycle() { a = b; b = a; } We create a function clock_tick which will be called for each clock cycle. Is the following a correct implementation of this function?
Background image of page 6
The need for concurrent hardware models a b Let's write a simulation for this circuit in C clk Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 5: How HDL Simulation Works int a, b; void clock_cycle() { a = b; b = a; } No! a and b will have the same value after one call We create a function clock_tick which will be called for each clock cycle. Is the following a correct implementation of this function?
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A better solution a b Let's write a simulation for this circuit in C clk Patrick Schaumont Spring 2008 ECE 4514 Digital Design II Lecture 5: How HDL Simulation Works int a, b; int new_a, new_b; void clock_cycle() { new_a = b; new_b = a; b = new_b; a = new_a; } Is this better?
Background image of page 8
A better solution a b Let's write a simulation for this circuit in C clk int a, b; int new_a, new_b; Patrick Schaumont
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/24/2011 for the course ECE 4514 taught by Professor Staff during the Fall '08 term at Virginia Tech.

Page1 / 52

lecture5 - ECE 4514 Digital Design II Spring 2008 Lecture...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online