Home / Learn Verilog / integer, time and real
integer, time and real
Variable types for testbenches.
In shortVariable types for testbenches.
What's actually going on
Definition
integer is a 32-bit signed variable, time a 64-bit unsigned, real floating point.
Why you need this
Used for loops and measurements in testbenches; not for RTL signals.
How it works
Use $time to read simulation time.
Where you'll see this
- Everyday RTL design
- FPGA and ASIC projects
- Testbenches and debugging
Try it
Measure a delayVerilog: edit and run
integer can be negative.
Test what you just read
1. integer is...
Signed 32-bit variable.