Ready-to-run snippets

Code Examples

Ready-to-run Verilog, SystemVerilog, and UVM examples. Click any to open it live in the IDE.

← All examples

Verilog Timescale Scope

Verilog Timing & Delays

Verilog Timescale Scope — a ready-to-run Verilog example.

Open in IDE
Related tutorial:
testbench.v
`timescale 1ns/1ps

module tb;
  des m_des();
  alu m_alu();
  
  initial begin
    $printtimescale(tb);
    $printtimescale(tb.m_alu);
	$printtimescale(tb.m_des);
  end
endmodule
file_alu.v
module alu;
endmodule
file_des.v
`timescale 1ns/10ps

module des;
  
endmodule
Admin mode — edit and delete controls are visible on each row. Use the IDE to add new snippets via File → Save as Snippet.