-
Notifications
You must be signed in to change notification settings - Fork 6
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
PatternBurst before MacroDefs? #52
Comments
Hi Dan,
So the short answer is : yes, it is part of the spec. However the MacroDefs and Procedures before PatternBurst/Exec is allowed as well, but not implemented in the current version of the library. I can check what efforts are needed to implement it, but for sure I can not make it in the next 2 weeks. |
Just doing some reading about Lark, which I've never used. Can you hack the Tree to move MacroDefs and Procedures after PatternBurst/Exec? |
The problem is not in the Lark. You can see in the stil.lark file that all blocks are with "|" which means that the order of all blocks is not important. |
My comment was based on "the code" referenced below:
- If the MacroDefs and Procedures are before the PatternBurst blocks, it
is unknown which SignalGroups block will be used. This means that the code
must wait PatternBurst appearance to process the MacroDefs and Procedures
block.
- If the MacroDefs and Procedures are before the PatternExec blocks, it
is unknown which Timing block will be used. This means that the code must
wait PatternExec appearance to process the MacroDefs and Procedures block.
I'm not sure where "the code" is that is dependent on this ordering of
MacroDefs, Procedures and PatternBurst. But if you can hack the Lark tree
before "the code" executes, it will never know that the stil file has them
in a different order.
If "the code" is just semantic checking and unrelated to the dumping, maybe
somehow I can avoid the semantic checks. I am willing to assume I have a
semantically correct STIL file, so I don't want to check it, just dump the
expanded vectors.
…On Tue, Jun 28, 2022 at 2:46 PM seimit ***@***.***> wrote:
The problem is not in the Lark. You can see in the stil.lark file that all
blocks are with "|" which means that the order of all blocks is not
important.
The problem is in the semantic analyzer. I can easy remove this
restriction in the MacroDefsBlockParser.py , method
"b_macrodefs__OPEN_MACRO_DEFS_BLOCK", but I have to remove also all
semantic checks for signals/timings inside Macro/Procs.
—
Reply to this email directly, view it on GitHub
<#52 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNI66U24ONUNNRSNWAOBGLVRNJBTANCNFSM52AQOQ5A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi Dan, |
I reopen the issue, because now I have idea how to implement PatternBurst before MacroDefs/Procedure without writing double pass compiler. If I have more free time I will try to implemented. |
Is this really part of the spec? I have a stil written from a industry standard tool that has MacroDefs prior to PatternBurst. But the Pattern block is after the PatternBurst
lark.exceptions.VisitError: Error trying to process rule "b_macrodefs__OPEN_MACRO_DEFS_BLOCK":
Expected PatternBurst block before any MacroDefs block
The text was updated successfully, but these errors were encountered: