SlideShare a Scribd company logo
3
Most read
22
Most read
24
Most read
Microwatt
What is Microwatt?
• Microwatt is an open-source, soft-core processor
implementing the Power ISA 3.0, developed by the
OpenPOWER Foundation community—originally started by
IBM.
• Written in VHDL.
• Simple, readable, and educational design.
• Supports Operating Systems like Linux, Zephyr, and
OpenSBI.
• Includes basic peripherals like UART and SPI.
• Designed to be synthesized on FPGAs.
• Developed as part of the OpenPOWER initiative to promote
open hardware.
Instruction Set Architecture (ISA)
32 General Purpose Registers.
Implements a 64-bit architecture.
Supports both 32-bit and 64-bit instructions (as defined by Power ISA 3.0)
Integer Instructions.
Floating-Point Support: Limited.
Supervisor/User Mode: Yes.
Endianness: Big-endian and little-endian support.
MMU: Optional (supports Linux booting with MMU).
Micro architecture
• Basic 5-stage pipeline: Fetch → Decode → Execute → Memory → Writeback
• In-order execution (no out-of-order or speculative execution)
Pipeline:
• Uses static or simple branch handling
Branch Prediction: No branch prediction
• Instruction Cache (I-Cache): Optional (typically 4KB or 8KB)
• Data Cache (D-Cache): Optional
• L2 / Last-Level Cache: Not implemented in basic Microwatt
Caches:
TLB / MMU: Present in some versions
FPGA Portability: Designed to be synthesizable and compact for FPGAs
Interface
Wishbone Bus: Yes
— for peripherals
and memory-
mapped I/O
GPIO Support:
Through Wishbone-
attached
peripherals
High Level Overview
Core Implementation (Five Stage Pipeline)
• fetch1
• icache (uses predecoder, cache_ram and plrufn blocks)
• decode1
• decode2
• register_file
• cr_file
• execute1 (contains arithmetic blocks like rotator,logical,multiply,divider,bit_sorter,etc)
• fpu(Optional)
• loadstore1
• mmu (optional)
• dcache (uses predecoder, cache_ram and plrufn blocks)
• writeback
• code_debug
Configurable Parameters
The core entity provides generics that enable configuration of optional features and
cache parameters:
• HAS_FPU, HAS_BTC, EX1_BYPASS – Control FPU inclusion, branch target cache, and
bypass logic.
• ICACHE_NUM_LINES, DCACHE_NUM_WAYS, etc. – Configure instruction and data
cache geometry.
• ALT_RESET_ADDRESS – Useful for DRAM initialization firmware.
Core Implementation
fetch1 (Instruction Fetch Stage)
• Acesses program counter (PC) for the instruction address.
• Signals pipeline to halt if necessary (e.g., waiting on a branch decision)
• Drives the pc into icache to fetch the instruction
• Controlled by signals from execute1, writeback, and debug.
icache (Instruction Cache)
• Fetches instruction from instruction memory (if available in cache) or forwards the
request to the Wishbone bus.
• Sends instruction to decode1.
• Interfaces with Wishbone (iwbm_ signals) for memory access.
Core Implementation
decode1 and decode2 (Instruction Decode Stages)
• decode1: Decodes instruction fields, identifies operands
• decode2: Expands decoding, handles immediate values, and control signals.
• Drives operand read addresses to register_file.
• Passes decoded instruction information to the execution stages.
register_file
• Holds CPU registers and provides operand values.
• Sends register values to execute1 and loadstore1.
Core Implementation
cr_file (Control Register File)
• Stores condition codes, status, and control information.
• Interacts with decode and writeback for system-level instructions (e.g., CSR).
execute1
• Main ALU stage—performs arithmetic, logical, branch, and control ops.
• Drives branch results to fetch1.
• Forwards data to writeback.
loadstore1
• Memory stage for load/store operations.
• Interfaces with dcache, mmu.
Core Implementation
dcache (Data Cache)
• Handles memory access for load/store.
• Communicates with mmu for address translation.
• Interfaces with Wishbone (dwbm_ signals).
mmu (Memory Management Unit)
• Translates virtual to physical addresses for data accesses.
• Between loadstore1, dcache, and Wishbone bus.
• Signals TLB misses or page faults to control flow.
Core Implementation
writeback
• Final stage that writes results back to the register_file.
• Also interacts with debug interface and control/status logic.
debug
• JTAG or external debug interface.
• Can halt, single-step, or inspect internal signals.
• Monitors PC, registers.
• Can inject traps or halt signals.
SoC Components
• core
• syscon - System Controller
• wishbone_bram_wrapper - Block RAM Memory (BRAM)
• dmi_dtm - Debug Transport Module
• wishbone_debug_master - Wishbone Debug Bridge
• pp_soc_uart (UART0, UART1) – UART Peripheral for
• spi_flash_ctrl - SPI Flash Memory Controller
• xics_icp and xics_ics - External Interrupt Controller for Power ISA
• gpio - General Purpose I/O Controller
SoC Components
Core
• Entity: work.core
• Connects to Wishbone
• Receives interrupts
• Communicates via DMI
System Controller
• Entity: work.syscon
• Provides SoC configuration/status registers.
• Includes SoC version, reset control, clock config, etc.
SoC Components
wishbone_bram_wrapper - Block RAM Memory
• Entity: work.wishbone_bram_wrapper
• Instantiates internal BRAM as a memory-mapped Wishbone slave.
• Only if MEMORY_SIZE != 0
• If MEMORY_SIZE = 0, a dummy memory interface is generated that always ACKs with all
1s.
dmi_dtm - Debug Transport Module
• Entity: work.dmi_dtm
• JTAG interface bridge to DMI bus.
• Converts JTAG signals to DMI protocol
• Inputs: JTAG TAP (implied), clock, reset
• Outputs: DMI transaction signals (dmi_addr, dmi_req, dmi_wr)
SoC Components
wishbone_debug_master - Wishbone Debug Bridge
• Entity: work.wishbone_debug_master
• Converts DMI requests into Wishbone transactions.
• Connected to Wishbone master port, used for debug access to any mapped peripherals.
pp_soc_uart (UART0, UART1)
• Entities: work.pp_soc_uart
• Serial communication. UART0 typically used for console/debug.
spi_flash_ctrl - SPI Flash Memory Controller
• Entity: work.spi_flash_ctrl
• External SPI flash memory access via Wishbone.
SoC Components
xics_icp and xics_ics - External Interrupt Controller for Power ISA
• Entities: work.xics_icp, work.xics_ics
• Implements IBM-style external interrupt controller
• Peripherals generates interrupts for service and are handled by XICS
• xics_ics(Interrupt Controller Source) receives interrupt assertions from devices (like UART,
GPIO, Ethernet, etc.) and prioritizes them.
• xics_icp (Interrupt Controller Presentaion) Interfaces with the CPU core, presenting the
interrupt vector for handling.
gpio - General Purpose I/O Controller
• Entity: work.gpio
• Simple bidirectional GPIO with interrupt generation.
Code flow
Power-Up Clock Active
Reset Asserted
→ Reset
Propagated
Active
Core Fetches
from BRAM (via
Wishbone)
Peripherals Idle
→ Await Core
Access
Interrupts Wired
→ ICS → ICP →
Core
Debug Master
via DMI →
Access Core &
Fabric
SoC Ready for
Full Operation
Code flow
Power-Up and Reset
• The FPGA powers on, and all logic is initialized to default states.
• A reset signal (soc_reset, etc.) is asserted to ensure all components start cleanly.
• This reset is propagated to all components: core, BRAM, wishbone fabric, peripherals,
interrupt controller, DMI, etc.
Clock and Reset Distribution
• system_clk is distributed across all modules.
• rst_* signals (like rst_bram, rst_wbdb, rst_dtm) are derived from soc_reset and
connected to corresponding components.
Code flow
Core Initialization
• Core entity is instantiated.
• Core fetches its first instruction typically from BRAM, using the wishbone bus.
• It initializes internal structures like:
• Instruction cache (iCache)
• Data cache (dCache)
• General-purpose registers
• Program Counter (PC)
BRAM (Boot Memory) Ready
• The wishbone_bram_wrapper provides instruction and/or data memory.
• If MEMORY_SIZE /= 0, then BRAM is instantiated and initialized from RAM_INIT_FILE.
• The core accesses BRAM via Wishbone to begin code execution.
Code flow
Wishbone Interconnect Ready
• A Wishbone bus fabric connects:
• Core (as master)
• Peripherals (as slaves):
• pp_soc_uart (UART0/UART1)
• spi_flash_ctrl
• gpio
• xics_icp
• syscon
• wishbone_bram_wrapper
• Wishbone arbitration ensures only one master accesses a slave at a time.
Peripherals Idle / Ready
• Each peripheral is connected to Wishbone and is waiting for requests from the core.
• UARTs, GPIO, SPI Flash are passive until written to or read from.
Code flow
Interrupt Setup
• The int_level_in signal vector collects interrupt signals from peripherals
• These are passed into XICS_ICS (interrupt controller source), which filters and forwards them to XICS_ICP.
• XICS_ICP signals the core when an interrupt is pending.
Debug Infrastructure
• The dmi_dtm (Debug Transport Module) receives debug commands via JTAG.
• It communicates with the wishbone_debug_master, which can:
• Read/write core memory or registers
• Control peripheral state
• This is key for software debugging and bring-up.
Simulation Exit (Optional)
• If SIM is true and a special DMI write is made to address "11111111", simulation exits.
Recap
Power-up: Initializing the SoC, including the core and its interconnects.
Reset Sequence: The reset controller initializes all components, ensuring the system starts in a known
state.
Core Initialization: The processor core (Microwatt) begins execution, initializing caches, register files,
and control registers.
Peripheral Setup: The peripheral blocks (UART, SPI, GPIO, BRAM, Interrupt Controllers) are configured
via the system control (syscon) unit.
Instruction Fetch: The processor fetches instructions from memory (using ICache) and decodes them.
Execution: The processor executes instructions (including memory operations, FPU operations, and
branching), interacting with memory and peripherals.
Task Completion: The final task (e.g., computation or I/O operation) is completed, and the result is
either written back to memory or output via peripherals.

More Related Content

PPTX
ARM Cortex-M3 Training
PPT
03 top level view of computer function and interconnection
PPT
lecture1-244.ppt
PPT
Ch_3.pptInnovation technology Innovation technology pptppt
PDF
International Journal of Computational Engineering Research(IJCER)
PDF
13402lecture3 111204134846-phpapp02
PDF
Unit 2 processor&memory-organisation
PDF
Unit 1 processormemoryorganisation
ARM Cortex-M3 Training
03 top level view of computer function and interconnection
lecture1-244.ppt
Ch_3.pptInnovation technology Innovation technology pptppt
International Journal of Computational Engineering Research(IJCER)
13402lecture3 111204134846-phpapp02
Unit 2 processor&memory-organisation
Unit 1 processormemoryorganisation

Similar to Microwatt: Open Tiny Core, Big Possibilities (20)

PPT
Counit2 2
PPT
top level view of computer function and interconnection
PPTX
8259 Programmable Interrupt Controller.pptx
PPT
03_Top Level View of Computer Function and Interconnection.ppt
PDF
Chapter_2_Embedded Systems Design_introduction_ARM.pdf
PDF
Session01_Intro.pdf
PPT
Cs intro-ca
PPTX
Microcontroller from basic_to_advanced
PPTX
Computer Organization: Introduction to Microprocessor and Microcontroller
PPT
03 top level view of computer function and interconnection.ppt.enc
PPTX
Pentium processor
PPTX
Computer Architecture & Program Execution.pptx
PPTX
ARM stacks, subroutines, Cortex M3, LPC 214X
PPTX
Embedded Systems Introdution
PDF
Introduction to Embedded System
PPT
Lecture10.ppt
PPT
arm_exp.ppt
PPT
Not bridge south bridge archexture
PDF
International Journal of Computational Engineering Research(IJCER)
PPT
Counit2 2
top level view of computer function and interconnection
8259 Programmable Interrupt Controller.pptx
03_Top Level View of Computer Function and Interconnection.ppt
Chapter_2_Embedded Systems Design_introduction_ARM.pdf
Session01_Intro.pdf
Cs intro-ca
Microcontroller from basic_to_advanced
Computer Organization: Introduction to Microprocessor and Microcontroller
03 top level view of computer function and interconnection.ppt.enc
Pentium processor
Computer Architecture & Program Execution.pptx
ARM stacks, subroutines, Cortex M3, LPC 214X
Embedded Systems Introdution
Introduction to Embedded System
Lecture10.ppt
arm_exp.ppt
Not bridge south bridge archexture
International Journal of Computational Engineering Research(IJCER)
Ad

