Verilog is a HDL (hardware description language) used to model electronic systems. We usually use it during design of a digital circuit and verification of different kinds of circuits (digital, analog and mixed-signal circuits as well).
One of the most important features of a Verilog simulation is its timescale, since there are not any time delays in it by default. Verilog timescale specifies the time unit for the delays with their precision, as it is shown on its syntax below:
‘timescale <time unit>/<time precision>
Time unit will be used as a reference time unit for all delays which are used in the design for purposes of simulation.
Time precision – it describes the minimum delay while conducting the simulation, or it tells us how many decimal points the time unit will have.
Verilog timescale’s key feature is the range of time unit:
1) second [s]
2) millisecond [ms]
3) microsecond [us]
4) nanosecond [ns]
5) picosecond [ps]
6) femtosecond [fs]
For example, when the timescale syntax is specified like this: time unit 1ns, time precision 1ps, we have:
‘timescale 1ns/1ps
1ps = 0.001 ns (it is the minimum delay we can have in this example)
#1 // = 1ns delay
#1.001; // = a valid delay (1.001ns)
#1.0001; // = taken as 1.000 ns, because it exceeds the decimal points set by the time precision value
One of the most important features of a Verilog simulation is its timescale, since there are not any time delays in it by default. Verilog timescale specifies the time unit for the delays with their precision, as it is shown on its syntax below:
‘timescale <time unit>/<time precision>
Time unit will be used as a reference time unit for all delays which are used in the design for purposes of simulation.
Time precision – it describes the minimum delay while conducting the simulation, or it tells us how many decimal points the time unit will have.
Verilog timescale’s key feature is the range of time unit:
1) second [s]
2) millisecond [ms]
3) microsecond [us]
4) nanosecond [ns]
5) picosecond [ps]
6) femtosecond [fs]
For example, when the timescale syntax is specified like this: time unit 1ns, time precision 1ps, we have:
‘timescale 1ns/1ps
1ps = 0.001 ns (it is the minimum delay we can have in this example)
#1 // = 1ns delay
#1.001; // = a valid delay (1.001ns)
#1.0001; // = taken as 1.000 ns, because it exceeds the decimal points set by the time precision value