IP-XACT for Emacs

IP-XACT for Emacs

As we all know, real ASIC Designers use Emacs. Occasionally however good thing come around that does not support Emacs directly.

One of these things are the Spirit Consortium IP-XACT http://www.accellera.org/activities/committees/ip-xact Granted I never really liked anything in IP-XACT, but the possiblitly to use it to describe Registers. But an Industry standard for that, is badly needed.

Validating xml files for IP-XACT is done with XSD files.

Validating xml files could be done with nice tool called MSV. Can be found at http://java.net/downloads/msv/releases/

So validating a yourRegisterFile.xml can be done with

java -jar ~/bin/msv/msv.jar schema/component.xsd yourRegisterFile.xml

Keeping the xml wellformed http://en.wikipedia.org/wiki/Well-formed_document, nXML mode will do for you automaticly

However wouldnt it be nice if Emacs could validate xml against IP-XACT internaly.

That does however require that we change the proveded Schemas from XSD->RNG->RNC. I have not been able got get this to work. But I got a bit on the way.

There is a xslt from Nicolas Debeissat ndebeiss(u guessed it)gmail.com to convert XSD to RNG, And there is a xslt from David.Rosenborg (u guessed it) pantor.com to convert RNG to RNC

So loop over the XSD files from spirit with these commands

xsltproc –output rng/file.rng XSDtoRNG.xsl schema/file.xsd
xsltproc –output rnc/file.rnc RngToRnc/RngToRncText.xsl rng/file.rng

Sadly this does not work perfectly. I am informed that XSD is not one-to-one map to RNG. So there some code to rewrite, so if you feel up to it, please feel free to fix the code.

git clone http://oddball@github.com/oddball/ipxactForEmacs.git
cd ipxactForEmacs
make

Can also view the code online at https://github.com/oddball/ipxactForEmacs

  1. No trackbacks yet.

Leave a comment