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

PSL support #455

Open
Blebowski opened this issue Apr 24, 2022 · 9 comments
Open

PSL support #455

Blebowski opened this issue Apr 24, 2022 · 9 comments
Labels

Comments

@Blebowski
Copy link
Sponsor Contributor

Hello,

thank you for working on NVC, the project is amazing. I was wondering whether there is a plan to support psl (inline in comments, or "regular" as part of VHDL 2008), or whether you would accept patches if someone started to eventually
work on this?

@nickg
Copy link
Owner

nickg commented Apr 25, 2022

Thanks for the interest in this project! I'd definitely like to add PSL support in the future. Recently I've been focussing on adding missing -2008 features which will include PSL at some point.

I'm always a bit hesitant to accept contributions of large new features from third parties because of the time required to initially review and discuss the code changes and then the ongoing maintenance burden (it's much more fun to write your own code than try to understand someone else's ;-). I'm doing in this in my spare time in addition to a regular day job so I really want to avoid making commitments about what I will have time do in the future. After all it sucks to work on something for months and then have it abandoned because the maintainer doesn't have the time/inclination to review and merge it.

That said if I had a partial PSL implementation already, and someone wanted to fix/extend that, and the patches were relatively small and self-contained, I would be quite happy to review and merge those.

@nickg nickg added the wishlist label Apr 25, 2022
@Blebowski
Copy link
Sponsor Contributor Author

Any ideas how to approach this ? I know GHDL emits NFAs for PSLs SEREs. Probably
commercial tools do it the same way. There could be one "NFA" implementation used
by "PSL" as well as "SVA" assertions.

@nickg
Copy link
Owner

nickg commented Jan 8, 2023

Yes I think the flow will be parse -> generate FSM -> lower to vcode, and then the rest of the code generation is as if it's a normal VHDL process. I started working on this a while ago in another branch (just the parsing part really) but it's not pushed anywhere public yet.

@Blebowski
Copy link
Sponsor Contributor Author

Hello @nickg ,
would you be please willing to push your PSL work in a public branch? I will finish the coverage in the nearest weeks,
and I would like to look at this feature.

@nickg
Copy link
Owner

nickg commented Mar 5, 2023

I've pushed what I have. It's mostly just the parsing part.

@Blebowski
Copy link
Sponsor Contributor Author

Thanks a lot. I will have a look at it.

@nickg
Copy link
Owner

nickg commented Apr 23, 2023

I added some basic runtime support in 9f3ad9e. It can handle very simple assertions like always x -> next y but nothing more.

@Blebowski
Copy link
Sponsor Contributor Author

Thanks, I see. I am preparing parsing of SERE (: , :, within, | , &). Then, I hope I can get a to the FSM generation for sequences and SEREs. Btw. do you want to stick strictly to "simple subset" or you think it makes sense to consider more broad implementation?

E.g.

assert never ({a;b} -> {c;d}) is not really a simple sub-set, but generating an FSM for such case might not be that difficult.

@nickg
Copy link
Owner

nickg commented Apr 24, 2023

I don't have particularly strong feeling about this. AFAIK people normally only expect simulators to implement the simple subset but supporting more seems fine if it doesn't add extra implementation complexity.

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

No branches or pull requests

2 participants