PDF download Download Article
Learn the dos and don'ts for using 1 picosecond (1ps) in Verilog
PDF download Download Article

1ps is a unit of measurement in the Verilog timescale compiler directive. It stands for 1 picosecond, or 1 trillionth of a second. The `timescale directive, which determines the unit of time for a simulation and rounds the outputs, can be tricky, so keep reading to see how to set up a module and record outputs in Verilog.

1ps in Verilog Timescale

1ps stands for 1 picosecond, which is equal to 1 trillionth of a second, and refers to one unit in Verilog timescale. The `timescale directive is written as `timescale [time unit]/[resolution]. The first unit sets the timescale of the module, and the resolution sets how far the outputs are rounded.

Section 1 of 3:

What does 1ps mean?

PDF download Download Article
Section 2 of 3:

How to Use the Verilog Timescale Directive

PDF download Download Article
  1. In Verilog, the timescale directive is written as `timescale integer [time unit] / integer [resolution]. When choosing your units, always put the larger one first. The general time scale must be divisible by the resolution.[2]
    • The first unit is how time is measured, and the second is how precise your recordings are.[3]
    • The ` symbol, or backtick, lets the program know that you’re using a compiler directive. It introduces the `timescale directive, as well as `include, `resetall, `define, and others.[4]
  2. Finish setting the timescale by choosing one of three integers to put before your units: 1, 10, or 100. By adding an integer you can control how much time makes up a single unit or how many units go into the resolution.
    • For example, if you write the directive `timescale 10ns / 1ns, then for every 10 nanoseconds the output value will be rounded to the nearest nanosecond.
    • A common timescale is 1ns / 1ps, which means at each nanosecond there is an output rounded to the nearest picosecond.
  3. Test benches run a simulation of your design, and check the outputs. Set up your module by writing:
    • `timescale [unit of time]/[unit of precision]
    • module tb;
    • reg val;
    • initial begin
    • val<=[where you want to start];
  4. To program when your data is recorded, write the operator #[real number] and then a function. The operator # (AKA the delay) is multiplied by the time unit, then rounded to the nearest time precision unit (resolution). For example, you could write
    • #5 $display (“T=%0t At time #5”, $realtime);
    • val<=1;
    • If your `timescale is 1ns/1ns, then your output would be 1(ns) * 5 = 5 since it’s rounded to the nearest nanosecond.
    • If your `timescale was 10ns/1ns, then your output would be 10(ns) * 5 = 50.
    • If your `timescale was 1ns/1ps, then your output would be 1000ps (AKA 1ns) * 5 = 5000 to convert it to picoseconds.
  5. To end the simulation, write #[real number] before the function $display (“T=%0t End of simulation”, $realtime); then write the codes “end,” then “endmodule”. “End” closes the block “initial begin,” and “endmodule” closes the “module” block.
    • Your entire simulation may look like this:
      • `timescale 1ns/1ps
      • module tb;
      • reg val;
      • initial begin
      • val<=0;
      • #1 $display (“T=%0 At time #1”, $realtime);
      • val<=1;
      • #5 $display (“T=%0t End of simulation”, $realtime);
      • end
      • endmodule
  6. Advertisement
Section 3 of 3:

Other Meaning of 1ps

PDF download Download Article
  1. Video games that are in first-person perspective are often called first-person shooters, more often abbreviated as FPS. Occasionally, they’re also abbreviated to “1ps.”
  2. Sometimes, IPS refers to a unit of measurement for acceleration, which is inches per second.[5] When it’s being used for a change in velocity (acceleration), it’s written as inches per second2.
  3. IPS (in-plane switching) monitors are a kind of LCD screen where liquid crystals are sandwiched between two planes of glass.[6]
  4. IPS can also mean “intrusion prevention systems,” which block attacks on networks and computers.[7]
  5. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement

About This Article

Luigi Oppido
Reviewed by:
Computer & Tech Specialist
This article was reviewed by Luigi Oppido and by wikiHow staff writer, Carmine Shannon. Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over 7 years. This article has been viewed 1,888 times.
How helpful is this?
Co-authors: 6
Updated: September 5, 2025
Views: 1,888
Categories: Programming
Thanks to all authors for creating a page that has been read 1,888 times.

Is this article up to date?

Advertisement