Tutorial: build a block and place it in a chip
In this tutorial you build a small 4-bit adder, take it all the way to a finished layout, and then reuse that layout as one block inside a bigger chip. It takes about fifteen minutes and three runs. You type two short Verilog files and a testbench; Vulkos writes the rest.
What you will build#
Two projects:
- Adder block: one module,
adder4, that adds two 4-bit numbers. You harden it on its own. Hardening means running the full flow so the design becomes a physical layout. - Accumulator chip: a module that keeps a running 8-bit total. It does not contain an adder of its own. It places the finished
adder4layout and wires up to it.
A hardened block used this way is called a macro. The point is that the bigger design does not build the block again: it drops in the layout you already checked. Real chips are assembled like this from memories, processor cores and other large pieces.
Part 1: build the block#
- 1
Create a blank chip project
Go to My Work and choose Create project, then Chip project. Name itAdder block, leave Start with on Blank, and press Create project.

- 2
Add the Verilog
Press the New file button above the file list, typesrc/adder4.vand press Enter. Paste this in:
1// A 4-bit adder. This is the block we will harden and reuse.
2module adder4 (
3 input wire [3:0] a,
4 input wire [3:0] b,
5 output wire [4:0] sum
6);
7
8 assign sum = a + b;
9
10endmoduleThe result is five bits wide because two 4-bit numbers can add up to 30, which needs a fifth bit. That fifth bit is the carry.
- 3
Create the config
Open the File menu and choose LibreLane config. Vulkos writesconfig.jsonfrom the design in the workspace, so it already names your module and file:
1"DESIGN_NAME": "adder4",
2"VERILOG_FILES": [
3 "dir::src/adder4.v"
4],- 4
Choose LibreLane and run
Open the Tools menu and choose LibreLane. The green button at the top right now reads Run LibreLane. Press it.

The terminal lists each stage as it finishes: lint, synthesis, floorplanning, placement, routing and the sign-off checks. A design this small takes about a minute.

When the badge reads Completed, the block is hardened. Its layout is 161 by 111.52 microns, the smallest die size the template offers.
Part 2: save it to My macros#
The finished run holds everything another design needs to place this block: the layout, an outline of its pins, a gate-level netlist and timing data. You do not download or upload any of it.
- 1
Open the run's Analysis page
Open the Inspect menu and choose Open analysis. - 2
Save the block
Press Save to My macros. After a few seconds it confirms the block is saved, under the name of its top module.

