From Board to Chip: What an SoC Is, and Why

A system on chip is a whole circuit board redrawn on one piece of silicon. Meet its eight kinds of block, and the reasons for building it that way.

You Will Be Able To

  • Say what an SoC is, and why a product uses one.
  • Name the eight kinds of block in an SoC and the job of each.
  • Tell a microcontroller from an application processor, and an ASIC from an FPGA.
Lesson
S1.1
Time
25 min
Runs on
Your browser
Check
5 questions

Open an old music player and you find a board with a dozen chips: a processor, two memories and many more. Open a new one and you find a single chip the size of a fingernail. Everything on the old board is now inside it.

Before You Start

You need the first five lessons of module S0. They cover the parts of a computer, memory-mapped I/O, a bus, APB and the two buses with their bridge.

Five questions this page answers
Question
1What is a system on chip, in one sentence?
2What does putting a whole board on one chip buy, and what does it cost?
3What are the eight kinds of block in an SoC, and what is the job of each?
4How does a microcontroller differ from an application processor?
5What do ASIC and FPGA mean, and why is that a different question from the last one?

The Idea: A Whole Board on One Chip

A system on chip, or SoC, is a complete computer built on one piece of silicon. It holds the processor, the memory, the bus and the devices of module S0. It also holds what any chip needs in order to run at all. That means a clock and a reset, the signal that forces every flip-flop to a known start. It also means power control, a way for an engineer to look inside, and connections to the outside.

Earlier products spread those parts over a board, as separate chips joined by copper tracks. An SoC draws the same parts side by side on one chip. Joining them there is called integration.

Why do it? A chip is smaller than a board. Once the design is paid for, each copy is cheaper. Wires inside a chip are far shorter than tracks on a board, so signals arrive sooner and waste less energy. The costs are just as real, and this page lists them further down.

New Words

New words on this page
WordMeaning
System on chip (SoC)A complete computer on one piece of silicon.
ResetA signal that forces every flip-flop to a known starting value.
BlockOne part of a chip with one job, designed and tested by itself: a processor, a memory, a device.
IntegrationJoining blocks into one working chip: the bus, the clock, the reset and every other wire between them.
Package and pinThe package is the plastic case around the silicon. Its metal pins are soldered to a board.
PadThe circuit at the edge of the silicon that joins one inside signal to one pin.
Pin muxThe circuit that chooses which device a shared pad serves. "Mux" is short for multiplexer.
Microcontroller (MCU)A small SoC whose program and data fit in memory on the chip itself.
Operating systemA large program that runs many other programs and shares the chip between them. A phone has one.
Application processorA large SoC that runs an operating system and needs far more memory than fits on the chip.
ASICApplication-specific integrated circuit: a chip whose circuit is fixed for good when it is made.
FPGAField-programmable gate array: a ready-made chip holding thousands of small logic cells and the wires between them. A file loaded at power-on sets what each cell does and which wires join.

One Picture: The Eight Boxes

The Eight Kinds of Block in an SoCStep through the boxes. The first four are the computer of module S0. The last four are what a chip needs around it.
  • Processor
  • Memory
  • Bus
  • Peripheral
  • Clock / reset
  • Power
  • Debug
  • Pads
The Eight Kinds of Block in an SoCStep through the boxes. The first four are the computer of module S0. The last four are what a chip needs around it. component Processor runs the program component Memory holds the program andits data component Bus carries every loadand store component Devices registers that touchthe world component Clock and reset one clock, one cleanstart component Power control switches parts of thechip off component Debug a door for theengineer component Pads the only way in or out load, storememory addressesdevice addressessignals to pinsclock, resetpower for every boxstop, look
  1. component Processorruns the program
    • load, store → Bus
  2. component Memoryholds the program and its data
  3. component Buscarries every load and store
    • memory addresses → Memory
    • device addresses → Devices
  4. component Devicesregisters that touch the world
    • signals to pins → Pads
  5. component Clock and resetone clock, one clean start
    • clock, reset → Bus
  6. component Power controlswitches parts of the chip off
    • power for every box → Clock and reset
  7. component Debuga door for the engineer
    • stop, look → Processor
  8. component Padsthe only way in or out
  1. Processor

    It runs the loop of S0.1: fetch, decode, execute. Everything else on the chip serves it or is reached by it.

  2. Memory

    It holds the program and the data. An SoC has at least one memory that keeps its content with the power off, such as a Boot ROM. It has at least one that can be written, such as SRAM.

  3. Bus

    Every load and store leaves the processor on the bus. A decoder on the bus picks the owner of the address, as in S0.2.

  4. Devices

    Each device is a set of registers with addresses. Writing one makes the device act. Reading one reports what the device sees.

  5. Clock and reset

    One block makes the clock for every flip-flop and starts every block from a known state. The picture shows one arrow; the real wires go to every box.

  6. Power control

    It switches off the electrical power that feeds unused parts of the chip, to save energy. It switches them back on when they are needed. The picture shows one arrow; power goes to every box.

  7. Debug

    It lets an engineer outside the chip stop the processor and read its registers and memory. A few pins are kept for that purpose.

  8. Pads

    A pad joins a signal inside the chip to a metal pin on the outside. Nothing enters or leaves the chip any other way.

Read the diagram as text
  • Processor: runs the program
  • Memory: holds the program and its data
  • Bus: carries every load and store
  • Devices: registers that touch the world
  • Clock and reset: one clock, one clean start
  • Power control: switches parts of the chip off
  • Debug: a door for the engineer
  • Pads: the only way in or out
  • Processor → Bus: load, store
  • Bus → Memory: memory addresses
  • Bus → Devices: device addresses
  • Devices → Pads: signals to pins
  • Clock and reset → Bus: clock, reset
  • Power control → Clock and reset: power for every box
  • Debug → Processor: stop, look

An architecture drawing, not a wiring diagram. Each arrow stands for many wires.

The eight kinds of block, and their names in ap_soc
Kind of blockIts job in one lineIn ap_soc, the chip of this trackLessons
ProcessorRuns the program.one processorS0.1
MemoryHolds the program and its data.Boot ROM and SRAMS0.2
BusCarries every load and store to the owner of its address.AHB for memory, APB for the device registers, and the bridge that joins themS0.3 to S0.5, S4
DevicesRegisters that touch the world.UART0, GPIO and othersS6, S7
Clock and resetMakes the clock and gives every block a clean start.one clock and reset blockS5
Power controlSwitches parts of the chip off and on.one power control blockS5
DebugLets an engineer stop the processor and look inside.one debug blockS8
PadsJoin inside signals to the pins of the package.sixteen pads that devices shareS7

The names Boot ROM, SRAM, UART0 and GPIO were introduced in S0.2. The two buses and the bridge are those of S0.5.

The first four rows are the computer you built in module S0. The last four are new. An SoC must carry them itself.

This page gives each box one sentence. That is enough to place it on the map. Each box has lessons of its own, listed in the last column, and how it works inside is left to them.

The Smallest Example: One Letter Crosses the Chip

To see the boxes work together, follow one letter. A program wants the letter h to appear on a screen wired to the chip. Letters are stored as numbers, and the number for h is 0x68. That numbering of letters is called ASCII.

The letter h, box by box
StepWhat happensWhich box
1Memory holds the number 0x68 in one box. It also holds two instructions: load that box into a register, then store the register to address 0x1000_0000.Memory
2The processor fetches those instructions and executes them.Processor
3The store travels on the bus: over AHB to the bridge, and then on APB. The decoders find the owner of 0x1000_0000: UART0.Bus
4UART0 takes 0x68 into its register, and sends it out one bit at a time.Devices
5A pad drives those bits onto a pin. The board carries them to the screen.Pads
allEvery step needs clock edges, a clean start and electrical power.Clock and reset, power control

Five boxes pass the letter along, and two more keep them alive. The debug box is how an engineer finds a step that failed.

The Rules

  1. Rule 1: One piece of silicon holds the whole computer.

    Processor, memory, bus and devices sit side by side, with no board between them.

  2. Rule 2: Every block is reached through the bus, at its addresses in one memory map.

    That one map is shared by the hardware team and the software team.

  3. Rule 3: Every flip-flop takes its clock and its reset from one block.

    No block starts before its clock runs and its reset has been released.

  4. Rule 4: A signal enters or leaves the chip only through a pad.

    A device that works perfectly is still silent if its pad is not connected to it.

  5. Rule 5: Blocks are built apart and then integrated.

    A fault in the joining can stop a chip whose blocks each work alone.

