diff options
author | David Hashe <david.hashe@amd.com> | 2015-07-20 09:15:18 -0500 |
---|---|---|
committer | David Hashe <david.hashe@amd.com> | 2015-07-20 09:15:18 -0500 |
commit | 910638f3381ab2c421486eb2353ab60e3676688c (patch) | |
tree | 2c2c8be8647b7fb4a6563ff9101135968131f2b9 /src | |
parent | 3d8c8a85faaf63d96064693f4826f58ce88c8c9f (diff) | |
download | gem5-910638f3381ab2c421486eb2353ab60e3676688c.tar.xz |
slicc: Fix bug in enqueue and peek statements.
These were not generating the correct c names for types declared within a
machine scope.
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/slicc/ast/EnqueueStatementAST.py | 5 | ||||
-rw-r--r-- | src/mem/slicc/ast/PeekStatementAST.py | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/mem/slicc/ast/EnqueueStatementAST.py b/src/mem/slicc/ast/EnqueueStatementAST.py index e08e49808..930540494 100644 --- a/src/mem/slicc/ast/EnqueueStatementAST.py +++ b/src/mem/slicc/ast/EnqueueStatementAST.py @@ -1,3 +1,4 @@ +# Copyright (c) 2013 Advanced Micro Devices, Inc. # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # All rights reserved. @@ -54,8 +55,8 @@ class EnqueueStatementAST(StatementAST): self.symtab.newSymbol(v) # Declare message - code("std::shared_ptr<${{msg_type.ident}}> out_msg = "\ - "std::make_shared<${{msg_type.ident}}>(clockEdge());") + code("std::shared_ptr<${{msg_type.c_ident}}> out_msg = "\ + "std::make_shared<${{msg_type.c_ident}}>(clockEdge());") # The other statements t = self.statements.generate(code, None) diff --git a/src/mem/slicc/ast/PeekStatementAST.py b/src/mem/slicc/ast/PeekStatementAST.py index cecb9aa9f..f5ef91daf 100644 --- a/src/mem/slicc/ast/PeekStatementAST.py +++ b/src/mem/slicc/ast/PeekStatementAST.py @@ -1,3 +1,4 @@ +# Copyright (c) 2013 Advanced Micro Devices, Inc. # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # All rights reserved. @@ -55,7 +56,7 @@ class PeekStatementAST(StatementAST): self.queue_name.assertType("InPort") # Declare the new "in_msg_ptr" variable - mtid = msg_type.ident + mtid = msg_type.c_ident qcode = self.queue_name.var.code code(''' { |