Part 3: start the chip#
- 1
Create a second blank project
Back in My Work, create another blank chip project and name itAccumulator chip. - 2
Add the top-level Verilog
Createsrc/accumulator.vwith this:
1// Adds the 4-bit input to a running 8-bit total on every clock.
2// The low four bits are added by adder4, a block hardened in its own project.
3module accumulator (
4 input wire clk,
5 input wire rst,
6 input wire [3:0] in,
7 output reg [7:0] total
8);
9
10 wire [4:0] sum;
11
12 // The hardened block. Its layout comes from config.json, under MACROS.
13 adder4 u_adder (
14 .a (total[3:0]),
15 .b (in),
16 .sum (sum)
17 );
18
19 always @(posedge clk) begin
20 if (rst) total <= 8'd0;
21 // sum[4] is the carry out of the low four bits.
22 else total <= {total[7:4] + {3'd0, sum[4]}, sum[3:0]};
23 end
24
25endmoduleNotice that adder4 is used here but not defined here. The instance is called u_adder; remember that name, because the config places the block by it.
- 3
Add a testbench
Createtb/accumulator_tb.v:
1`timescale 1ns/1ps
2
3module accumulator_tb;
4 reg clk = 0;
5 reg rst = 1;
6 reg [3:0] in = 0;
7 wire [7:0] total;
8
9 accumulator dut (.clk(clk), .rst(rst), .in(in), .total(total));
10
11 always #5 clk = ~clk;
12
13 initial begin
14 #12 rst = 0;
15 in = 4'd9; #10; // total = 9
16 in = 4'd9; #10; // total = 18, a carry out of the low four bits
17 in = 4'd15; #10; // total = 33
18 if (total === 8'd33) begin
19 $display("PASS: total = %0d", total);
20 $display("VULKOS_RESULT: PASS");
21 end else begin
22 $display("FAIL: total = %0d, expected 33", total);
23 $display("VULKOS_RESULT: FAIL");
24 end
25 $finish;
26 end
27endmodule- 4
Create the config and make the die bigger
Choose File, then LibreLane config. The chip has to be bigger than the block it holds, so changeDIE_AREAto the 2x2 tile. The config lists every tile size just below; copy the value from//DIE_AREA_2x2:
1"DIE_AREA": "0 0 334.88 225.76",Part 4: add the block#
- 1
Open My macros
Press Add macro, the blocks icon above the file list.

- 2
Add adder4
The dialog lists the blocks you have saved. Press Add besideadder4.

Vulkos now does four things, and tells you each one:

- Writes the block into config.json under
MACROS, with the path to each of its files. - Places it. It found the instance
u_adderin your Verilog and put it at[10, 10], ten microns in from the bottom left corner. - Connects its power. A line in
PDN_MACRO_CONNECTIONSties the block's power and ground pins to the chip's, and the power grid settings are adjusted so its straps reach the block. - Brings its Verilog into
macros/adder4/rtl/, so you can read it and simulate with it.
This is what was added to the config:
1"PDN_MACRO_CONNECTIONS": [
2 "u_adder VPWR VGND VPWR VGND"
3],
4"FP_PDN_MULTILAYER": 1,
5"FP_PDN_HPITCH": 55.76,
6"MACROS": {
7 "adder4": {
8 "gds": ["dir::macros/adder4/adder4.gds"],
9 "lef": ["dir::macros/adder4/adder4.lef"],
10 "nl": ["dir::macros/adder4/adder4.nl.v"],
11 "pnl": ["dir::macros/adder4/adder4.pnl.v"],
12 "lib": { "nom_tt_025C_1v80": ["dir::macros/adder4/lib/nom_tt_025C_1v80.lib"] },
13 "spef": { "nom_*": ["dir::macros/adder4/spef/nom.spef"] },
14 "instances": {
15 "u_adder": { "location": [10, 10], "orientation": "N" }
16 }
17 }
18}The real entry lists nine timing libraries and three parasitics files, one per process corner. They are shortened to one each here.

Why VERILOG_FILES did not change
VERILOG_FILES still lists only src/accumulator.v. That is deliberate. LibreLane must not build the adder a second time; it places the layout you already made. The copy under macros/adder4/rtl/ is for reading and for simulation only.Part 5: simulate the chip#
Check the design behaves before spending a run on the layout. The simulator compiles the block's Verilog along with yours, so the testbench drives the whole chip.
- 1
Run the testbench
Open Tools and choose Verilator, then press Simulate.

VERILATOR OUTPUT
PASS: total = 33
VULKOS_RESULT: PASS
- tb/accumulator_tb.v:25: Verilog $finishPart 6: build the chip#
- 1
Run LibreLane
Open Tools, choose LibreLane and press Run LibreLane. This run takes a little longer than the block did, about a minute and a half. - 2
Check the sign-off result
When the badge reads Completed, open the Signoff tab in the bottom panel.

- 3
Look at the layout
Open the Layout tab and choose Full screen.

The panel beside the layout says One macro: u_adder. The chip is 60 cells of its own plus one block it did not have to build.
Try moving the block
Changelocation under instances and run again. Keep a block either 10 microns from the left or right edge of the die, or well away from it. A small gap leaves a strip of cells too narrow for a power strap, and the run fails sign-off. See Where to put a block.Where to go next#
- Change the adder in the Adder block project, run LibreLane there, save it to My macros again, then choose Update in Add macro. Your placement is kept.
- Use the block twice: add a second
adder4instance to the Verilog, make the die wider, and choose Update. The second instance is placed beside the first.