Sources for These Rules

The parts of a computer: the textbook "Computer Organization and Design" by Patterson and Hennessy, sections 1.1 to 1.4.

Microcontrollers, and the SoC on a small computer board: the textbook "Digital Design and Computer Architecture" by Harris and Harris, section 9.3. ASIC and FPGA: the same book, sections 5.6.2, A.3 and A.4.

The eight-box grouping and the block names are the design of ap_soc, the chip of this track. Rule 5 is engineering experience, and has no single source.

Now Run It: The Path in One File

The lab at the end of this page sends five letters along that path. It is one file, built like the lab of S0.5. Test code, a bus-functional model, plays the processor and issues the five stores. Each store takes these hops.

  1. Test code

    The task send asks for one store to address 0x1000_0000, as the processor would.

  2. AHB

    The store has an address phase. The AHB decoder sees an address that starts 0x1000 and selects the bridge.

  3. The bridge

    The bridge turns the AHB data phase into an APB setup phase and an access phase. AHB waits one cycle.

  4. APB

    The APB decoder looks at the next hex digit and raises the select of UART0.

  5. UART0

    At the transfer edge UART0 takes the low eight bits into its data register. The lab prints one row.

Printed by the lab. The three rows that start with e show the wires while the first letter crosses. A "UART0 takes" row is printed each time UART0 takes a byte into its register. Numbers are in hexadecimal, without the 0x. The last row lists the bytes in order, as letters.
e1 haddr=10000000 hwdata=00000000 hready=1 | psel_uart=0 penable=0 | AHB address phase
e2 haddr=10000000 hwdata=00000068 hready=0 | psel_uart=1 penable=0 | AHB data phase waits: the bridge runs the APB setup phase
e3 haddr=10000000 hwdata=00000068 hready=1 | psel_uart=1 penable=1 | AHB data phase ends: the bridge runs the APB access phase
UART0 takes 68 (h)
UART0 takes 65 (e)
UART0 takes 6c (l)
UART0 takes 6c (l)
UART0 takes 6f (o)
console=hello

Rule 2 at work: all five stores go to one address, 0x1000_0000, and all five reach UART0. The rows e1 to e3 are the three hops of the first store: address phase, setup phase, access phase. The two rows with 6c are two separate stores of the letter l.

Be clear about what the lab shows. It is a small model of the path, with the real addresses of ap_soc. It has no processor and no memory, and its bridge is a few lines. It stops where UART0 takes the byte into its register: the first half of step 4. A byte in the register is not yet a letter on the screen.

The next lesson, One Access, End to End, runs one access through the full blocks of ap_soc.

Why It Is Built This Way

One chip against a board of chips
What one chip buysWhat it costs
SizeOne small part where a board held many.Only so much fits. Large memories still need chips of their own.
CostEach copy is cheap once the design is paid for.The design itself is very expensive, so it pays only at high volume.
Speed and energyShort wires: signals arrive sooner and waste less energy.All the heat is in one small place, which is hard to cool.
Finding faultsFewer soldered joints to fail.No measuring instrument can touch a wire inside. A design mistake needs new silicon.

Two Separate Questions: Which Kind of SoC, and Which Kind of Silicon

People often mix up two choices. The first is what the product needs from its chip.

Microcontroller (MCU)Application processor
Typical producta door sensor, a washing machine, a car keya phone, a tablet, a car dashboard
Softwareone fixed programan operating system and many programs
Memoryall on the chip, because the program is smallfar too much to fit: mostly in separate memory chips
Powercan pause between jobs and use almost no powerruns fast on a small battery, so it must switch unused parts off

Both are SoCs. ap_soc, the chip of this track, is a microcontroller.

The second choice is how the silicon is made. An ASIC is made for one design, and its circuit can never change. An FPGA is bought ready-made, and its circuit is loaded afterwards, so it can be replaced even after the product is sold. A cell that can act as any small gate is larger and slower than a gate made for one job. So an FPGA costs more for each copy and runs slower. An ASIC costs a great deal before the first copy exists.

