IP Blocks: What Arrives with a Block

No team designs every block of a chip. Most blocks arrive from somewhere else. Learn the three forms a block comes in, and what must arrive with it.

You Will Be Able To

  • Say what an IP block is, and why a chip is assembled from them.
  • Tell soft, firm and hard IP apart, and say what each fixes.
  • List the six kinds of file in a delivery, and test a claim of its document.
Lesson
S1.3
Time
22 min
Runs on
Your browser
Check
5 questions

A UART block arrives on Monday as one file of code. It simulates at once. On Friday the software team asks for its register addresses, and nobody has them.

Before You Start

You need the blocks of ap_soc and the word integration from S1.1. You need device registers from S0.2.

Five questions this page answers
Question
1What is an IP block, and why are chips assembled from them?
2What is delivered for a soft, a firm and a hard block?
3Which form can move to another factory, and which has known timing?
4Which six kinds of file make a complete delivery?
5How do you check a delivery before you build on it?

The Idea: Design Once, Use Many Times

ap_soc has about a dozen blocks. A team that designed all of them from nothing would need years. Real teams do not do that. They design a few blocks and reuse the rest.

A block that is designed once, and then used in many chips, is called an IP block. IP is short for intellectual property. The name says that the design itself is the thing of value. It can be sold, like a part.

So a chip team has two kinds of work. One is designing its own blocks. The other is receiving blocks and joining them. This page is about receiving. Two questions matter. In what form does the block arrive? And what else must arrive with it?

New Words

New words on this page
WordMeaning
IP blockA block designed once and reused in many chips. It may come from another company or another team.
IntegratorThe engineer or team that joins blocks into one chip.
RTLRegister transfer level: a circuit written as registers and the logic between them, in a language such as SystemVerilog.
SynthesisThe step where a tool turns RTL into logic gates and flip-flops.
NetlistA list of gates and flip-flops, and the wires that join them. It is the result of synthesis.
Physical layoutThe final drawing of a circuit: the exact shapes that the factory will make.
ProcessThe manufacturing recipe of one factory. It fixes how small and how fast a transistor can be.
Soft IPA block delivered as RTL.
Firm IPA block delivered as a netlist.
Hard IPA block delivered as a finished physical layout for one process.
Analog blockA block that works with voltages that vary smoothly, not with 0 and 1. The circuit that makes the clock is one.
ClaimOne statement of a document that a test can check.
ConstraintsA file that tells the tools how fast the clock is and when each input arrives.
Register descriptionA list of every register of a block: its offset, its fields and its value after reset.
Integration guideThe document that says how to connect, configure and start a block.

A transistor is the small switch that every gate is built from. Later tracks open it up. Here it is only the thing that a process makes.

One Picture: One Delivery, Six Kinds of File

What Crosses from One Team to the NextStep through the delivery. Each box in the middle is one kind of file.
  • Processor
  • Memory
  • Clock / reset
  • Peripheral
  • Debug
  • Bus
  • Power
  • Pads
What Crosses From One Team to the NextStep through the delivery. Each box in the middle is one kind of file. component IP team designs the blockonce and tests italone component Design files the circuit itself, asRTL, a netlist or aphysical layout component Constraints the clock speed andtiming the block wasbuilt for component Registerdescription every register:offset, fields, resetvalue component Tests test code, and thereport of what itchecked component Integration guide how to connect,configure and resetthe block component Other documents what the block does,its known faults, itsversion component Integrator joins the block to therest of the chip designtimingregistersevidencehow to joinwhat to expect
  1. component IP teamdesigns the block once and tests it alone
    • design → Design files
    • timing → Constraints
    • registers → Register description
  2. component Design filesthe circuit itself, as RTL, a netlist or a physical layout
  3. component Constraintsthe clock speed and timing the block was built for
  4. component Register descriptionevery register: offset, fields, reset value
  5. component Teststest code, and the report of what it checked
    • evidence → Integrator
  6. component Integratorjoins the block to the rest of the chip
  7. component Integration guidehow to connect, configure and reset the block
    • how to join → Integrator
  8. component Other documentswhat the block does, its known faults, its version
    • what to expect → Integrator
  1. The design files

    They are the circuit. Their form decides whether the block is soft, firm or hard.

  2. The constraints

    They state the clock speed the block was built for. The tools of the chip team read this file.

  3. The register description

    It lists every register of the block. The software team writes its code from this list.

  4. The tests

    They show what the IP team checked. The integrator can run them again after any change.

  5. The integration guide

    It tells the integrator which wire goes where, and in what order to start the block.

  6. The other documents

    They describe what the block does, which faults are known, and which version this is.

