Useful Modeling Techniques

Slides:



Advertisements
Similar presentations
UNIT 8: Synthesis Basics
Advertisements

User Defined Functions
Supplement on Verilog adder examples
Synchronous Sequential Logic
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 07: Verilog (3/3) Prof. Sherief Reda Division of.
ELEN 468 Lecture 71 ELEN 468 Advanced Logic Design Lecture 7 System Tasks, Functions, Syntax and Behavioral Modeling I.
Reconfigurable Computing (EN2911X, Fall07) Lecture 05: Verilog (1/3) Prof. Sherief Reda Division of Engineering, Brown University
Digital System Design Verilog ® HDL Tasks and Functions Maziar Goudarzi.
Digital System Design Verilog ® HDL Useful Modeling Techniques Maziar Goudarzi.
Digital System Design Verilog ® HDL Behavioral Modeling (1) Maziar Goudarzi.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Macro & Function. Function consumes more time When a function is called, the copy of the arguments are passed to the parameters in the function. After.
Tasks and Functions Programmable Logic Design (40-493) Fall 2001 Computer Engineering Department Sharif University of Technology Maziar Gudarzi.
ECE 2372 Modern Digital System Design
Workshop Topics - Outline
MODULE 1.3 VERILOG BASICS UNIT 1 : INTRODUCTION TO VERILOG TOPIC : System Tasks and Compiler directive.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Digital System Design Verilog ® HDL Parameters, and Generate Blocks Maziar Goudarzi.
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
Classes In C++ 1. What is a class Can make a new type in C++ by declaring a class. A class is an expanded concept of a data structure: instead of holding.
System Tasks for File Output & Strobing 1. Introduction There are tasks and functions that are used to generate input and output during simulation. Their.
1 Chapter Four Creating and Using Classes. 2 Objectives Learn about class concepts How to create a class from which objects can be instantiated Learn.
3/4/20031 ECE 551: Digital System Design * & Synthesis Lecture Set 3 3.1: Verilog - User-Defined Primitives (UDPs) (In separate file) 3.2: Verilog – Operators,
Chapter 10: Introduction to Inheritance. Objectives Learn about the concept of inheritance Extend classes Override superclass methods Call constructors.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 4: Testing, Dataflow Modeling Spring 2009.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
Timing Controls in Behavioral Modeling Programmable Logic Design (40-493) Fall 2001 Computer Engineering Department Sharif University of Technology Maziar.
Verilog® HDL Behavioral Modeling (2)
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Chapter 4: More Object Concepts. Objectives Understand blocks and scope Overload a method Avoid ambiguity Create and call constructors with parameters.
Chapter 6: Hierarchical Structural Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 6-1 Chapter 6: Hierarchical.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Review for Test2. Scope 8 problems, 60 points. 1 Bonus problem (5 points) Coverage: – Test 1 coverage – Exception Handling, Switch Statement – Array of.
Mohamed Younis CMCS 411, Computer Architecture 1 CMSC Computer Architecture Lecture 8 Hardware Design Languages February 21, 2001
Structural Description
TK1924 Program Design & Problem Solving Session 2011/2012
Adapted from Krste Asanovic
TODAY’S OUTLINE Verilog Codings Concurrent and Sequential If-else
Discussion 2: More to discuss
Verilog Introduction Fall
‘if-else’ & ‘case’ Statements
Today’s Objectives Review the important points of classes
Lecture 2 Supplement Verilog-01
Chapter 3: Using Methods, Classes, and Objects
PHP Classes and Objects
TODAY’S OUTLINE Procedural Assignments Verilog Coding Guidelines
Functional Programming with Java
Chapter 7: Advanced Modeling Techniques
Delays in Verilog Programmable Logic Design (40-493) Fall 2001
CMPE 152: Compiler Design September 11/13 Lab
Chapter 9: Value-Returning Functions
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Design & Co-design of Embedded Systems
Review for Test1.
Supplement on Verilog adder examples
Final Review Bina Ramamurthy 4/15/2019 BR.
CMPE 152: Compiler Design February 21/26 Lab
Classes: A Deeper Look, Part 1
Verilog for Testbenches
Essential Issues in Codesign: Models
Introduction to Digital IC Design
CMPE 152: Compiler Design April 18 – 30 Labs
COE 202 Introduction to Verilog
More C++ Classes Systems Programming.
Functions, Procedures, and Abstraction
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

Useful Modeling Techniques Programmable Logic Design (40-493) Fall 2001 Computer Engineering Department Sharif University of Technology Maziar Gudarzi

Outline Procedural Continuous Assignment Overriding Parameters Conditional Compilation and Execution Useful System Tasks

Procedural Continuous Assignment Useful Modeling Techniques

Procedural Continuous Assignment Overrides, for a certain time, the effect of regular assignments to a variable. Two types assign/deassign Works only on register data types force/release Works on both register and net data types

Procedural Continuous Assignment (cont’d) assign/deassign Keywords assign: overrides regular procedural assignments deassign: re-enables regular procedural assignments After deassign: Last value remains on the register until a new procedural assignment changes it.

Procedural Continuous Assignment (cont’d) force/release Keywords: force: overrides all procedural/continuous/ procedural continuous assignments release: re-enables other assignments Hence, assignments in priority order: 1. force 2. assign (procedural continuous) 3. Procedural/continuous assignments

Overriding Parameters Useful Modeling Techniques

Overriding Parameters Two methods defparam statement Module instance parameter values Keyword: defparam Syntax: defparam <parameter_hierarchical_name>=<value>;

Overriding Parameters (cont’d) Module instance parameter values Parameters are overridden when the module is instantiated Syntax: <module_name> #(<param_vals>) <instance_name>;

Conditional Compilation and Execution Useful Modeling Techniques

Conditional Compilation Usage: To compile some part of code under certain conditions Keywords: ‘ifdef, `else, `endif

Conditional Execution Usage: To execute some part of code when a flag is set at runtime Used only in behavioral modeling Not contained in Verilog IEEE Standard, Keywords: $test$plusargs Syntax: $test$plusargs( <argument_to_check> )

Useful Modeling Techniques Useful System Tasks Useful Modeling Techniques

Useful System Tasks File Output Opening a file Syntax: <file_handle> = $fopen( “<file_name>” ); File_handle is a 32 bit value, called multi-channel descriptor Only 1 bit is set in each descriptor Standard output has a descriptor of 1 (Channel 0)

Useful System Tasks File Output (cont’d) Writing to files $fdisplay, $fmonitor, $fwrite, $fstrobe Syntax: $fdisplay(<handle>, p1, p2,…, pn); Closing files $fclose(<handle>);

Useful System Tasks Random Number Generation Syntax: $random; $random(<seed>); Returns a 32 bit random value

Useful System Tasks Initializing Memory from File Keywords: $readmemb, $readmemh Syntax: $readmemb(“<file_name>”, <memory_name>); $readmemb(“<file_name>”, <memory_name>, <start_addr>); $readmemb(“<file_name>”, <memory_name>, <start_addr>,<finish_addr>);

Useful System Tasks Value Change Dump (VCD) File ASCII file containing information on Simulation time Scope and signal definitions Signal value changes Keywords $dumpvars $dumpfile $dumpon $dumpoff $dumpall

Today Summary Reviewed some modeling techniques useful in various applications.

Complementary Notes Assignment 7 (Optional, Extra Score) Chapter 9: All exercises with ModelSim, except for 3 and 5 3 and 5 in paper and pencil Due date: Saturday, Day 22nd Lab. Final Project Announce your group members and tart your work

Complementary Notes (cont’d) Don’t forget to subscribe to course mailing list: ce493list