The Ivy Bridge

Ivysim

Home

Perl

Tools

Picoblaze

Spartan3E
Starter Kit









Picoblaze Debugger

User Guide

Introduction

The Picoblaze Debugger is a simple application that works with ModelSim. It lets you visualise the state of a Picoblaze core in your design and control simulation to pause break point. Picoblaze instances in your design are found automatically. You are prompted to specify the log filename that was generated by the Xilinx Picoblaze assembler. That's it. You are ready to debug Picoblaze code.

Launching Debugger from ModelSim

  • Download the zip archive from the link on this page.
  • Extract it into a suitable directory of your windows machine.
  • In ModelSim's transcript window type this command:

  eval [exec { C:/path_to_pbug/pbug.exe }]

Where C:/path_to_pbug will depend upon where you extracted the zip archive.

When a design is loaded into ModelSim the debugger will present a list of Picoblazes, if there is at least one. Choose a Picoblaze to debug and identify its log filename. This is the file with extension log generated by the KCPSM3.EXE assembler program.

Code Window

The Picoblaze assembler, available free from Xilinx, creates a log file after successfully compiling your psm assembly file. Click Start Debugging, the debugger displays this file and highlights the next instruction to execute with a green background.

Break Points

Break points are set by clicking executable lines in the code window. Not all lines are executable, a hand appears when the cursor hovers over executable lines. One mouse-click makes a red bp appear in the left margin, a permanent break point. The simulator pauses whenever the Picoblaze reaches this line. A second mouse-click turns the bp green, a temporary break point. The simulator will pause on this line but automatically clears the break point. A third mouse-click clears the break point. So, three mouse-clicks cycle through the 3 states: permanent, temporary and no break point.

Flags and Registers

The program counter (PC), zero and carry flags are always displayed. All sixteen registers are displayed too. Recently modified values are highlighted with a different background colour. This feature is useful for drawing your attention to unexpected changes.

Stepping and Running

A single instruction may be executed by clicking the Step button or typing F10, while the debugger window has the focus. The simulator runs until the current instruction has completed and the registers are updated. Many instructions can be executed with the Run button or by typing F5, while the debugger window has the focus.

Restart

After code changes simply recompile VHDL or Verilog, start simulation again. The debugger will notice that the simulator has been stopped and show the radio-button list once more. Click Restart if you want to debug a different Picoblaze.

Licence

The link on this page provides an evaluation copy of the Picoblaze Debugger for ModelSim. Please send email for the full version and feature requests.

Expertise

Modelling, especially with ModelSim, is an Ivysim speciality. We can help you design and verify Xilinx projects. Please call or email to discuss solutions.

Copyright © 2006-2008 Ivybridge Simulation Email: info4@ivysim.com Phone: 07704 874512