StallAndWaitStatementAST.py (7567:238f99c9f441) | StallAndWaitStatementAST.py (10308:8c0870dbae5c) |
---|---|
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# Copyright (c) 2010 Advanced Micro Devices, Inc. 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 --- 21 unchanged lines hidden (view full) --- 30 31class StallAndWaitStatementAST(StatementAST): 32 def __init__(self, slicc, in_port, address): 33 super(StatementAST, self).__init__(slicc) 34 self.in_port = in_port 35 self.address = address 36 37 def __repr__(self): | 1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# Copyright (c) 2010 Advanced Micro Devices, Inc. 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 --- 21 unchanged lines hidden (view full) --- 30 31class StallAndWaitStatementAST(StatementAST): 32 def __init__(self, slicc, in_port, address): 33 super(StatementAST, self).__init__(slicc) 34 self.in_port = in_port 35 self.address = address 36 37 def __repr__(self): |
38 return "[StallAndWaitStatementAst: %r]" % self.variable | 38 return "[StallAndWaitStatementAst: %r]" % self.in_port |
39 40 def generate(self, code, return_type): 41 self.in_port.assertType("InPort") 42 self.address.assertType("Address") 43 44 in_port_code = self.in_port.var.code 45 address_code = self.address.var.code 46 code(''' 47 stallBuffer(&($in_port_code), $address_code); 48 $in_port_code.stallMessage($address_code); 49 ''') | 39 40 def generate(self, code, return_type): 41 self.in_port.assertType("InPort") 42 self.address.assertType("Address") 43 44 in_port_code = self.in_port.var.code 45 address_code = self.address.var.code 46 code(''' 47 stallBuffer(&($in_port_code), $address_code); 48 $in_port_code.stallMessage($address_code); 49 ''') |