1# Copyright (c) 2013 Advanced Micro Devices, Inc. |
2# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3# Copyright (c) 2009 The Hewlett-Packard Development Company 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer; --- 40 unchanged lines hidden (view full) --- 50 msg_type = self.type_ast.type 51 52 # Add new local var to symbol table 53 v = Var(self.symtab, "out_msg", self.location, msg_type, "*out_msg", 54 self.pairs) 55 self.symtab.newSymbol(v) 56 57 # Declare message |
58 code("std::shared_ptr<${{msg_type.c_ident}}> out_msg = "\ 59 "std::make_shared<${{msg_type.c_ident}}>(clockEdge());") |
60 61 # The other statements 62 t = self.statements.generate(code, None) 63 self.queue_name.assertType("OutPort") 64 65 if self.latexpr != None: 66 ret_type, rcode = self.latexpr.inline(True) 67 code("(${{self.queue_name.var.code}}).enqueue(" \ --- 13 unchanged lines hidden --- |