Menu

Unexpected UnrecognizedAttributeError exception. (IPXACT: SPIRIT/1685-2009)

Help
2014-04-19
2014-04-19
  • Bernd Meyer

    Bernd Meyer - 2014-04-19

    I'm getting UnrecognizedAttributeError exceptions for documents which validated fine in my xml editor. The creation of the bindings completed without any errors/warnings and similar docs without attributes go through fine. I suspect that the problem might be related to the attributes of the spirit:baseAddress element which allows for a string of user defined attributes (prompt, xs:string). Please find below a small example:

    <?xml version="1.0" encoding="UTF-8"?>
    <spirit:component xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009 http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009/index.xsd">
      <spirit:vendor>spiritconsortium.org</spirit:vendor>
      <spirit:library>Leon2RTL</spirit:library>
      <spirit:name>ahbbusSparseChannel</spirit:name>
      <spirit:version>1.0</spirit:version>
      <spirit:busInterfaces>
        <spirit:busInterface>
          <spirit:name>MirroredMaster</spirit:name>
          <spirit:busType spirit:vendor="amba.com" spirit:library="AMBA2" spirit:name="AHB" spirit:version="r2p0_6"/>
          <spirit:abstractionType spirit:vendor="amba.com" spirit:library="AMBA2" spirit:name="AHB_rtl" spirit:version="r2p0_6"/>
          <spirit:mirroredMaster/>
        </spirit:busInterface>
        <spirit:busInterface>
          <spirit:name>MirroredSlave</spirit:name>
          <spirit:busType spirit:vendor="amba.com" spirit:library="AMBA2" spirit:name="AHB" spirit:version="r2p0_6"/>
          <spirit:abstractionType spirit:vendor="amba.com" spirit:library="AMBA2" spirit:name="AHB_rtl" spirit:version="r2p0_6"/>
          <spirit:mirroredSlave>
            <spirit:baseAddresses>
              <spirit:remapAddress spirit:resolve="generated" spirit:id="start_addr_slv0_mirror" spirit:configGroups="requiredConfig" spirit:prompt="Slave 0 Starting Address:">0x00000000</spirit:remapAddress>
              <spirit:range spirit:resolve="generated" spirit:id="range_slv0_mirror" spirit:configGroups="requiredConfig" spirit:prompt="Slave 0 Range:">0x00010000</spirit:range>
            </spirit:baseAddresses>
          </spirit:mirroredSlave>
        </spirit:busInterface>
      </spirit:busInterfaces>
      <spirit:channels>
        <spirit:channel>
          <spirit:name>AHBChannel</spirit:name>
    <!--IP-XACT XSLT Warning#1:Removing element maxMasters from channel-->
    <!--IP-XACT XSLT Warning#2:Removing element maxSlaves from channel-->
          <spirit:busInterfaceRef>MirroredMaster</spirit:busInterfaceRef>
          <spirit:busInterfaceRef>MirroredSlave</spirit:busInterfaceRef>
        </spirit:channel>
      </spirit:channels>
    </spirit:component>
    

    Is there a switch to disable UnrecognizedAttributeError in cases like this?

    Thanks, Bernd

     
    • Peter A. Bigot

      Peter A. Bigot - 2014-04-19

      There is no switch to disable UnrecognizedAttributeError specifically.

      The fault appears to be that PyXB is not recursively collecting the
      complete set of attributes supported for that element; specifically
      the group spirit:configurable is not being included when
      spirit:common.att is incorporated within spirit:long.att.

      If you file a trac ticket at https://sourceforge.net/apps/trac/pyxb/
      I'll look at this next time I'm working on PyXB.

      Peter

       

      Last edit: Peter A. Bigot 2014-04-19
    • Bernd Meyer

      Bernd Meyer - 2014-04-19

      I downloaded the git snapshot and reran the script on the entire Leon2 library. All 251 files passed.

      Thanks, Bernd

       
  • Peter A. Bigot

    Peter A. Bigot - 2014-04-19

    Turned out to be premature expansion of an attribute group which had not itself been expanded. Tracked as https://sourceforge.net/apps/trac/pyxb/ticket/230, fixed in the next branch of the git repository.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.