WB_INTERFACE - Configuration

Frozen Content

The WB_INTERFACE can be configured after placement on the OpenBus System document , or schematic sheet, using the associated Configure (Wishbone Interface) dialog (Figure 1). Access to this dialog depends on the document in which you are working:

  • In the OpenBus System document – access the dialog by right-clicking over the component and choosing the Configure command from the menu that appears. Alternatively, double-click on the component to access the dialog directly.
  • In the Schematic document – simply right-click over the component and choose the Configure command from the context menu that appears. Alternatively, click on the Configure button, available in the Component Properties dialog for the component.


Figure 1. Configuring the Custom Wishbone Interface component.

Use the dialog to configure the WB_INTERFACE component in accordance with design requirements. The following sections detail the configuration options available from this main dialog. For configuration of individual item types, see Configuring Item Types.

Items

Use the Items region of the dialog to define the items within the custom interface – internal registers, command sets, external address ranges. Use the controls available beneath the main list (or from the right-click menu) to add, edit or remove items as required.

The Move Up and Move Down buttons (and corresponding commands on the right-click menu) can be used to change the order of the items within the interface, in terms of appearance on the schematic symbol.

Each item in the list will appear in terms of the following information:

  • Name – the unique name for the item
  • Data Width – the width of the item's data bus, specified when defining the item.
  • Item Type – which of the three supported item types it is (internal register, command set, external address range). For internal register and external address range items, the data direction is also displayed (Read, Write or Read/Write).
  • Item Address – item addresses are determined automatically. Internal registers and command sets each occupy a single address. The address range occupied by an external address range item is determined by that item's address bus width, specified as part of its definition.

Data Bus Width

The Data Bus Width region of the dialog enables you to configure the width of the Wishbone data bus. Choose from 8-, 16-, or 32-bit data width. The width specified must be greater than, or equal to, the largest data width specified for items in the interface.

C Code Generation

The Configure (Wishbone Interface) dialog also provides a Generate C Code button, which you can use to quickly generate C code to simplify interaction with the WB_INTERFACE component from an embedded software project.

Ensure that your custom interface is configured as required prior to using this facility. When you click the button, the Choose a Base Filename dialog will appear. Use this dialog to determine where, and with what root name, the generated header (.h) and source (.c) files will be saved.

These generated files can then be added to the relevant embedded software project. All functions within the generated files require the base address of the associated WB_INTERFACE component. This can be found in the generated hardware.h file for the design.
 

Remember to regenerate the C source files if the configuration of the WB_INTERFACE component changes.



Figure 2. Examples of generated C header and source files for a configured WB_INTERFACE component.

You are reporting an issue with the following selected text and/or image within the active document: