Open mithro opened 6 years ago
XML formats include;
I created schemas for the packed netlist and routing resource formats here: https://gist.github.com/Laksen/dc3fdf65a7eb6bb1186c46381215ac55
They don't match the examples 100% as the examples contain some undocumented values, but that should be easy to change
GistVPR XML Schemas
I updated some types to use xs:double instead of xs:decimal to allow scientific notation. Also a preliminary version of the architecture description has been added. There might be a few bits missing, but with the files I could find they almost passed validation.
There were some inconsistencies like default_*
names in <fc>
attributes where I chose the values from the documentation
https://gist.github.com/Laksen/cf67f1103e5c539bb44cd183d617aee8
GistGitHub is where people build software. More than 28 million people use GitHub to discover, fork, and contribute to over 85 million projects.
@Laksen this is awesome! Do you want to send them as a pull request in the https://github.com/SymbiFlow/symbiflow-arch-defs repo? The common/xml directory would be the right place.
GitHubsymbiflow-arch-defs - FOSS architecture definitions of FPGA hardware useful for doing PnR device generation.
@Laksen has added a schema for the existing XML formats in the pull request here -> https://github.com/SymbiFlow/symbiflow-arch-defs/pull/195 - Thank you so much.
The next steps would be; a) Figuring out the best way to generate Python and C++ code from the schemas. b) Designing a new XML format (and appropriate schema) for the placement and route formats from VtR. c) Using the XML schema's for automatic validation of the files.
https://www.codesynthesis.com/products/xsd/ looks pretty good but is under a GPL license and we really want to keep things open. The alternative is probably to follow an example shown at this page https://blind.guru/bmmlcxx.html and use Python + Jinja2 templates to create C++ code.
W3C XML Schema to C++ data binding compiler is an open-source, cross-platform XML Data Binding implementation for C++
The best example I have found is https://github.com/mlang/xsdcxx-musicxml
GitHubContribute to mlang/xsdcxx-musicxml development by creating an account on GitHub.
Currently the xml parser in vpr is hand coded.
It would be good to rip it out and replace it with a auto-generated xml parser based around a DTD which defines the file format.
Create a XML definition using DTD, XSD or Relax-NG -- unsure the best format... See;
Existing XML file formats in order of importance;
New XML file formats needing to be created;
The idea is eventually to auto-generate parser / code structures from the definitions; IE see --