InPortDeclAST.py (10981:b300dcda5896) InPortDeclAST.py (10984:a86f453a7caa)
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 71 unchanged lines hidden (view full) ---

80
81 if machine.EntryType != None:
82 param_types.append(machine.EntryType)
83 if machine.TBEType != None:
84 param_types.append(machine.TBEType)
85
86 # Add the trigger method - FIXME, this is a bit dirty
87 pairs = { "external" : "yes" }
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 71 unchanged lines hidden (view full) ---

80
81 if machine.EntryType != None:
82 param_types.append(machine.EntryType)
83 if machine.TBEType != None:
84 param_types.append(machine.TBEType)
85
86 # Add the trigger method - FIXME, this is a bit dirty
87 pairs = { "external" : "yes" }
88 func = Func(self.symtab, "trigger", self.location, void_type,
89 param_types, [], "", pairs)
88 trigger_func_name = "trigger"
89 for param in param_types:
90 trigger_func_name += "_" + param.ident
91 func = Func(self.symtab, trigger_func_name, "trigger", self.location,
92 void_type, param_types, [], "", pairs)
90 symtab.newSymbol(func)
91
92 # Add the stallPort method - this hacks reschedules the controller
93 # for stalled messages that don't trigger events
93 symtab.newSymbol(func)
94
95 # Add the stallPort method - this hacks reschedules the controller
96 # for stalled messages that don't trigger events
94 func = Func(self.symtab, "stallPort", self.location, void_type, [],
95 [], "", pairs)
97 func = Func(self.symtab, "stallPort", "stallPort", self.location,
98 void_type, [], [], "", pairs)
96 symtab.newSymbol(func)
97
98 param_types = []
99 # Check for Event2
100 type = symtab.find("Event", Type)
101 if type is None:
102 self.error("in_port decls require 'Event' enumeration")
103

--- 20 unchanged lines hidden ---
99 symtab.newSymbol(func)
100
101 param_types = []
102 # Check for Event2
103 type = symtab.find("Event", Type)
104 if type is None:
105 self.error("in_port decls require 'Event' enumeration")
106

--- 20 unchanged lines hidden ---