Changes between Initial Version and Version 1 of custom_periphs/add_XBD


Ignore:
Timestamp:
Jul 11, 2006, 11:34:27 PM (18 years ago)
Author:
snovich
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • custom_periphs/add_XBD

    v1 v1  
     1= Adding *.XBD Compliance to the peripheral: =
     2
     3Making a peripheral compliant with the WARP *.xbd can prove quite beneficial, especially if the peripheral uses a large number of external FPGA-pins that would otherwise be a daunting task to write into the UCF file by hand every. To make a peripheral XBD compliant, there are two files that must be modified: the *.mpd file and, obviously, the WARP’s *.xbd file.
     4
     5== Modifying the MPD file ==
     6
     7Open the peripheral's *.mpd file and add the following line directly after the options section:
     8{{{
     9IO_INTERFACE IO_IF = <peripheral_name>, IO_TYPE = <any_name_here>
     10}}}
     11The entry '''<peripheral_name>''' should be the name in the of the peripherals directory WITHOUT the version-part (so, for instance, if the peripheral is radio_controller_v1_03_a, IO_IF = radio_controller). See the example *.mpd file from the first section of this guide as an example. Any ports that must be tied to external pins via the UCF, should also have appended to their lines:
     12{{{
     13, IO_IS = <any name>
     14}}}
     15Another example from the radio_controller peripheral (see above section again):
     16{{{
     17PORT radio4_LED = "", DIR = O, VEC = [0:2], IO_IS = radio4_LED
     18}}}
     19All off the variable names created here, will be used in the *.xbd file. The XBD file is comprised of three sections: The board information, the peripheral instantiations, and the pin-mappings. Because this guide is meant to concentrate on peripheral implementation, it will only lightly cover making modifications to *.xbd file.[[BR]][[BR]]
     20
     21'''''More information on the proper formatting for the MPD may be found in: \\EDK\doc\psf_rm.pdf'''''
     22[[BR]]
     23== Modifying the XBD file ==
     24This guide will only focus on the two necessary steps to basically implementing the peripheral into the XBD file for use in Base System Builder. First, instantiate the peripheral in peripherals instantiation section as follows:
     25{{{
     26BEGIN IO_INTERFACE
     27ATTRIBUTE IO_TYPE = <any_name_here> ### <--- same from the peripherals mpd file
     28ATTRIBUTE INSTANCE = <you can give this field any name for the default instance in XPS>
     29PORT <anything1> = <anything2>, IO_IS = <IO_IS type defined from the mpd file>[#, if vector]
     30PORT …
     31
     32PORT …
     33END
     34}}}
     35'''PORT Example:'''
     36{{{
     37
     38PORT radio4_LD = controller_radio4_LD
     39PORT radio4_24PA = controller_radio4_24PA
     40PORT radio4_5PA = controller_radio4_5PA
     41PORT radio4_ANTSW0 = controller_radio4_ANTSW0, IO_IS = radio4_antsw[0]
     42PORT radio4_ANTSW1 = controller_radio4_ANTSW1, IO_IS = radio4_antsw[1]
     43PORT radio4_LED0 = controller_radio4_LED0, IO_IS = radio4_LED[0]
     44PORT radio4_LED1 = controller_radio4_LED1, IO_IS = radio4_LED[1]
     45PORT radio4_LED2 = controller_radio4_LED2, IO_IS = radio4_LED[2]
     46
     47}}}
     48Note that only a [#] is needed if the IO_IS type is vector based. The last section to modify is the UCF-section of the XBD file – to do this, simply  add the following in (to any part of the UCF-section):
     49{{{
     50
     51PORT <ANYNAME> =  <anything2 from previous section>, UCF_NET_STRING=(“LOC=XX”)
     52
     53}}}
     54“XX” is a pin constraint location. For a more in depth look, many XBD examples can be found in the \\EDK\board\ directory. [[BR]]
     55'''''More information on the proper formatting for the MPD may be found in: \\EDK\doc\psf_rm.pdf'''''