Summary of Timescale problem
- What is 1ps equal to?
- What does timescale 1ns 1ps mean?
- What is the timescale in SV?
- What is $time in SystemVerilog?
Search Results
AI Overview
AI Overview
1ps most commonly refers to
1 picosecond, which is one trillionth (
10
-12
1
0
−
1
2
) of a second. In technical contexts, particularly hardware description languages like Verilog/SystemVerilog, 1ps represents a precise unit of time used for simulation delays and time precision.
Key meanings of 1ps:
Time Unit:
1
ps
=
0.000
000
000
001
1
p
s
=
0
.
0
0
0
0
0
0
0
0
0
0
0
1
seconds.
Simulation Precision (Verilog): Used in `timescale 1ns/1ps to define that simulation times are measured in nanoseconds but rounded to the nearest picosecond.
Measurement: It is commonly used to measure extremely fast, high-frequency events.
Other Usage: 1PS Limited is also a UK company specializing in, payroll, invoice, and employment services.
What is 1ps? Picoseconds and More in Verilog Timescale
Sep 5, 2025 — 1ps stands for 1 picosecond. The abbreviation “ps” means picosecond, or 1/1012 (1 trillionth) of a second. In the programming lang…
wikiHow
Picosecond – Wikipedia
A picosecond (abbreviated as ps) is a unit of time in the International System of Units (SI) equal to 10−12 or 1⁄1 000 000 000 000…
Wikipedia
Timeslot – SystemVerilog – Siemens Verification Academy
Nov 26, 2014 — You can think of each queue for a single time as a timeslot. A `timescale 1ns/1ps directive means that all the delays that follow …
Siemens Verification Academy
Show all
Show more
i trying to understand the timescale feature using the below code
#################################################
module timing;
`timescale 1ns/1ps
initial begin
$timeformat(-9, 3, "ns", 8);
#1 $display("%t", $realtime); // 1.000ns
#2ns $display("%t", $realtime); // 3.000ns
#0.1ns $display("%t", $realtime); // 3.100ns
#41ps $display("%t", $realtime); // 3.141ns
end
endmodule
#################################################
after compiling and simulating using the below commands on Questa 10.3
vlog -reportprogress 300 -work work timing.sv
vsim -gui work.timing
run
i get the below result:
1.000ns
3.000ns
3.000ns
3.000ns
is that related to timescale or simulation options?
In reply to moustafaali:
Hi
`timescale must be used outside of design units. Directive will be ignored (IEEE Std 1364-2005). Try keeping it outside of design
In reply to srikanth_6313:
i tried that using the below “code 1” but nothing appeared on the result with no errors and no warnings.
also i tried the below “code 2” using timeunit 1ns; and timeprecision 1ps; but also gave no results, i mean be no results that the $display function not return anything in the transcript
//code 1
`timescale 1ns/1ps
module timing;
initial begin
$timeformat(-9, 3, "ns", 8);
#1.0ns $display("%t", $realtime); // 1.000ns
#2.0ns $display("%t", $realtime); // 3.000ns
#0.1ns $display("%t", $realtime); // 3.100ns
#41ps $display("%t", $realtime); // 3.141ns
end
endmodule
//code 2
module timing;
timeunit 1ns;
timeprecision 1ps;
initial begin
$timeformat(-9, 3, "ns", 8);
#1 $display("%t", $realtime); // 1.000ns
#2ns $display("%t", $realtime); // 3.000ns
#0.1ns $display("%t", $realtime); // 3.100ns
#41ps $display("%t", $realtime); // 3.141ns
end
endmodule
In reply to moustafaali:
Use the vsim command
run -all or
run 10 ns.
Both codes give me the same results
# 1.000ns
# 3.000ns
# 3.100ns
# 3.141ns
In reply to moustafaali:
I am running Code 1, and getting the correct output. What run commands are you using?
// Code 1
`timescale 1ns/1ps
module timing;
initial begin
$timeformat(-9, 3, "ns", 8);
#1.0ns $display("%t", $realtime); // 1.000ns
#2.0ns $display("%t", $realtime); // 3.000ns
#0.1ns $display("%t", $realtime); // 3.100ns
#41ps $display("%t", $realtime); // 3.141ns
end
endmodule
Output --
# run -all
# 1.000ns
# 3.000ns
# 3.100ns
# 3.141ns
# quit -f
In reply to dave_59:
thanks for your feedback, and excuse me for that mistake because i used to run using “run”.
it seem that i forget to update the run time default to 100ns instead of 100ps.
because after change the time scale the run time changed to 100ps.