Skip to content
asicguru.tech@gmail.com
REGISTER LOGIN
AsicGuru Ventures
  • All Courses
  • CONTACT
  • GALLERY
  • HOME
  • Tutorials

0

Verilog Tutorial

17
  • Verilog Introduction
  • Lexical Tokens
  • Gate-Level Modelling
  • Data Types
  • Operators
  • Operands
  • Modules
  • Behavioral Modeling
  • Timing Controls
  • Procedures: Always and Initial Blocks
  • Functions
  • Tasks
  • Component Inference
  • Finite State Machines.
  • Compiler Directives
  • System Tasks and Functions
  • Test Benches

System Verilog

23
  • System Verilog Introduction
  • Data Types
  • Type Casting
  • Arrays
  • Associative Arrays
  • Dynamic Arrays
  • Queue
  • Operators
  • Procedural statements and Control flow
  • Classes
  • Inheritance
  • Encapsulation
  • This and Super operator
  • In-Line Constraints
  • Class Constraints
  • Virtual Classes
  • Parameterized Classes
  • Classes Summary
  • Singleton Classes
  • Functional Coverage Introduction
  • Covergroup
  • Tools
  • Books

Scripting

15
  • Introduction
  • Perl Tutorial
  • What is Perl
  • Perl: Syntax And Variable
  • Perl Strings
  • Perl Arrays
  • Perl Associative Arrays
  • If/While Syntax
  • File Input
  • Print Output
  • String Processing with Regular Expressions
  • Subroutines
  • Running External Programs
  • References
  • Terse Perl

Makefile

1
  • Makefile Tutorial
View Categories
  • Home
  • Tutorials
  • Verilog Tutorial
  • Compiler Directives

Compiler Directives

1 min read


Compiler directives are special commands, beginning with ‘, that affect the operation of the Verilog simulator. The Synopsys Verilog HDL Compiler/Design Compiler and many other synthesis tools parse and ignore compiler directives, and hence can be included even in synthesizable models. Refer to Cadence Verilog-XL Reference Manual for a complete listing of these directives. A few are briefly described here.


Time Scale
`timescale specifies the time unit and time precision. A time unit of 10 ns means a time expressed as say #2.3 will have a delay of 23.0 ns. Time precision specifies how delay values are to be rounded off during simulation. Valid time units include s, ms, μs, ns, ps, fs. Only 1, 10 or 100 are valid integers for specifying time units or precision. It also determines the displayed time units in display commands like $display

   Syntax
     `timescale time_unit / time_precision; 
Verilog Compiler directives Example

Macro Definitions
A macro is an identifier that represents a string of text. Macros are defined with the directive `define, and are invoked with the quoted macro name as shown in the example.

Syntax     `define macro_name text_string;
     . . . `macro_name . . . 
Verilog Macro Definitios Example

Include Directive
Include is used to include the contents of a text file at the point in the current file where the include directive is. The include directive is similar to the C/C++ include directive.

   Syntax
     `include file_name; 
Verilog Include directives Example
Updated on May 4, 2025

What are your Feelings

  • Happy
  • Normal
  • Sad
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Finite State Machines.System Tasks and Functions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • May 2025

Categories

  • Slider Post
  • Uncategorized

Copyright @ Asicguru Ventures by Misbah WP | Proudly powered by WordPress