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
  • Finite State Machines.

Finite State Machines.

1 min read

Finite State Machines. For synthesis
When modeling finite state machines, it is recommended to separate the sequential current-state logic from the com- binational next-state and output logic.State Diagram 
for lack of space the outputs are not
shown on the state diagram, but are:
  in state0: Zot = 000,
  in state1: Zot = 101,
  in state2: Zot = 111,
  in state3: Zot = 001.
Verilog Finite State Machine Block DiagramUsing Macros for state definitionAs an alternative for-parameter state0=0, state1=1,
             state2=2, state3=3;
one can use macros. For example after the
definition below 2’d0 will be textually
substituted whenever `state0 is used.
 `define state0 2’d0
 `define state1 2’d1
 `define state2 2’d
 `define state3 2’d3;

When using macro definitionsone must put a back quote in front. For example:
case (state)
       `state0: Zot = 3’b000;
       `state1: Zot = 3’b101;
       `state2: Zot = 3’b111;
       `state3: Zot = 3’b001;Verilog Finite State Machine ExampleCounters
Counters are a simple type of finite-state machine where separation of the flip-flop generation code and the next-state generation code is not worth the effort. In such code, use the nonblocking “<=” assignment operator.  Binary Counter
    Using toggle flip-flopsVerilog Counter Block DiagramVerilog Counter Example
Shift Registers
Shift registers are also best done completely in the flip-flop generation code. Use the nonblocking “<=” assignment operator so the operators “<< N” shifts left N bits. The operator “>>N” shifts right N bits.Shift RegisterVerilog Shift Register Block DiagramLinear-Feedback Shift RegisterVerilog Linear-Feedback Shift Register Block Diagram Verilog Shift Register Example
Verilog Linear-Feedback Shift Register Example
Updated on May 4, 2025

What are your Feelings

  • Happy
  • Normal
  • Sad
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Component InferenceCompiler Directives

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