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

PD: 16x16 Multiplier (about 1,600 cells)

Verilog Physical Design

A registered 16x16 multiplier: a bigger design for floorplan, routing-layer and placement experiments; fits the free PnR cell limit.

Open in IDE
design.v
module mult16 (
  input             clk,
  input      [15:0] a,
  input      [15:0] b,
  output reg [31:0] p
);
  reg [15:0] ra, rb;
  always @(posedge clk) begin
    ra <= a;
    rb <= b;
    p  <= ra * rb;
  end
endmodule
constraints.sdc
create_clock -name clk -period 10.0 [get_ports clk]
set_input_delay 2.0 -clock clk [get_ports {a* b*}]
set_output_delay 2.0 -clock clk [get_ports p*]
Admin mode — edit and delete controls are visible on each row. Use the IDE to add new snippets via File → Save as Snippet.