How to Introduce Delays Between Commands in Verilog?

  • Thread starter Thread starter BEEFCOPTER
  • Start date Start date
  • Tags Tags
    Beginners
Click For Summary
SUMMARY

The discussion focuses on introducing delays between commands in Verilog, specifically requiring a 2-second pause between each command within a "begin...end" block. The solution involves defining a counter synchronized with the clock and implementing logic for reset/start and terminal count detection. This approach ensures precise timing control for sequential command execution in Verilog.

PREREQUISITES
  • Basic understanding of Verilog syntax and structure
  • Knowledge of digital design concepts, including clocks and counters
  • Familiarity with simulation tools for Verilog, such as ModelSim or Vivado
  • Understanding of timing analysis in digital circuits
NEXT STEPS
  • Research how to implement a clocked counter in Verilog
  • Learn about Verilog's timing control statements, such as #delay
  • Explore the use of finite state machines (FSM) for sequential logic
  • Study examples of Verilog testbenches to simulate timing behavior
USEFUL FOR

This discussion is beneficial for beginner Verilog programmers, digital design engineers, and anyone looking to implement timed sequences in hardware description languages.

BEEFCOPTER
Messages
5
Reaction score
0
Ok, I am extremely new at verilog and have a very basic question. forgive how elementary this is. I have about 5 commands between a "begin --- -- -- -- end" scenario, but what I need is for it to lag about 2 seconds between each command ie, execute a, wait 2 seconds, execute b, wait 2 seconds, execute c.. and so on. I am just wondering the easiest way to do this. Any general pointing in the right direction would be appreciated. Thanks!
 
Physics news on Phys.org
BEEFCOPTER said:
Ok, I am extremely new at verilog and have a very basic question. forgive how elementary this is. I have about 5 commands between a "begin --- -- -- -- end" scenario, but what I need is for it to lag about 2 seconds between each command ie, execute a, wait 2 seconds, execute b, wait 2 seconds, execute c.. and so on. I am just wondering the easiest way to do this. Any general pointing in the right direction would be appreciated. Thanks!

You need to define a counter with clock, and define the logic for the reset/start and terminal count detection.
 

Similar threads

Replies
1
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K