StateMachine.py (7542:49327b849c7f) StateMachine.py (7566:6919df046bba)
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;

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

489 if "random" in var:
490 # A buffer
491 code('$vid->setRandomization(${{var["random"]}});')
492
493 # Set Priority
494 if vtype.isBuffer and \
495 "rank" in var and "trigger_queue" not in var:
496 code('$vid->setPriority(${{var["rank"]}});')
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;

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

489 if "random" in var:
490 # A buffer
491 code('$vid->setRandomization(${{var["random"]}});')
492
493 # Set Priority
494 if vtype.isBuffer and \
495 "rank" in var and "trigger_queue" not in var:
496 code('$vid->setPriority(${{var["rank"]}});')
497
497 else:
498 # Network port object
499 network = var["network"]
500 ordered = var["ordered"]
501 vnet = var["virtual_network"]
502
503 assert var.machine is not None
504 code('''

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

532''')
533
534 # set description (may be overriden later by port def)
535 code('''
536$vid->setDescription("[Version " + to_string(m_version) + ", ${ident}, name=${{var.c_ident}}]");
537
538''')
539
498 else:
499 # Network port object
500 network = var["network"]
501 ordered = var["ordered"]
502 vnet = var["virtual_network"]
503
504 assert var.machine is not None
505 code('''

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

533''')
534
535 # set description (may be overriden later by port def)
536 code('''
537$vid->setDescription("[Version " + to_string(m_version) + ", ${ident}, name=${{var.c_ident}}]");
538
539''')
540
541 if vtype.isBuffer:
542 if "recycle_latency" in var:
543 code('$vid->setRecycleLatency(${{var["recycle_latency"]}});')
544 else:
545 code('$vid->setRecycleLatency(m_recycle_latency);')
546
547
540 # Set the queue consumers
541 code.insert_newline()
542 for port in self.in_ports:
543 code('${{port.code}}.setConsumer(this);')
544
545 # Set the queue descriptions
546 code.insert_newline()
547 for port in self.in_ports:

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

557 stall = True
558
559 # Only possible if it is not a 'z' case
560 if not stall:
561 state = "%s_State_%s" % (self.ident, trans.state.ident)
562 event = "%s_Event_%s" % (self.ident, trans.event.ident)
563 code('m_profiler.possibleTransition($state, $event);')
564
548 # Set the queue consumers
549 code.insert_newline()
550 for port in self.in_ports:
551 code('${{port.code}}.setConsumer(this);')
552
553 # Set the queue descriptions
554 code.insert_newline()
555 for port in self.in_ports:

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

565 stall = True
566
567 # Only possible if it is not a 'z' case
568 if not stall:
569 state = "%s_State_%s" % (self.ident, trans.state.ident)
570 event = "%s_Event_%s" % (self.ident, trans.event.ident)
571 code('m_profiler.possibleTransition($state, $event);')
572
565 # added by SS to initialize recycle_latency of message buffers
566 for buf in self.message_buffer_names:
567 code("$buf->setRecycleLatency(m_recycle_latency);")
568
569 code.dedent()
570 code('}')
571
572 has_mandatory_q = False
573 for port in self.in_ports:
574 if port.code.find("mandatoryQueue_ptr") >= 0:
575 has_mandatory_q = True
576

--- 755 unchanged lines hidden ---
573 code.dedent()
574 code('}')
575
576 has_mandatory_q = False
577 for port in self.in_ports:
578 if port.code.find("mandatoryQueue_ptr") >= 0:
579 has_mandatory_q = True
580

--- 755 unchanged lines hidden ---