SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
MazuV-Debug-System
https://github.com/feathertw/MazuV-debug-system
Fea(feathertw@gmail.com)
MazuV-Debug-System
● Project
○ https://github.com/feathertw/MazuV-debug-system
● Base on Risc-V debug spec 0.13
○ https://github.com/riscv/riscv-debug-spec
● Demo with PicoRV32 on Lattice Breakout Board
○ https://hackmd.io/AaQbx7X0RCeZTxcaugB9iw?view
RiscV Debug Spec
Demo Diagram
PC
GDB
OpenOCD
USB
USB
|
UART
FPGA
Lattice Breakout Board
PicoRV32 DM DTM
UART
DMI
interrupt
Debug Mode
Prerequisites
● GDB
○ A user-level program in GNU-Toolchain. It's for debug the
program with debug information.
● OpenOCD
○ A user-level program that help GDB to run each debug command
through the corresponding driver.
● Lattice Breakout Board
○ Lattice iCE40HX-8K low cost FPGA Board. Can work with whole
open-source solution, such as yosys, arachne-pnr, icestorm.
● PicoRV32
○ An open-source CPU written by Verilog and base on Risc-V spec.
It's small and only one file, so it'seasy for new learner.
Debug System
● DM(Debug Module)
○ The core of the debug system. There are two slave port for
DTM and CPU, and many configurable registers.
○ An Interrupt to make CPU trap into Debug Mode.
● DTM
○ Receive commands from PC through UART and transfer
them to read, write DM registers. (Choosing UART instead
of common JTAGS is because UART-USB device is much
cheaper)
● Debug Mode
○ In this additional CPU mode, actually CPU does not halt, instead, the
CPU keeps run the DM-ROM code and do the commands from
PC(From software view, the CPU is halted).
RiscV DM Registers
MazuV-Debug-System Implement
● Can do
○ Halt, resume cpu
○ Access general purpose register, and PC
○ Access memory
○ Single step
○ Set software breakpoint
○ Reset and halt at first instruction
● Cannnot do
○ Set hardware breakpoint
○ Set watchpoint
○ …...
Issue of MazuV-Debug-System on PicoRV32
● PicoRV32 are not completely match to RiscV spec, such
as no CSR instruction.
● Need independent debug interrupt port
● Walk around single step implementation
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, InternalsLAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
 
LAS16-405:OpenDataPlane: Software Defined Dataplane leader
LAS16-405:OpenDataPlane: Software Defined Dataplane leaderLAS16-405:OpenDataPlane: Software Defined Dataplane leader
LAS16-405:OpenDataPlane: Software Defined Dataplane leader
 
BUD17-300: Journey of a packet
BUD17-300: Journey of a packetBUD17-300: Journey of a packet
BUD17-300: Journey of a packet
 
LAS16-507: LXC support in LAVA
LAS16-507: LXC support in LAVALAS16-507: LXC support in LAVA
LAS16-507: LXC support in LAVA
 
BKK16-210 Migrating to the new dispatcher
BKK16-210 Migrating to the new dispatcherBKK16-210 Migrating to the new dispatcher
BKK16-210 Migrating to the new dispatcher
 
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Bsdtw17: ruslan bukin: free bsd/risc-v and device driversBsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
 
BUD17-214: Bus scaling QoS update
BUD17-214: Bus scaling QoS update BUD17-214: Bus scaling QoS update
BUD17-214: Bus scaling QoS update
 
BUD17-302: LLVM Internals #2
BUD17-302: LLVM Internals #2 BUD17-302: LLVM Internals #2
BUD17-302: LLVM Internals #2
 
BKK16-402 Cross distro BoF
BKK16-402 Cross distro BoFBKK16-402 Cross distro BoF
BKK16-402 Cross distro BoF
 
BKK16-403 Android HAL Consolidation Status
BKK16-403 Android HAL Consolidation StatusBKK16-403 Android HAL Consolidation Status
BKK16-403 Android HAL Consolidation Status
 
LAS16-101: Efficient kernel backporting
LAS16-101: Efficient kernel backportingLAS16-101: Efficient kernel backporting
LAS16-101: Efficient kernel backporting
 
BKK16-203 Irq prediction or how to better estimate idle time
BKK16-203 Irq prediction or how to better estimate idle timeBKK16-203 Irq prediction or how to better estimate idle time
BKK16-203 Irq prediction or how to better estimate idle time
 
BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!
 
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
 
BUD17-310: Introducing LLDB for linux on Arm and AArch64
BUD17-310: Introducing LLDB for linux on Arm and AArch64 BUD17-310: Introducing LLDB for linux on Arm and AArch64
BUD17-310: Introducing LLDB for linux on Arm and AArch64
 
BUD17-TR02: Upstreaming 101
BUD17-TR02: Upstreaming 101 BUD17-TR02: Upstreaming 101
BUD17-TR02: Upstreaming 101
 