Recently uploaded (20)

PDF
Well-logging-methods_new................
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Digital Logic Computer Design lecture notes
DOCX
573137875-Attendance-Management-System-original
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPT
Project quality management in manufacturing
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Sustainable Sites - Green Building Construction
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPT
Mechanical Engineering MATERIALS Selection
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Welding lecture in detail for understanding
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
Well-logging-methods_new................
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Structs to JSON How Go Powers REST APIs.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Digital Logic Computer Design lecture notes
573137875-Attendance-Management-System-original
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Foundation to blockchain - A guide to Blockchain Tech
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Project quality management in manufacturing
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Sustainable Sites - Green Building Construction
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Internet of Things (IOT) - A guide to understanding
Mechanical Engineering MATERIALS Selection
OOP with Java - Java Introduction (Basics)
Welding lecture in detail for understanding
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
bas. eng. economics group 4 presentation 1.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
Ad

Microwatt: Open Tiny Core, Big Possibilities

  • 2. What is Microwatt? • Microwatt is an open-source, soft-core processor implementing the Power ISA 3.0, developed by the OpenPOWER Foundation community—originally started by IBM. • Written in VHDL. • Simple, readable, and educational design. • Supports Operating Systems like Linux, Zephyr, and OpenSBI. • Includes basic peripherals like UART and SPI. • Designed to be synthesized on FPGAs. • Developed as part of the OpenPOWER initiative to promote open hardware.
  • 3. Instruction Set Architecture (ISA) 32 General Purpose Registers. Implements a 64-bit architecture. Supports both 32-bit and 64-bit instructions (as defined by Power ISA 3.0) Integer Instructions. Floating-Point Support: Limited. Supervisor/User Mode: Yes. Endianness: Big-endian and little-endian support. MMU: Optional (supports Linux booting with MMU).
  • 4. Micro architecture • Basic 5-stage pipeline: Fetch → Decode → Execute → Memory → Writeback • In-order execution (no out-of-order or speculative execution) Pipeline: • Uses static or simple branch handling Branch Prediction: No branch prediction • Instruction Cache (I-Cache): Optional (typically 4KB or 8KB) • Data Cache (D-Cache): Optional • L2 / Last-Level Cache: Not implemented in basic Microwatt Caches: TLB / MMU: Present in some versions FPGA Portability: Designed to be synthesizable and compact for FPGAs
  • 5. Interface Wishbone Bus: Yes — for peripherals and memory- mapped I/O GPIO Support: Through Wishbone- attached peripherals
  • 7. Core Implementation (Five Stage Pipeline) • fetch1 • icache (uses predecoder, cache_ram and plrufn blocks) • decode1 • decode2 • register_file • cr_file • execute1 (contains arithmetic blocks like rotator,logical,multiply,divider,bit_sorter,etc) • fpu(Optional) • loadstore1 • mmu (optional) • dcache (uses predecoder, cache_ram and plrufn blocks) • writeback • code_debug
  • 8. Configurable Parameters The core entity provides generics that enable configuration of optional features and cache parameters: • HAS_FPU, HAS_BTC, EX1_BYPASS – Control FPU inclusion, branch target cache, and bypass logic. • ICACHE_NUM_LINES, DCACHE_NUM_WAYS, etc. – Configure instruction and data cache geometry. • ALT_RESET_ADDRESS – Useful for DRAM initialization firmware.
  • 9. Core Implementation fetch1 (Instruction Fetch Stage) • Acesses program counter (PC) for the instruction address. • Signals pipeline to halt if necessary (e.g., waiting on a branch decision) • Drives the pc into icache to fetch the instruction • Controlled by signals from execute1, writeback, and debug. icache (Instruction Cache) • Fetches instruction from instruction memory (if available in cache) or forwards the request to the Wishbone bus. • Sends instruction to decode1. • Interfaces with Wishbone (iwbm_ signals) for memory access.
  • 10. Core Implementation decode1 and decode2 (Instruction Decode Stages) • decode1: Decodes instruction fields, identifies operands • decode2: Expands decoding, handles immediate values, and control signals. • Drives operand read addresses to register_file. • Passes decoded instruction information to the execution stages. register_file • Holds CPU registers and provides operand values. • Sends register values to execute1 and loadstore1.
  • 11. Core Implementation cr_file (Control Register File) • Stores condition codes, status, and control information. • Interacts with decode and writeback for system-level instructions (e.g., CSR). execute1 • Main ALU stage—performs arithmetic, logical, branch, and control ops. • Drives branch results to fetch1. • Forwards data to writeback. loadstore1 • Memory stage for load/store operations. • Interfaces with dcache, mmu.
  • 12. Core Implementation dcache (Data Cache) • Handles memory access for load/store. • Communicates with mmu for address translation. • Interfaces with Wishbone (dwbm_ signals). mmu (Memory Management Unit) • Translates virtual to physical addresses for data accesses. • Between loadstore1, dcache, and Wishbone bus. • Signals TLB misses or page faults to control flow.
  • 13. Core Implementation writeback • Final stage that writes results back to the register_file. • Also interacts with debug interface and control/status logic. debug • JTAG or external debug interface. • Can halt, single-step, or inspect internal signals. • Monitors PC, registers. • Can inject traps or halt signals.
  • 14. SoC Components • core • syscon - System Controller • wishbone_bram_wrapper - Block RAM Memory (BRAM) • dmi_dtm - Debug Transport Module • wishbone_debug_master - Wishbone Debug Bridge • pp_soc_uart (UART0, UART1) – UART Peripheral for • spi_flash_ctrl - SPI Flash Memory Controller • xics_icp and xics_ics - External Interrupt Controller for Power ISA • gpio - General Purpose I/O Controller
  • 15. SoC Components Core • Entity: work.core • Connects to Wishbone • Receives interrupts • Communicates via DMI System Controller • Entity: work.syscon • Provides SoC configuration/status registers. • Includes SoC version, reset control, clock config, etc.
  • 16. SoC Components wishbone_bram_wrapper - Block RAM Memory • Entity: work.wishbone_bram_wrapper • Instantiates internal BRAM as a memory-mapped Wishbone slave. • Only if MEMORY_SIZE != 0 • If MEMORY_SIZE = 0, a dummy memory interface is generated that always ACKs with all 1s. dmi_dtm - Debug Transport Module • Entity: work.dmi_dtm • JTAG interface bridge to DMI bus. • Converts JTAG signals to DMI protocol • Inputs: JTAG TAP (implied), clock, reset • Outputs: DMI transaction signals (dmi_addr, dmi_req, dmi_wr)
  • 17. SoC Components wishbone_debug_master - Wishbone Debug Bridge • Entity: work.wishbone_debug_master • Converts DMI requests into Wishbone transactions. • Connected to Wishbone master port, used for debug access to any mapped peripherals. pp_soc_uart (UART0, UART1) • Entities: work.pp_soc_uart • Serial communication. UART0 typically used for console/debug. spi_flash_ctrl - SPI Flash Memory Controller • Entity: work.spi_flash_ctrl • External SPI flash memory access via Wishbone.
  • 18. SoC Components xics_icp and xics_ics - External Interrupt Controller for Power ISA • Entities: work.xics_icp, work.xics_ics • Implements IBM-style external interrupt controller • Peripherals generates interrupts for service and are handled by XICS • xics_ics(Interrupt Controller Source) receives interrupt assertions from devices (like UART, GPIO, Ethernet, etc.) and prioritizes them. • xics_icp (Interrupt Controller Presentaion) Interfaces with the CPU core, presenting the interrupt vector for handling. gpio - General Purpose I/O Controller • Entity: work.gpio • Simple bidirectional GPIO with interrupt generation.
  • 19. Code flow Power-Up Clock Active Reset Asserted → Reset Propagated Active Core Fetches from BRAM (via Wishbone) Peripherals Idle → Await Core Access Interrupts Wired → ICS → ICP → Core Debug Master via DMI → Access Core & Fabric SoC Ready for Full Operation
  • 20. Code flow Power-Up and Reset • The FPGA powers on, and all logic is initialized to default states. • A reset signal (soc_reset, etc.) is asserted to ensure all components start cleanly. • This reset is propagated to all components: core, BRAM, wishbone fabric, peripherals, interrupt controller, DMI, etc. Clock and Reset Distribution • system_clk is distributed across all modules. • rst_* signals (like rst_bram, rst_wbdb, rst_dtm) are derived from soc_reset and connected to corresponding components.
  • 21. Code flow Core Initialization • Core entity is instantiated. • Core fetches its first instruction typically from BRAM, using the wishbone bus. • It initializes internal structures like: • Instruction cache (iCache) • Data cache (dCache) • General-purpose registers • Program Counter (PC) BRAM (Boot Memory) Ready • The wishbone_bram_wrapper provides instruction and/or data memory. • If MEMORY_SIZE /= 0, then BRAM is instantiated and initialized from RAM_INIT_FILE. • The core accesses BRAM via Wishbone to begin code execution.
  • 22. Code flow Wishbone Interconnect Ready • A Wishbone bus fabric connects: • Core (as master) • Peripherals (as slaves): • pp_soc_uart (UART0/UART1) • spi_flash_ctrl • gpio • xics_icp • syscon • wishbone_bram_wrapper • Wishbone arbitration ensures only one master accesses a slave at a time. Peripherals Idle / Ready • Each peripheral is connected to Wishbone and is waiting for requests from the core. • UARTs, GPIO, SPI Flash are passive until written to or read from.
  • 23. Code flow Interrupt Setup • The int_level_in signal vector collects interrupt signals from peripherals • These are passed into XICS_ICS (interrupt controller source), which filters and forwards them to XICS_ICP. • XICS_ICP signals the core when an interrupt is pending. Debug Infrastructure • The dmi_dtm (Debug Transport Module) receives debug commands via JTAG. • It communicates with the wishbone_debug_master, which can: • Read/write core memory or registers • Control peripheral state • This is key for software debugging and bring-up. Simulation Exit (Optional) • If SIM is true and a special DMI write is made to address "11111111", simulation exits.
  • 24. Recap Power-up: Initializing the SoC, including the core and its interconnects. Reset Sequence: The reset controller initializes all components, ensuring the system starts in a known state. Core Initialization: The processor core (Microwatt) begins execution, initializing caches, register files, and control registers. Peripheral Setup: The peripheral blocks (UART, SPI, GPIO, BRAM, Interrupt Controllers) are configured via the system control (syscon) unit. Instruction Fetch: The processor fetches instructions from memory (using ICache) and decodes them. Execution: The processor executes instructions (including memory operations, FPU operations, and branching), interacting with memory and peripherals. Task Completion: The final task (e.g., computation or I/O operation) is completed, and the result is either written back to memory or output via peripherals.