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.
| Question | |
|---|---|
| 1 | What is a system on chip, in one sentence? |
| 2 | What does putting a whole board on one chip buy, and what does it cost? |
| 3 | What are the eight kinds of block in an SoC, and what is the job of each? |
| 4 | How does a microcontroller differ from an application processor? |
| 5 | What 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
| Word | Meaning |
|---|---|
| System on chip (SoC) | A complete computer on one piece of silicon. |
| Reset | A signal that forces every flip-flop to a known starting value. |
| Block | One part of a chip with one job, designed and tested by itself: a processor, a memory, a device. |
| Integration | Joining blocks into one working chip: the bus, the clock, the reset and every other wire between them. |
| Package and pin | The package is the plastic case around the silicon. Its metal pins are soldered to a board. |
| Pad | The circuit at the edge of the silicon that joins one inside signal to one pin. |
| Pin mux | The 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 system | A large program that runs many other programs and shares the chip between them. A phone has one. |
| Application processor | A large SoC that runs an operating system and needs far more memory than fits on the chip. |
| ASIC | Application-specific integrated circuit: a chip whose circuit is fixed for good when it is made. |
| FPGA | Field-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
- Processor
- Memory
- Bus
- Peripheral
- Clock / reset
- Power
- Debug
- Pads
- Processor
It runs the loop of S0.1: fetch, decode, execute. Everything else on the chip serves it or is reached by it.
- 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.
- 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.
- Devices
Each device is a set of registers with addresses. Writing one makes the device act. Reading one reports what the device sees.
- 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.
- 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.
- 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.
- 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.
| Kind of block | Its job in one line | In ap_soc, the chip of this track | Lessons |
|---|---|---|---|
| Processor | Runs the program. | one processor | S0.1 |
| Memory | Holds the program and its data. | Boot ROM and SRAM | S0.2 |
| Bus | Carries every load and store to the owner of its address. | AHB for memory, APB for the device registers, and the bridge that joins them | S0.3 to S0.5, S4 |
| Devices | Registers that touch the world. | UART0, GPIO and others | S6, S7 |
| Clock and reset | Makes the clock and gives every block a clean start. | one clock and reset block | S5 |
| Power control | Switches parts of the chip off and on. | one power control block | S5 |
| Debug | Lets an engineer stop the processor and look inside. | one debug block | S8 |
| Pads | Join inside signals to the pins of the package. | sixteen pads that devices share | S7 |
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.
| Step | What happens | Which box |
|---|---|---|
| 1 | Memory 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 |
| 2 | The processor fetches those instructions and executes them. | Processor |
| 3 | The store travels on the bus: over AHB to the bridge, and then on APB. The decoders find the owner of 0x1000_0000: UART0. | Bus |
| 4 | UART0 takes 0x68 into its register, and sends it out one bit at a time. | Devices |
| 5 | A pad drives those bits onto a pin. The board carries them to the screen. | Pads |
| all | Every 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
Rule 1: One piece of silicon holds the whole computer.
Processor, memory, bus and devices sit side by side, with no board between them.
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.
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.
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.
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.
Test code
The task send asks for one store to address 0x1000_0000, as the processor would.
AHB
The store has an address phase. The AHB decoder sees an address that starts 0x1000 and selects the bridge.
The bridge
The bridge turns the AHB data phase into an APB setup phase and an access phase. AHB waits one cycle.
APB
The APB decoder looks at the next hex digit and raises the select of UART0.
UART0
At the transfer edge UART0 takes the low eight bits into its data register. The lab prints one row.
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=helloRule 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
| What one chip buys | What it costs | |
|---|---|---|
| Size | One small part where a board held many. | Only so much fits. Large memories still need chips of their own. |
| Cost | Each copy is cheap once the design is paid for. | The design itself is very expensive, so it pays only at high volume. |
| Speed and energy | Short wires: signals arrive sooner and waste less energy. | All the heat is in one small place, which is hard to cool. |
| Finding faults | Fewer 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 product | a door sensor, a washing machine, a car key | a phone, a tablet, a car dashboard |
| Software | one fixed program | an operating system and many programs |
| Memory | all on the chip, because the program is small | far too much to fit: mostly in separate memory chips |
| Power | can pause between jobs and use almost no power | runs 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.
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.
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.
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
This section looks ahead. ap_soc has about a dozen blocks. A phone chip has hundreds, and the same eight kinds.
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.
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.
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=helloCheck Yourself
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.