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

Add parsing of compiler directive `default_nettype #1148

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Anselmo95
Copy link

I tried analysing the xpm models provided with vivado just to see how far I could get and the default_nettype is the first problem it encounters.

I tried to add just enough logic to parse the directive correctly but I have no idea how to use the parsed information so this is ad far as I can go for the moment.

According to what I found online this is the notation:

`default_nettype wire | tri | tri0 | tri1 | wand | triand | wor | trior | trireg | uwire | none

Copy link
Owner

@nickg nickg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried analysing the xpm models provided with vivado just to see how far I could get

I think that's probably quite a long way from working unfortunately.

src/scan.h Outdated
#define tPLUSPLUS 524
#define tMINUSMINUS 525
#define tVAR 526
#define tDEFAULTNETTYPE 527
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define tDEFAULTNETTYPE 527
#define tDEFNETTYPE 527

Give it a slightly shorter name then you don't need to reindent all the other ones.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure it should be changes now, I wasn’t sure it was ok to shorten the constant name so I went with the full one even if I had to re-indent.

@Anselmo95
Copy link
Author

I tried analysing the xpm models provided with vivado just to see how far I could get

I think that's probably quite a long way from working unfortunately.

I know it's not around the corner but curiosity got the better of me and honestly it already parses 10% of single file, It's not bad !

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

Successfully merging this pull request may close these issues.

2 participants