The two choices are independent. A microcontroller design can be made as an ASIC or loaded into an FPGA. Most SoCs sold in large numbers are ASICs.

The Trap: Stopping at the Register

It is the first day with a new chip. UART0 takes 0x68, exactly as above, and the screen stays blank. Nothing is wrong with the processor, the bus or UART0. The fault is further out.

  1. Is UART0 switched on?

    Many devices have an "enable" bit in one of their registers. With it off, the device still takes the byte into its register, and sends nothing.

  2. Does UART0 own the pad?

    Pads are scarce, so devices share them. The pin mux chooses. If it gives the pad to another device, a perfect UART0 is silent. Rule 4.

  3. Is the pad driving?

    A pad drives its pin only while a setting called its output enable is on. With that off, the pad only listens.

Each check moves one box outward along the path of the letter. Integration faults are found that way.

At Scale

ap_soc~12 blocks
Phone-class SoChundreds of blocks

This section looks ahead. ap_soc has about a dozen blocks. A phone chip has hundreds, and the same eight kinds.

  1. One map, generated

    With hundreds of blocks, the memory map lives in one file. The decoder and the software addresses are both built from it, so they cannot disagree.

  2. The catch

    If that one file is wrong, hardware and software agree with each other and are both wrong. Large teams test the map against a list written separately.

Try It

Run the lab. Match the five "UART0 takes" rows to the five letters.

Change the five letters to five of your own. Predict the console row before you run it.

Swap the order of two of the stores. Predict the console row.

Change UART0_DATA to 0x1000_1000. Predict which select rises, and what the console row shows.

RUNIcarus Verilog · in your browser
Edit the code, then run it
Expected: e1 haddr=10000000 hwdata=00000000 hready=1 | psel_uart=0 penable=0 | AHB address phase e2 haddr=10000000 hwdata=00000068 hready=0 | psel_uart=1 penable=0 | AHB data phase waits: the bridge runs the APB setup phase e3 haddr=10000000 hwdata=00000068 hready=1 | psel_uart=1 penable=1 | AHB data phase ends: the bridge runs the APB access phase UART0 takes 68 (h) UART0 takes 65 (e) UART0 takes 6c (l) UART0 takes 6c (l) UART0 takes 6f (o) console=hello

Check Yourself