LAS16-209: Finished and Upcoming Projects in LMG
LAS16-209: Finished and Upcoming Projects in LMGLAS16-209: Finished and Upcoming Projects in LMG
LAS16-209: Finished and Upcoming Projects in LMG
 
BKK16-207 VLANd in LAVA
BKK16-207 VLANd in LAVABKK16-207 VLANd in LAVA
BKK16-207 VLANd in LAVA
 
BKK16-100K1 George Grey, Linaro CEO Opening Keynote
BKK16-100K1 George Grey, Linaro CEO Opening KeynoteBKK16-100K1 George Grey, Linaro CEO Opening Keynote
BKK16-100K1 George Grey, Linaro CEO Opening Keynote
 
BKK16-307 LHG OE Initiative
BKK16-307 LHG OE InitiativeBKK16-307 LHG OE Initiative
BKK16-307 LHG OE Initiative
 

Ähnlich wie MazuV-Debug-System

Share the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development BoardShare the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development Board
Jian-Hong Pan
 
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
Paris Open Source Summit
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
Xiaozhe Wang
 
LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness
Peter Griffin
 
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptxPumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Amit Tripathi
 

Ähnlich wie MazuV-Debug-System (20)

lab1-ppt.pdf
lab1-ppt.pdflab1-ppt.pdf
lab1-ppt.pdf
 
Raspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application DevelopmentRaspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application Development
 
OpenOCD-K3
OpenOCD-K3OpenOCD-K3
OpenOCD-K3
 
SystemV vs systemd
SystemV vs systemdSystemV vs systemd
SystemV vs systemd
 
Introduction to Xdebug
Introduction to XdebugIntroduction to Xdebug
Introduction to Xdebug
 
Share the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development BoardShare the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development Board
 
Utft
UtftUtft
Utft
 
LAS16-201: ART JIT in Android N
LAS16-201: ART JIT in Android NLAS16-201: ART JIT in Android N
LAS16-201: ART JIT in Android N
 
CNC 3-Axis Stepper Motor Shield
CNC 3-Axis Stepper Motor ShieldCNC 3-Axis Stepper Motor Shield
CNC 3-Axis Stepper Motor Shield
 
Mesa and Its Debugging
Mesa and Its DebuggingMesa and Its Debugging
Mesa and Its Debugging
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
pcDuino Presentation at SparkFun
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFun
 
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and ...
 
Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
 
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernelsMainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
Mainline kernel on ARM Tegra20 devices that are left behind on 2.6 kernels
 
Raspberry Pi GPIO Tutorial - Make Your Own Game Console
Raspberry Pi GPIO Tutorial - Make Your Own Game ConsoleRaspberry Pi GPIO Tutorial - Make Your Own Game Console
Raspberry Pi GPIO Tutorial - Make Your Own Game Console
 
LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness LAS16-403 - GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness
 
LAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel AwarenessLAS16-403: GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel Awareness
 
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptxPumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 

MazuV-Debug-System

  • 2. MazuV-Debug-System ● Project ○ https://github.com/feathertw/MazuV-debug-system ● Base on Risc-V debug spec 0.13 ○ https://github.com/riscv/riscv-debug-spec ● Demo with PicoRV32 on Lattice Breakout Board ○ https://hackmd.io/AaQbx7X0RCeZTxcaugB9iw?view
  • 4. Demo Diagram PC GDB OpenOCD USB USB | UART FPGA Lattice Breakout Board PicoRV32 DM DTM UART DMI interrupt Debug Mode
  • 5. Prerequisites ● GDB ○ A user-level program in GNU-Toolchain. It's for debug the program with debug information. ● OpenOCD ○ A user-level program that help GDB to run each debug command through the corresponding driver. ● Lattice Breakout Board ○ Lattice iCE40HX-8K low cost FPGA Board. Can work with whole open-source solution, such as yosys, arachne-pnr, icestorm. ● PicoRV32 ○ An open-source CPU written by Verilog and base on Risc-V spec. It's small and only one file, so it'seasy for new learner.
  • 6. Debug System ● DM(Debug Module) ○ The core of the debug system. There are two slave port for DTM and CPU, and many configurable registers. ○ An Interrupt to make CPU trap into Debug Mode. ● DTM ○ Receive commands from PC through UART and transfer them to read, write DM registers. (Choosing UART instead of common JTAGS is because UART-USB device is much cheaper) ● Debug Mode ○ In this additional CPU mode, actually CPU does not halt, instead, the CPU keeps run the DM-ROM code and do the commands from PC(From software view, the CPU is halted).
  • 8. MazuV-Debug-System Implement ● Can do ○ Halt, resume cpu ○ Access general purpose register, and PC ○ Access memory ○ Single step ○ Set software breakpoint ○ Reset and halt at first instruction ● Cannnot do ○ Set hardware breakpoint ○ Set watchpoint ○ …...
  • 9. Issue of MazuV-Debug-System on PicoRV32 ● PicoRV32 are not completely match to RiscV spec, such as no CSR instruction. ● Need independent debug interrupt port ● Walk around single step implementation