Closed dvc94ch closed 6 years ago
Nice idea, but a bit indegestible as is ..
What about putting it into a form suitable for displaying as a railroad diagram, by using this site: http://www.bottlecaps.de/rr/ui
Found this interesting tool k framework and thought I'd give it a try. It would allow defining the semantics and give a reference interpreter for ilang. I'm not sure yet what the semantics of a hardware description language are. It seems like currently semantics are defined in terms of the results from simulation, two designs that have the same waveform for all inputs are equivalent. Is there anything like synthesis semantics where the semantics are defined in terms of the cells it synthesizes? But having a railroad diagram is also a good idea
Is there anything like synthesis semantics where the semantics are defined in terms of the cells it synthesizes?
Well .. yes .. that's the whole point of synthesis .. but not really done from the point of view of a fully formal approach; it is normally done in an ad-hoc manner.
The intermediate 'language' is intended as a bridge between the behavioural form of HDLs, and the highly specific behaviour of cell libraries. It needs to be both easy to map to cells, and easy to be translated to from behavioural constructs.
We will slowly see more formal methods applied to synthesis, but I suspect it will be a gradual process, since performance is acceptable at the moment. The best bang per buck comes from applying formal methods to behavioural proofs, which is indeed where Clifford seems to be working at the moment..
Do hdl engineers think in terms of how a simulator works or in terms of the hardware they are trying to synthesize?
Both.
The reason being that the two may not be quite the same; there are some constructs that can simulate differently from the synthesised logic. However, this is usually an error on the part of the designer, such as missing a term from a sensitivity list.
Ideally, you describe the hardware by thinking only about the eventual logic. In the early days of synthesis, this meant being aware of the constructs generated from each type of clause, as some produced deeper logic than others. These days, that doesn't matter so much, as applying timing constraints will cause even quite tortuous logic trees to me smashed down and optimised.
The purely behavioural code is used in testbenches.
On Tue, 5 Jun 2018 at 02:16, David Craven notifications@github.com wrote:
Do hdl engineers think in terms of how a simulator works or in terms of the hardware they are trying to synthesize?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/YosysHQ/yosys/issues/558#issuecomment-394549084, or mute the thread https://github.com/notifications/unsubscribe-auth/AcYJ7TTYglVzGf9CbxOhn7K47mTW0lRLks5t5dv7gaJpZM4UYDIQ .
Here's a railroad pdf, generated from an antlr grammar. Shall I PR the antlr grammar and pdf? This version should be more or less correct since I based it on the bison parser instead of guessing by looking at a ilang file...
Interestingly ilang doesn't have an assert and assume statement.
Hello, will ilang bnf being supported by yosys? Original AST can be a little hard for frontend/backend composing, if all language can be targeted to antlr, and use antlr lexer and parser, contributions could be much easier.
If ilang is intended as an IR then it should have a bnf grammar. This is one I wrote for a racket parser which might serve as a starting point, but I'm sure it's still riddled with bugs.