Read the diagram as text
  • IP team: designs the block once and tests it alone
  • Design files: the circuit itself, as RTL, a netlist or a physical layout
  • Constraints: the clock speed and timing the block was built for
  • Register description: every register: offset, fields, reset value
  • Tests: test code, and the report of what it checked
  • Integration guide: how to connect, configure and reset the block
  • Other documents: what the block does, its known faults, its version
  • Integrator: joins the block to the rest of the chip
  • IP team → Design files: design
  • IP team → Constraints: timing
  • IP team → Register description: registers
  • Tests → Integrator: evidence
  • Integration guide → Integrator: how to join
  • Other documents → Integrator: what to expect

Six kinds of file make one delivery. The integrator needs all six, not only the circuit.

The picture is the same for all three forms. Only the first box changes: it holds RTL, a netlist or a physical layout.

The Smallest Example, Worked by Hand: Sort Four Blocks

A circuit goes through three forms on its way to the factory. Synthesis turns RTL into a netlist. A later step turns the netlist into a physical layout. An IP block can be delivered at any of the three.

The three forms of an IP block
FormWhat arrivesStill openAlready fixed
SoftRTLthe process, the speed, the area, the shapeonly the behaviour
Firma netlistthe shape and the final timingthe gates
Harda physical layoutnothingthe process, the speed, the area, the shape

A soft block can be built for any process. A hard block exists for one process only.

Now sort four blocks that a chip like ap_soc needs. Ask one question of each: can ordinary logic gates build it well?

Four blocks, sorted
BlockCan gates build it well?Usual form
UART0Yes. It is counters and a shift register.soft
The processorYes. A small processor is ordinary logic.soft
SRAMNo. A memory needs its own tightly packed cells.hard
A padNo. It must drive a pin and survive the outside world.hard

The last column is common practice, not a rule from a standard. In this course the processor and UART0 of ap_soc are RTL, so they are soft.

The pattern is simple. Logic travels as soft IP. Anything that depends on the exact shapes of one process travels as hard IP.

The Rules

  1. Rule 1: Soft IP fixes the behaviour only.

    It is RTL. You may build it for any process. Its speed and area are unknown until you do.

  2. Rule 2: Hard IP fixes everything.

    It is a physical layout for one process. Its speed, area and shape are known. You cannot change it or move it.

  3. Rule 3: Firm IP sits between.

    It is a netlist. The gates are chosen. Their places on the chip, and so the final timing, are not.

  4. Rule 4: A delivery is complete only with all six kinds of file.

    They are the design files, constraints, register description, tests, integration guide and the other documents.

  5. Rule 5: Test the claims of the document before you build on the block.

    A short test of your own finds a wrong document on the first day, not in the last month.

Sources for These Rules

Hard, firm and soft blocks: Weste and Harris, CMOS VLSI Design, 4th edition, section 14.5.7. It also says why the quality of a block matters.

Where reused blocks enter the design flow: Mehta, ASIC/SoC Functional Design Verification, sections 15.2 and 15.4.

The list of six kinds of file, and the arrival test, are common practice. They are not taken from a library source.

IP-XACT is IEEE Std 1685. It is not in our library, so it is named below and not checked.

Now Run It: An Arrival Test

The lab at the end of this page receives a small block: a counter of clock edges. Its document makes three claims. The test code checks each claim against the block itself.

Three claims of the document
ClaimHow the test checks it
The count is 0 during reset.Hold reset, wait one edge, read the count.
The count rises by 1 at each edge with enable at 1.Give three such edges, read the count.
The count holds when enable is 0.Give two more edges with enable at 0, read again.
Recorded from the lab on Icarus.
count during reset: document says 0, block shows 0: agrees
count after 3 enabled edges: document says 3, block shows 3: agrees
count after 2 more edges with enable at 0: document says 3, block shows 3: agrees
arrival test: 3 of 3 claims agree

Rule 5 at work: three claims, three rows, all in agreement. The block may now be joined to the chip. This test did not prove the block correct. It proved that the document describes this block.

That difference matters. The IP team already tested the block. The arrival test asks a narrower question: did the right version arrive, with the right document?

The lab leaves things out. A real arrival check also runs the tests of the IP team, and synthesis with the delivered constraints.

Why It Is Built This Way

ChoiceWhat it buysWhat it costs
Buy or reuse a blockYears of design and testing are already done.You depend on a document you did not write.
Take it as soft IPIt moves to any process, and you may configure it.You must synthesize it, and its timing is your problem.
Take it as hard IPIts speed and area are known on the first day.The chip can then be made in one process only, and nobody can alter the block.

