Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite existing handprinted XML output to use pugixml instead #291

Open
4 tasks
mithro opened this issue Feb 14, 2018 · 3 comments
Open
4 tasks

Rewrite existing handprinted XML output to use pugixml instead #291

mithro opened this issue Feb 14, 2018 · 3 comments

Comments

@mithro
Copy link
Contributor

mithro commented Feb 14, 2018

Current Behaviour

Currently much of the XML output is done using hand coded statements using fprintf or iostreams. This leads to the code being a lot more complicated (you have to pass around tab depths and stuff), error prone (IE Your not escaping XML entities correctly in all places) and longer than it needs to be.

Newer XML output code is thankfully using the pugixml library.

I believe the following files currently output XML by hand:

Possible Solution

It would be good if all XML output was done using the pugixml library.

Open questions;

  • How to test the XML output doesn't change?
  • More?

Context

The Verilog to Routing code base is reasonable old and had many authors. Like all old code bases it has areas which could use cleanup, refactoring and improvement. This issue is just to track just one idea on how things can be improved.

@mithro
Copy link
Contributor Author

mithro commented Feb 14, 2018

@kc8apf is currently working on doing the vpr/src/pack/output_clustering.cpp file.

@kmurray
Copy link
Contributor

kmurray commented Feb 14, 2018

Makes a lot of sense. We weren't using a (reasonable) XML library when most of that code was written. Since we're already using pugixml it makes sense to use it.

The one I don't think we should change is libs/EXTERNAL/libcatch/catch.hpp since it's an externally developed library.

How to test the XML output doesn't change?

The most obvious would be to diff the before/after files (perhaps after formatting through xmllint for consistency).

However my main check would be that none of the regression tests fail. In particular the vtr_reg_basic and vtr_reg_strong tests.

@kmurray
Copy link
Contributor

kmurray commented Feb 14, 2018

I suppose another potential concern is that some of the output files (e.g. rr_graph.xml) can get pretty large (GBs); and I think pugixml stores the whole document in memory before it writes things out -- which could significantly increase VPR's peak memory use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants