slicc: support for multiple message types on the same buffer
Review Request #2789 - Created May 11, 2015 and submitted
| Information | |
|---|---|
| Tony Gutierrez | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10819:2f5c6078ccc8
---------------------------
slicc: support for multiple message types on the same buffer
This patch allows SLICC protocols to use more than one message type with a
message buffer. For example, you can declare two in ports as such:
in_port(ResponseQueue_in, ResponseMsg, responseFromDir, rank=3) { ... }
in_port(tgtResponseQueue_in, TgtResponseMsg, responseFromDir, rank=2) { ... }
Issue Summary
| Description | From | Last Updated | Status |
|---|---|---|---|
| Could you explain why an exception is required here? Looking through the rest of the gem5 code, the only other ... | Jason Lowe-Power | May 12, 2015, 3:02 p.m. | Open |
I need a clarification on the proposed syntax. Is one port being nested inside the other? For example
in_port() {
in_port() {
}
}
Or the two in_ports have separate declarations (not nested), but they share the same message buffer?
-
src/mem/slicc/ast/PeekStatementAST.py (Diff revision 1) -
Could you explain why an exception is required here? Looking through the rest of the gem5 code, the only other times we use exceptions are in the python-c++ bindings and our string wrappers.
If using the exception is really required (or if it is significantly easier to implement with exceptions) I don't have any problems with it, but it seems like there is almost always a more elegant solution. I think it's worth a little explanation since we so rarely use them in gem5.
-
src/mem/slicc/symbols/StateMachine.py (Diff revision 1) -
I think this should be panic, not fatal. It's on the border so I could easily be persuaded. But I think it would be useful to have an abort() here, not an exit(1) call. Note: 8.1 Fatal v. Panic. It's mostly that this error happens during runtime, not at configuration time, that makes me think it should be a panic. (It's also a panic below in the other case of a failure.)
Description: |
|
||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+78 -6) |
