Feature Tour

This section assumes that you have successfully completed both the Installation and Quick Start sections of this document.  This section gives you a brief overview of the editor and its features.

If you closed your previous Eclipse session, restart it now and load the workspace you created in Start Eclipse.

Editing IP‑XACT Files

If the busDef.spirit file is not loaded in the editor, locate it in the Navigator view and double-click it.

Note that in the editor window there are two tabs at the bottom: Design and Source; each tab may be used for select between two alternate editors

Design Editor

The Design editor gives a tree-structured outline of the data that can be edited by supplying node values in the cells on the right-hand side.  New nodes may be added or removed by displaying the context menu (right-click).  The context menu items are constrained according to the schema loaded.

*  Tip: Use the Design editor for removing larger sections of a design.

*  Tip: Use the Design editor for inserting new elements where element order is mandated by the schema.

Source Editor

The Source editor provides a ‘raw’ XML view of the edited data.  The editor allows all of the usual editing operations such as cut, copy, paste etc.  Context sensitive help and tag completion is also available.

If the XML does not conform to the standard as defined by the IP‑XACT schema files then red markers will appear in the right-hand margin indicating the location of the error.  The offending section should also be underlined in red.  Hovering over the marker will give a hint as to the reason for the problem.  Note that the editor only checks for syntax and semantic (meaning) errors insofar as these are expressed in the IP‑XACT XML schema.  This cannot cover all classes of error.

*  Tip: Use Ctrl+Space in the Source editor to provide context sensitive tool tips on the schema content.

*  Tip: Use Ctrl+Shift+F in the Source editor to reformat the XML elements.  This often allows the location of errors to be found more easily.

Outline view

The editor provides an outline view of the data in the selected file, similar to that shown in the Design view (this window may need to be explicitly opened from menu; use Window - Show View - Other).  Some editing operations are available in this view, but attributes details are not shown here.

Properties view

 Certain XML items are supported by Properties.  Display the Properties view by selecting Window - Show View - Properties and then select the spirit:busDefinition node in the busDef.spirit file.  Observe that Properties are displayed for this node.

Create a Library project

If you already have some IP-XACT files that you wish to work with or reference, it is convenient to create a library project for them.  (If you have the SPIRIT Consortium’s Leon2 example (see The SPIRIT Consortium’s Leon2 example), then this is good way to reference those files.

Select File - New - Project...

In the New Project wizard, expand General and select Project.  Click Next.

In the Project name field enter Library (for example), or perhaps Leon2 if you have the Leon2 example.

Uncheck the Use default location check box and click Browse…

Select a directory containing a library of IP‑XACT files directly, or in its subdirectory structure, and click Finish.

The directory will be examined and the IP‑XACT Library view will be updated with any new files found.

IP‑XACT Library view

The IP‑XACT perspective automatically opens this view.  (If it has been closed, select Window - Show View - IP‑XACT Library.)  This view shows the available IP‑XACT files arranged in a tree structure and grouped by vendor, library, name and version.  Designs, Components and Bus Definitions are shown with subtly different icons:

           A Design file
           A Component file
           A Bus Definition file
           Used for the other IP‑XACT file types

Opening files from the IP‑XACT Library view

To open a file from the IP‑XACT Library view, expand its node fully then double-click it.  (Alternatively you may open it from the view's context menu.)

In the IP‑XACT Library view, when the Link with Editor toolbar button is in its depressed state, the view will track IP‑XACT files as they are opened or viewed in the editor.  (This feature is useful for finding where your designs are.)

*  Tip: Turn off  Link with Editor before using the drag and drop feature of this view.

Finding Where Documents Are Used

The IP‑XACT Library view has a feature for finding where an IP‑XACT document is referenced by other IP‑XACT documents.  (This is the reverse of what is available from the IP‑XACT References view.)  To use this feature, select a Bus Definition or Component in the IP‑XACT Library view, and then select Find Usages from the context menu for the item.  (Alternatively select Find Usages from the toolbar in the IP‑XACT Library view.)

When you do this a Search results view will appear with the Find Usages search results.

Note: The Find Usages feature only searches the IP‑XACT documents that are shown the IP‑XACT Library view.

If you double-click an item in the Search results view (or select Goto item in the context menu), the referencing file will be opened in an editor.

IP‑XACT References view

This view is useful to show what other IP‑XACT documents are referenced by the currently selected item.

If this view is not visible, select Window - Show View - IP‑XACT References.

This section assumes you have the SPIRIT Consortium’s Leon2 example available and referenced via a library project.

In the Navigator view, select the Leon2 example file /Leon2/Components/spiritconsortium.org/Leon2/irqctrl/1.2/irqctrl.xml.  Alternatively, in the IP-XACT Library view, select spiritconsortium.org - Leon2irqctrl - 1.2.

Observe that the IP‑XACT References view shows the other IP‑XACT documents referenced by this file (see previous illustration).  The irqctrl.xml file references the AMBA APB Bus Interface (AMBA:AMBA2:APB:r0p0), but this document is not present in the IP‑XACT Library.  It also references the Bus Interface (spiritconsortium.org:Leon:Int:v1.0) many times.

The IP‑XACT References view tracks the currently selected IP‑XACT file.  Try selecting various IP‑XACT files in Navigator, the editor window or in the IP-XACT Library view.

Problems view

The Problems view is used to report problems with the XML content and with duplicated VLNVs.  See also the section on the IP‑XACT Document Checker that uses this view.

To display the Problems view, select Window - Show View - Problems.

Duplicated VLNVs

To illustrate the display of duplicated VLNVs, select a busDef.spirit file in the Example project then select Edit - Copy followed by Edit - Paste (accept the file name offered).

Observe that a new Duplicate VLNV problem is now displayed in the Problems view.

Double-click the Duplicate VLNV for the copied file in the Problems view to open it in an editor.

Locate the file by VLNV in the IP‑XACT Library view (perhaps you might like to use the IP‑XACT Library view's Link with Editor feature here).

Note that both the files have a warning icon () shown in the IP‑XACT Library view.

Edit the copied file's VLNV version in the editor and save the file (File – Save).

Observe that the problem is resolved in the Problems view and the warning icon has been removed from the IP‑XACT Library view.

XML Validation

Open the copied busDef.spirit file (see Duplicated VLNVs above) and using the Source tab, remove the final > from the source.  Save the modified file.

Right-click in the Source window and from the context menu and select Validate.

The Problems view should report an XML document error.

Insert a Component into A Design

This section assumes you have the SPIRIT Consortium’s Leon2 example available and referenced via a library project.

There are two ways of inserting a Component into a Design file.

Method 1

Open the design file Leon2/APBSubSystem/1.2/APBSubSystem.xml in the editor and select the Design tab.  (You may want to make a backup copy of this file first.)

Select the Leon2/Components/spiritconsortium.org/Leon2/dma/1.2/dma.xml component file in the IP‑XACT Library view and drag it into the Design window of the editor.

You will be prompted for the new component instance name that will be used in the design.  Accept the default by pressing OK.

Observe that the component has been inserted – expand the spirit:componentInstances element and example the last spirit:componentInstance element.

Method 2

Open the design file Leon2/APBSubSystem/1.2/APBSubSystem.xml in the editor and select the Source tab.  (You may want to make a backup copy of this file first.)

Right-click in the editor and select Insert Component Instance... and the Select Component dialog appears.

Select the spiritconsortium:org:Leon2:dma:1.2  component by double-clicking on it or by highlighting it and pressing Ok.

You will be prompted for the new component instance name that will be used in the design.  Accept the default by pressing OK.

Observe that the component has been inserted – expand the spirit:componentInstances element and example the last spirit:componentInstance element.

Insert a Bus into a Component

This section assumes you have the SPIRIT Consortium’s Leon2 example available and referenced via a library project.

There are two ways of inserting a Bus into a Component file.

Method 1

Open the file Leon2/Components/spiritconsortium.org/Leon2/dma/1.2/dma.xml in the editor and select the Design tab.  (You may want to make a backup copy of this file first.)

Select busDef.spirit Bus Definition from the IP‑XACT Library view (you created this one earlier) and drag it into the Design window.

The New Bus Interface wizard will appear.

Select the Master interface type and press Finish.  (Note: there are many more options in this wizard to support the different bus types.)

Observe that both a spirit:busInterfaces/spirit:busInterface and spirit:model/spirit:signals elements will have been created for you.

Method 2

Open the file Leon2/Components/spiritconsortium.org/Leon2/dma/1.2/dma.xml in the editor and select the Source  tab.  (You may want to make a backup copy of this file first.)

Right-click in the editor and select Insert Bus Interface... and the Select Bus Interface dialog appears.

Double-click on the Bus Interface for the busDef.spirit file you created earlier.

The New Bus Interface wizard will appear.

Select the Master interface type and press Finish.  (Note: there are many more options in this wizard to support the different bus types.)

Observe that both spirit:busInterfaces/spirit:busInterface and spirit:model/spirit:signals elements will have been created for you.  (You may like to use Ctrl+Shift+F  to reformat the XML to see this).