Predict the outputThis program makes six accesses. Five are stores of letters to UART0. One is a read of the GPIO pins, at address 0x1000_1004, which prints no row. What is the last line the lab prints?
// "chips" crosses a small model of ap_soc: five stores to the UART0 data register.
// The path is the one of lesson S0.5: manager, AHB, bridge, APB, device register.
module tb;
  logic hclk = 0;
  always #5 hclk = ~hclk;

  localparam UART0_DATA = 32'h1000_0000;   // from the ap_soc memory map (S0.2)
  localparam GPIO_PINS  = 32'h1000_1004;   // the GPIO register that reports the pins

  // ---- AHB wires, as in S0.5, now 32 bits wide ----
  localparam IDLE = 0, NONSEQ = 2;
  logic [1:0]  htrans = IDLE;
  logic [31:0] haddr  = 0;
  logic        hwrite = 0;
  logic [31:0] hwdata = 0;
  logic        hready;
  logic [31:0] hrdata;

  // What the bus remembers from the address phase, for the data phase.
  logic        d_busy  = 0;
  logic [31:0] d_addr  = 0;
  logic        d_write = 0;
  always @(posedge hclk) if (hready) begin
    d_busy <= (htrans == NONSEQ);  d_addr <= haddr;  d_write <= hwrite;
  end

  // The AHB decoder: every address that starts 0x1000 belongs to the bridge.
  wire sel_bridge = d_busy && (d_addr[31:16] == 16'h1000);

  // ---- The bridge: one AHB data phase becomes an APB setup phase and an access phase ----
  logic penable = 0;
  always @(posedge hclk) penable <= sel_bridge && !penable;
  // The APB decoder: one select for each device. The next hex digit picks the device.
  wire psel_uart = sel_bridge && (d_addr[15:12] == 4'h0);   // 0x1000_0xxx is UART0
  wire psel_gpio = sel_bridge && (d_addr[15:12] == 4'h1);   // 0x1000_1xxx is GPIO

  // ---- UART0: its data register is at offset 0. It takes a byte at the APB transfer edge. ----
  logic [7:0] tx_data = 0;             // the register
  string      console = "";            // a text variable: every byte taken so far, as letters
  always @(posedge hclk) if (psel_uart && penable && d_write && d_addr[11:0] == 0) begin
    tx_data <= hwdata[7:0];
    console = $sformatf("%s%s", console, hwdata[7:0]);   // add the letter to the text
    #1 $display("UART0 takes %h (%s)", tx_data, tx_data);   // just after the edge. %h prints hexadecimal, %s the letter
  end

  // ---- GPIO: the register at offset 4 reports the pins. Reading it sends no letter. ----
  logic [31:0] pins = 32'h0000_00A5;
  wire  [31:0] prdata = (psel_gpio && d_addr[11:0] == 12'h004) ? pins : 0;

  // ---- The way back to the manager ----
  assign hready = sel_bridge ? penable : 1;        // the bridge answers 0 during the setup cycle
  assign hrdata = prdata;

  // The manager: test code that plays the processor (a bus-functional model), as in S0.5.
  task send(input logic w, input logic [31:0] a, input logic [31:0] d);
    htrans = NONSEQ; haddr = a; hwrite = w;      // the address phase
    @(posedge hclk);
    while (!hready) @(posedge hclk);             // it ends at an edge that sees hready at 1
    #1 htrans = IDLE;
    if (w) hwdata = d;                           // the data phase begins
  endtask

  // Print the wires at each rising edge, but only while the first store crosses the chip.
  int    edge_no = 0;
  string where;                        // a text variable, for printing only
  always @(posedge hclk) begin
    if (!d_busy)       where = (htrans == NONSEQ) ? "AHB address phase" : "idle";
    else if (!penable) where = "AHB data phase waits: the bridge runs the APB setup phase";
    else               where = "AHB data phase ends: the bridge runs the APB access phase";
    if (edge_no >= 1 && edge_no <= 3)
      $display("e%0d haddr=%h hwdata=%h hready=%b | psel_uart=%b penable=%b | %s",
        edge_no, haddr, hwdata, hready, psel_uart, penable, where);
    edge_no++;
  end

  logic [7:0] text [5];                // five letters, stored as five numbers
  initial begin
    text[0] = "c"; text[1] = "h"; text[2] = "i"; text[3] = "p"; text[4] = "s";
    @(posedge hclk); #1;
    for (int i = 0; i < 5; i++) begin
      send(1, UART0_DATA, text[i]);              // 1 = write: one letter to 0x1000_0000
      if (i == 1) send(0, GPIO_PINS, 0);         // 0 = read: the GPIO pins, at 0x1000_1004
    end
    repeat (2) @(posedge hclk);        // let the last data phase finish
    #1 $display("console=%s", console);    // every byte UART0 took, in order
    $finish;                           // $finish ends the simulation
  end
endmodule
ConceptIn a product built around an SoC, which of these is inside the chip?
ConceptUART0 takes the byte into its register, but its pad is set to serve another device. What reaches the pin?
ConceptA thermostat runs one fixed program that fits in on-chip memory. Which kind of SoC suits it?
ConceptWhat does an FPGA offer that an ASIC cannot?

Common Mistakes

Wrong Treat the processor as the whole chip.

A processor alone cannot keep a program, or move one bit to a pin.

Fix Name all the boxes a signal passes through: memory, bus, device, pad.

Wrong Take a byte in a device register as proof that it left the chip.

The register is inside the chip. The pad and the pin come after it.

Fix Check the path outward: the device, then the pad, then the pin.

Wrong Use "ASIC" and "microcontroller" as opposites.

One names how the silicon is made. The other names what the chip is for.

Fix Answer the two questions separately.

Remember

  • An SoC is a complete computer on one piece of silicon, together with everything a chip needs around it.
  • Eight kinds of block: processor, memory, bus, devices, clock and reset, power control, debug, pads.
  • One chip is smaller, cheaper per copy and faster than a board of chips. It is also costly to design and impossible to probe inside.
  • Microcontroller or application processor is a question about the product; ASIC or FPGA is a question about the silicon.
  • A signal that works inside the chip still has to cross a device, a pad and a pin to reach the world.

Practice

Report a problem with this page