FIDEx User Guide
FIDEx User Guide
for
Getting started with FIDEx
Guide:
FX-TCN-FIDEx-UG0001
2014-09.0
Revision:
0.2
User guide
Getting started with FIDEx
Table of changes
Revision
Date
Author
Change (Page/Chapter)
0.2
2014-09-18
Christoph Fauck
0.1
2014-09-12
Christoph Fauck
Initial version
Table of audits
The following table shows an overview of all audits of the current document, both, in-house
audits and audits by independent quality auditors.
Audited
revision
Date
0.2
2014-09-18
Christoph Fauck
0.1
2014-09-13
Simone Fauck
Auditor
Notes
Page 2 of 19
User guide
Getting started with FIDEx
Table of content
1 Welcome to FIDEx..............................................................................................................4
2 Contact and Support...........................................................................................................4
3 Getting Example Projects, FIDEx and further information..................................................4
4 Installing and uninstalling FIDEx.........................................................................................4
5 Overview.............................................................................................................................5
6 The online help....................................................................................................................6
7 Starting with a new project..................................................................................................6
7.1 Generating a new project.................................................................................................6
7.2 Adding sources to the project...........................................................................................8
7.2.1 Starting from scratch using a skeleton..........................................................................8
7.2.2 The skeleton................................................................................................................10
7.2.3 Where to find the instruction mnemonic.....................................................................10
7.2.4 Using multiple source files..........................................................................................10
7.2.5 Importing existent sources by using the import filter..................................................11
8 Simulating/debugging a project.........................................................................................12
8.1 Controlling the simulation...............................................................................................13
8.2 The simulators start address..........................................................................................13
8.3 Breakpoints....................................................................................................................14
8.4 Simulating with renamed registers and constant defined port addresses.....................14
9 Generating output files of a project...................................................................................15
9.1 The IO device concept...................................................................................................15
9.2 Setting up an IO device for our instruction memory......................................................16
9.3 Writing output file events................................................................................................17
10 Some notes about case sensitivity.................................................................................18
11 Some notes about strings...............................................................................................18
12 Saving configuration data...............................................................................................18
Page 3 of 19
User guide
Getting started with FIDEx
1 Welcome to FIDEx
FIDEx is an integrated assembler development environment (IDE) for soft-core processors
and is developed for Linux and Windows platforms.
It enables the development of assembler code with features that are otherwise available in
high-level language toolchains only. Especially larger programs take advantage of these
features and can be developed much faster.
The aim of the development was and is to develop a maximum-performance tool which is
still simple and intuitive to use by beginners and experts similarly.
Note
We originally developed FIDEx for us and use it intensively for our own
projects. Just the time saved through the source navigator and the simulator is quite a few weeks per year. To say nothing of the increase in quality
and reduced troubleshooting due to the increased source transparency.
eMail [email protected] or
Page 4 of 19
User guide
Getting started with FIDEx
5 Overview
For a rapid and optimized software development FIDEx provides the following compo nents:
a Project manager
for combining project dependent configuration settings and source file paths relative to
the project location.
a Code editor
to write efficient assembler code and inserting templates.
a Source navigator
to keep the overview by developing and handling of larger programs.
a Multi-Pass-Assembler
for giving maximum freedom structuring your sources.
a Simulator/Debugger
to simulate the written assembler code step by step before simulating in a vhdl/verilog
simulator or test via trial and error in the hardware.
a Detailed Online Manual
to have a fast access to the processors properties and the assembler instruction
mnemonic and documentation.
Message viewer
to get efficient help on warnings and errors - the messages contains clickable links
referring to the online help
Page 5 of 19
User guide
Getting started with FIDEx
generate and add the project to the project collection (we do)
Note
To save changed content of the project collection you have to close the
project manager by using the save button or by opening a project.
Figure 7.1-1 shows you an example project added to the project collection.
Page 6 of 19
User guide
Getting started with FIDEx
To open the new generated project now we can double click to the project collection entry
or press the open button of the collection entry.
After opening the new project the project manager closes and the main window shows an
empty source navigator and an empty central area.
In the messages viewer we will see that no assembler backend is registered. This means
that no processor was defined for the currently loaded project.
To define a processor we call the Configuration Configure... item from menu bar and
go to the Processor tab in the opening configuration dialog. There we select the processor
we want to develop for. In this example we select Xilinx PicoBlaze 3.
Aside to the configuration dialog page the corresponding online help page is shown ( Figure 7.1-2).
After making the configuration settings we press Apply and close to close the configura tion dialog.
Now a processor was defined and FIDEx automatically assembles after closing the configuration dialog. The selected processor is shown in the status bar.
Note
Configuration dialog settings are becoming valid after pressing the Apply
and close button only.
Page 7 of 19
User guide
Getting started with FIDEx
Page 8 of 19
User guide
Getting started with FIDEx
To get started we first need to add an empty source file to the project. Therefore we call
the File New... item from menu bar to generate a new file.
After them we call one of the File Save... items from menu bar or press the Ctrl + s
short cut to save the file. We select the storage location within the project folder and press
save. Before saving we will be asked to add the new file to the project and we confirm.
Note
Only files which are added to the project are assembled by FIDEx in the order in which the files are listed in the configuration dialog.
Now we have added our first empty source file to the project. The next step is to insert the
skeleton for the previous defined processor.
To insert the skeleton we call the Edit Insert... Templates Skeletons Xilinx PicoBlaze item from menu bar. Alternatively we can reach the Insert... menu item from
context menu shown after clicking with the right mouse button to the editor window.
After inserting the skeleton we save the file again. FIDEx assembles automatically after
storing and the message viewer tells that there are no further errors.
Now we have written our first assembler program ;-) If you don't understand all code you
have inserted please continue reading this guide or have a look to the Coding manual.
The source navigator on the left side shows you:
Labels
All labels positioned on the beginning of a line are shown. Indented labels are not shown
Page 9 of 19
User guide
Getting started with FIDEx
a directive section
an instruction section
Both can be mixed because FIDEx contains a multi-pass-assembler. So the sources are
parsed and then first all directives are assembled and then the processor instructions.
The directive section shows you a small subset of #set and #equ directives that are available. Most directives are self-explanatory. For further information please have a look to the
Coding manual.
7.2.3 Where to find the instruction mnemonic
With FIDEx it is possible to write assembler for different processor platforms using the
same assembler mnemonic.
Therefore FIDEx uses an own Assembler dialect for all processors. The chapter Instruction set of the Coding manual lists and describes all supported instructions and compares
them over the supported processors.
If you have already experiences with the manufacturers mnemonic of a processor please
have a look to the Processor manual. Each supported processor has a Mnemonic chapter
there where you can find the translation from the manufacturers mnemonic to the FIDEx
mnemonic.
To become familiar with FIDEx it is absolutely necessary to look over the Coding manual of
the online help.
7.2.4 Using multiple source files
FIDEx supports the usage of multiple source files added to a project. The source files are
assembled in the order listed within the Sources configuration dialog page. There you
can change the order of the source files. During assembling you can see the assembling
order within the message viewer.
Note
FIDEx assembles all source files added to a project in the order defined
within the Sources configuration dialog page.
Page 10 of 19
User guide
Getting started with FIDEx
Note
The import filter conversion stops with a message in the message window
if an error occurs.
Before you use the conversion results please convince yourself that the
conversion process is complete.
Page 11 of 19
User guide
Getting started with FIDEx
8 Simulating/debugging a project
For debugging purposes FIDEx contains a powerful simulator for each supported processor.
To start the simulator for the defined processor please call the Simulator Enable/disable simulator item from menu bar.
The simulator starts and shows interactive processor elements as well as the ports around
the central area:
the processor core on the left side
The processor core contains the program counter (PC) of the processor, the carry and
zero flags as well as the clickable interrupt flag. It contains the register banks and the
internal scratch pad memory.
the processor call stack
The processor call stack shows you the return parameter for the next return instruction.
the processor ports
The most processors have a port to communicate with surrounding FPGA logic like
registers, FIFOs or memories.
In this area you can add such devices, assign addresses and show respectively
manipulate port values.
Page 12 of 19
User guide
Getting started with FIDEx
Function description
Enables and disables the simulator. Each button press toggles the
simulator enable state.
Resets the simulator. All simulator components are cleared and the
program counter will be set to the defined start address. See chapter
8.2, The simulators start address for more information.
Sets the program counter to the address defined by the current cursor
position of the text editor.
Assigns an interrupt to the simulator.
Run simulator in endless mode.
Simulates the next instruction. If the instruction is a call, the complete call
will be simulated until the call stack reaches the originally level at the
beginning of the simulation step.
Simulates the next instruction.
Simulates until the next return instruction.
Simulates until the address defined by the current cursor position in the
text editor.
Sets all simulator values to decimal, hexadecimal or octal.
No explicit definition. The simulators start address is the processors start address.
Set the simulators start address actively from current cursor position in the text edi tor described in chapter 8.1, Controlling the simulation.
Define a new start address using the right mouse button context menu of the text
editors left margin (Figure 8.2-1).
If you change your code with enabled simulator and save your changes, the code
will be assembled again. The simulator automatically gets the new assembled code
and try to set the program pointer to the last position to continue the simulation. So
you can make changes on-the-fly if you found a bug during simulation.
Page 13 of 19
User guide
Getting started with FIDEx
8.3 Breakpoints
Simulations are interrupted by the following conditions:
manually set breakpoints
Using the context menu of the editors left margin as shown in Figure 8.2-1. You can
individually set breakpoints. If a breakpoint is not placed into a line containing an
instruction, the breakpoint will be applied to the next following instruction.
implicit breakpoints
If the simulator tries to read from a port address that is not served by a simulator port
component, the simulator stops and adds a red colored register component with the
requested address to the processors port area. Within the message window you will get
the hint to define a register value to read. After them you can continue the simulation
manually.
the register name reg_work by accessing the register sF in the simulators register
component
Page 14 of 19
User guide
Getting started with FIDEx
the name of the constants busAddr_intReg and busAddr_dbg used to access the
ports in the simulators port components.
For information how to setup a template file manually please read chapter Setting up
memories of the coding manual.
If you use a Xilinx PicoBlaze processor you will find an appropriate template file within the
PicoBlaze package down loadable from Xilinx.
For this example we use our own template file. You will find it in the sources of this getting
started example. It contains additional tags for VHDL/Verilog documentation using doxygen.
a register,
a FIFO or
a Memory block.
In the future this list will be extended by script based devices or by socket devices to handle communications between multiple FIDEx instances to simulate multiprocessor designs.
So an IO device can be used
to initialize a port component or the processors internal scratch pad in the simulator,
to generate a HEX or MEM file for block ram or external flash initializations.
Note
All output files that FIDEx can generate are feed from an IO device.
An IO device will be feed with its configuration and its values. These values can be an initial value replaced by individual values from instruction memory and arbitrary set values,
alternatively or combined. Figure 9.1-1 shows the IO device concept.
Page 15 of 19
User guide
Getting started with FIDEx
If you don't instantiate an IO device using #set directives FIDEx generates a default one
for you. The output files connected to this default IO device are configured in the configuration dialog only.
Since the skeleton already contains two IO devices, one for the instruction memory and
one for simulation of a FIFO and we want to have a maximum of freedom we decide to use
explicit IO devices defined by #set directives.
You can see the defined IO devices in the IO device viewer, located in the bottom area of
the main window. Figure 9.2-1 shows the IO device viewer of our example project. You can
see the the page0 device as well as the rxFIFO device.
By moving the mouse over the device graphs the content value of the corresponding ad dress is shown. By double clicking to the graph, the text editor jumps to the directive which
defines the double clicked device address.
Please double click to the white space representing the initial values of the page0 graph.
The editor jumps to the corresponding #set directives. In Figure 9.2-1 shows the IO device
definition of the instruction memory. The most directives are self-explanatory. For further
information please refer to chapter Setting up memories of the Coding manual.
Now we comment in the code lines for the VHDL and the HEX output files. In Figure 9.2-1
you will see how to set the directives.
Page 16 of 19
User guide
Getting started with FIDEx
Page 17 of 19
User guide
Getting started with FIDEx
the users home directory for storing project independent application configuration
data,
On Microsoft Windows platforms FIDEx doesn't save its configuration data into the Windows registry!
Page 18 of 19
User guide
Getting started with FIDEx
List of tables
Table I: Table of changes.......................................................................................................2
Table II: Table of audits..........................................................................................................2
Table 8.1.I: Controlling the simulation using the tool bar.....................................................13
List of figures
Figure 7.1-1: Project Manager with a project in the project collection...................................7
Figure 7.1-2: Mai window with the opened configuration dialog............................................8
Figure 7.2.1-1: Mai window with an inserted skeleton...........................................................9
Figure 7.2.5-1: Main window with import filter dialog...........................................................11
Figure 8-1: Main window with simulator...............................................................................12
Figure 8.2-1: Context menu of the editors left margin.........................................................14
Figure 9.1-1: IO device concept...........................................................................................16
Figure 9.2-1: IO device viewer.............................................................................................17
Figure 9.3-1: Assembler configuration dialog page.............................................................18
Page 19 of 19