pBlazIDE

pBlaze IDE is an Integrated Development Environment dedicated to the fine KCPSM soft core, of Ken Chapman of Xilinx, now known as PicoBlaze . This tool is still in beta and will probably stay there. Please let me know if you find it useful. Also let me know of bugs and enhancements. There are still many known issues, but the resulting code has been used many times with success. The tool is based on the TSynEdit component and is further developed with Delphi. It allows you to edit, format, assemble and debug your KCPSM/PicoBlaze code. The emulation of I/O devices is still in its infancy and needs more elaboration.

The assemby directives and opcodes have been adapted quite a bit to be similar to mainstream assembly code. For debugging and emulation of I/O some additional directives have been added. See this example to get an idea:


;
; Interrupt example
;
waveform_port       DSOUT     2                   ; bit0 will be data
counter_port        DSOUT     4
pattern_10101010    EQU       $AA
interrupt_counter   EQU       s3
;
start:              LOAD      interrupt_counter, 0; reset interrupt counter
                    LOAD      s2, pattern_10101010; initial output condition
                    EINT
;
drive_wave:         OUT       s2, waveform_port
                    LOAD      s0, 7               ; delay size
loop:               SUB       s0, 1               ; delay loop
                    JUMP      NZ, loop
                    XOR       s2, $FF             ; toggle waveform
                    JUMP      drive_wave
;
                    ORG       $20
int_routine:        ADD       interrupt_counter, 1; increment counter
                    OUT       interrupt_counter, counter_port
                    RETI      ENABLE
;
                    ORG       $FF                 ; set interrupt vector
                    JUMP      int_routine

For more information on the directives and opcodes follow the links at the bottom. Use EQU for just replacing a symbol for a value. You may replace register names like s3 (or s03) by say: Count0 with EQU like this:

Count0 EQU s0

Apart from the differences in the directives and opcodes, the syntax is somewhat enhanced. The literal values are interpreted in decimal unless they are preceeded by a $ sign. Expressions are allowed with a syntax similar to C, however, operator precedence needs to be explicitly specified by brackets:

( ( first + 1 ) * 2 ) & $10.

Register names, labels (followed by a colon when defined) and DSed or EQUed values are different items and can be mixed in expressions when the result is obvious. Things like sF + 1 make no sense. Assembly errors are reported in the simulator as the assembly process happens during switching to debug mode. Lines with errors are highlighted and a '?hint' is given. If any errors exist, the simulator will be blocked.

This tool can be used for the PicoBlaze™-I, PicoBlaze™-II, Picoblaze™-3 and CoolBlaze cores as selected by a menu or tool button. Slight differences exist in the syntax for each, like using s00 for register 0 instead of s0.

As a side effect of assembly a .coe file can be created with the specification of the required filename with a COE directive. In the PicoBlaze-I version a width value is required. This value indicates the width of the A-port of the BlockRam used; the PicoBlaze -II and -3 modes don't allow a width value, it is always 18. This option is for compatability with the previous version were 8 was the only possible width.

Similarly a .vhd file can be generated with a VHDL directive. Here a source template must be given of which several are suppled in the download; these are slightly modified versions of Ken Chapman's and Nial Stewart's. Depending on this template the structure of the program ROM or ROMs is specified. See the source of the different templates. Also see www.nialstewart.co.uk for details on using PicoBlaze -II in Spartan-II(e)™.

In the simulator, interrupts can be handled as expected, however, to be able to debug transient interrupts, as you usually have with acknowledging them, an Edge option is a vailable. This flag will interrupt only once and will automatically be cleared.

Tip: Try the Format button.

PicoBlaze and Spartan are a trademarks of Xilinx Inc.

Screenshot Download V3.6 Download V3.74 Beta