PeekStatementAST.py (10967:b36204de88c0) | PeekStatementAST.py (11111:6da33e720481) |
---|---|
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 --- 63 unchanged lines hidden (view full) --- 72''') 73 74 if self.pairs.has_key("block_on"): 75 address_field = self.pairs['block_on'] 76 code(''' 77 if (m_is_blocking && 78 (m_block_map.count(in_msg_ptr->m_$address_field) == 1) && 79 (m_block_map[in_msg_ptr->m_$address_field] != &$qcode)) { | 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 --- 63 unchanged lines hidden (view full) --- 72''') 73 74 if self.pairs.has_key("block_on"): 75 address_field = self.pairs['block_on'] 76 code(''' 77 if (m_is_blocking && 78 (m_block_map.count(in_msg_ptr->m_$address_field) == 1) && 79 (m_block_map[in_msg_ptr->m_$address_field] != &$qcode)) { |
80 $qcode.delayHead(); | 80 $qcode.delayHead(clockEdge(), cyclesToTicks(Cycles(1))); |
81 continue; 82 } 83 ''') 84 85 if self.pairs.has_key("wake_up"): 86 address_field = self.pairs['wake_up'] 87 code(''' 88 if (m_waiting_buffers.count(in_msg_ptr->m_$address_field) > 0) { 89 wakeUpBuffers(in_msg_ptr->m_$address_field); 90 } 91 ''') 92 93 # The other statements 94 self.statements.generate(code, return_type) 95 self.symtab.popFrame() 96 code("}") 97 98 def findResources(self, resources): 99 self.statements.findResources(resources) | 81 continue; 82 } 83 ''') 84 85 if self.pairs.has_key("wake_up"): 86 address_field = self.pairs['wake_up'] 87 code(''' 88 if (m_waiting_buffers.count(in_msg_ptr->m_$address_field) > 0) { 89 wakeUpBuffers(in_msg_ptr->m_$address_field); 90 } 91 ''') 92 93 # The other statements 94 self.statements.generate(code, return_type) 95 self.symtab.popFrame() 96 code("}") 97 98 def findResources(self, resources): 99 self.statements.findResources(resources) |