How to Introduce Delays Between Commands in Verilog?

  • Thread starter BEEFCOPTER
  • Start date
  • Tags
    Beginners
Then use the counter to generate a delay signal that can be used to delay the execution of the commands in the "begin --- -- -- -- end" scenario. You can also use a system timer to generate the delay signal. Additionally, you can explore using the "wait" statement to introduce a delay in the execution of the commands.
  • #1
BEEFCOPTER
5
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
  • #2
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.
 

1. What is Verilog?

Verilog is a hardware description language used in the design, simulation, and verification of digital circuits. It is used to describe the behavior of electronic systems and is commonly used in the design of integrated circuits and field-programmable gate arrays (FPGAs).

2. What is the difference between Verilog and VHDL?

Verilog and VHDL are both hardware description languages used in digital circuit design. The main difference between the two is that Verilog is based on the C programming language, while VHDL is based on the Ada programming language. Verilog is often preferred for its more concise syntax and easier learning curve, while VHDL is known for its strong type checking and suitability for complex designs.

3. How do I write a basic Verilog module?

To write a basic Verilog module, you first need to declare the inputs and outputs using the input and output keywords, respectively. Then, you can define the behavior of the module using a combination of logic gates, assignments, and conditional statements. Finally, you need to instantiate the module in a testbench and simulate it to see the desired behavior.

4. Can Verilog be used for both combinational and sequential logic designs?

Yes, Verilog can be used for both combinational and sequential logic designs. Combinational logic designs use only logic gates and do not have any memory elements, while sequential logic designs use memory elements such as flip-flops to store information and produce outputs based on both current and past inputs.

5. Is Verilog used in industry?

Yes, Verilog is widely used in industry for digital circuit design and verification. It is used by companies in various fields such as electronics, telecommunications, and aerospace to design and test complex digital systems. It is also a popular language in academia for teaching digital design and computer architecture.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
Replies
7
Views
661
  • Electrical Engineering
Replies
9
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
730
  • Electromagnetism
Replies
5
Views
883
  • Programming and Computer Science
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
Back
Top