Most digital blocks are soft for the first reason. Memories, pads and analog blocks are hard, because gates cannot build them well.

The Trap: "It Simulates, So It Has Arrived"

Return to the UART of the opening. One file of RTL arrived, and it simulated. The team called the block delivered. Four of the six boxes of the picture were empty.

  1. No register description

    The software team guesses offsets from the RTL. One guess is wrong, and it is found weeks later.

  2. No constraints

    Nobody knows the clock speed the block was designed for. Synthesis reports a failure that the IP team never saw.

  3. No integration guide

    The block needs its reset held for a few clock cycles. The integrator learns this from a failing test.

The cure is a checklist on arrival, before any work depends on the block. Problem S1.3.3 gives you one to fill in.

At Scale

ap_socabout 12 blocks
A phone chip200 blocks

This section looks ahead. ap_soc has about a dozen blocks. The phone chip of module S10 uses 200 blocks.

  1. A description a tool can read

    With 200 blocks, nobody reads 200 documents by hand. Each block ships a file that tools can read: its connections, its registers and its settings.

  2. IP-XACT

    One standard format for that file is called IP-XACT. It is standard 1685 of IEEE, the body that publishes many electronics standards. This course names it and does not teach its syntax.

  3. Generated joins

    From those files, tools write the wiring between the blocks and the register maps. S10.12 shows how.

Try It

Run the lab. Match each printed row to one claim of the document.

Change the second claim to say 4 and run again. Count the rows that differ.

Edit the block so that it counts by 2. Predict every row before you run it.

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: count during reset: document says 0, block shows 0: agrees count after 3 enabled edges: document says 3, block shows 3: agrees count after 2 more edges with enable at 0: document says 3, block shows 3: agrees arrival test: 3 of 3 claims agree

Check Yourself

Predict the outputThis delivery claims a count of 4 after five enabled edges. What is the last line the lab prints?
// A block arrives from another team. Before we use it, we test three claims of its document.
// ---- The IP as delivered: one file of RTL. We read its ports. We do not edit it. ----
module ip_tick_counter (
  input  logic       clk,
  input  logic       rst_n,      // reset, active at 0 (the n at the end means "active at 0")
  input  logic       enable,
  output logic [7:0] count
);
  always @(posedge clk or negedge rst_n)
    if (!rst_n)      count <= 8'd0;
    else if (enable) count <= count + 8'd1;
endmodule

// ---- The arrival test: test code, written by the team that receives the block ----
module tb;
  logic clk = 0;
  always #5 clk = ~clk;
  logic rst_n = 0, enable = 0;
  logic [7:0] count;
  ip_tick_counter u_ip (.clk(clk), .rst_n(rst_n), .enable(enable), .count(count));

  int agree = 0;
  // One claim of the document: print what it says, what the block shows, and whether they agree.
  task claim(input string text, input logic [7:0] want);
    if (count === want) begin
      $display("%s: document says %0d, block shows %0d: agrees", text, want, count);
      agree++;
    end else
      $display("%s: document says %0d, block shows %0d: DIFFERS", text, want, count);
  endtask

  initial begin
    @(posedge clk); #1 claim("count during reset", 0);
    rst_n = 1; enable = 1;
    repeat (5) @(posedge clk);
    #1 claim("count after 5 enabled edges", 4);
    enable = 0;
    repeat (2) @(posedge clk);
    #1 claim("count after 2 more edges with enable at 0", 4);
    $display("arrival test: %0d of 3 claims agree", agree);
    $finish;                      // $finish ends the simulation
  end
endmodule
ConceptWhat makes a block an IP block?
ConceptWhat is delivered for a firm block?
ConceptWhich form has known speed and area on the day it arrives?
ConceptThe software team cannot write its code for a new block. Which file is most likely missing?

Common Mistakes

Wrong Call a block delivered when its RTL simulates.

Software, synthesis and integration each need a file that the RTL does not contain.

Fix Check all six kinds of file on arrival.

Wrong Expect a hard block to move to a new process.

A physical layout is drawn for the shapes of one process.

Fix Plan to replace every hard block when the process changes.

Wrong Trust the timing of a soft block from its document.

RTL has no timing until it is built for a process.

Fix Synthesize it with the delivered constraints and read the report.

Remember

  • An IP block is designed once and reused in many chips.
  • Soft IP is RTL, firm IP is a netlist, hard IP is a physical layout for one process.
  • Soft moves anywhere and has unknown timing; hard has known timing and cannot move.
  • A delivery has six kinds of file: design, constraints, registers, tests, guide and documents.
  • Test the claims of the document on arrival, before anything depends on the block.

Practice

Report a problem with this page