StateMachine.py (7055:4e24742201d7) StateMachine.py (7056:b66b558578bd)
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;

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

325 *
326 * Auto generated C++ code started by $__file__:$__line__
327 * Created by slicc definition of Module "${{self.short}}"
328 */
329
330#include <sstream>
331#include <string>
332
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;

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

325 *
326 * Auto generated C++ code started by $__file__:$__line__
327 * Created by slicc definition of Module "${{self.short}}"
328 */
329
330#include <sstream>
331#include <string>
332
333#include "mem/ruby/common/Global.hh"
334#include "mem/ruby/slicc_interface/RubySlicc_includes.hh"
333#include "base/cprintf.hh"
335#include "mem/protocol/${ident}_Controller.hh"
336#include "mem/protocol/${ident}_State.hh"
337#include "mem/protocol/${ident}_Event.hh"
338#include "mem/protocol/Types.hh"
334#include "mem/protocol/${ident}_Controller.hh"
335#include "mem/protocol/${ident}_State.hh"
336#include "mem/protocol/${ident}_Event.hh"
337#include "mem/protocol/Types.hh"
338#include "mem/ruby/common/Global.hh"
339#include "mem/ruby/slicc_interface/RubySlicc_includes.hh"
339#include "mem/ruby/system/System.hh"
340
341using namespace std;
342''')
343
344 # include object classes
345 seen_types = set()
346 for var in self.objects:

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

521 code('''
522if (m_buffer_size > 0) {
523 $vid->setSize(m_buffer_size);
524}
525''')
526
527 # set description (may be overriden later by port def)
528 code('''
340#include "mem/ruby/system/System.hh"
341
342using namespace std;
343''')
344
345 # include object classes
346 seen_types = set()
347 for var in self.objects:

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

522 code('''
523if (m_buffer_size > 0) {
524 $vid->setSize(m_buffer_size);
525}
526''')
527
528 # set description (may be overriden later by port def)
529 code('''
529$vid->setDescription("[Version " + int_to_string(m_version) + ", ${ident}, name=${{var.c_ident}}]");
530$vid->setDescription("[Version " + to_string(m_version) + ", ${ident}, name=${{var.c_ident}}]");
530
531''')
532
533 # Set the queue consumers
534 code.insert_newline()
535 for port in self.in_ports:
536 code('${{port.code}}.setConsumer(this);')
537
538 # Set the queue descriptions
539 code.insert_newline()
540 for port in self.in_ports:
531
532''')
533
534 # Set the queue consumers
535 code.insert_newline()
536 for port in self.in_ports:
537 code('${{port.code}}.setConsumer(this);')
538
539 # Set the queue descriptions
540 code.insert_newline()
541 for port in self.in_ports:
541 code('${{port.code}}.setDescription("[Version " + int_to_string(m_version) + ", $ident, $port]");')
542 code('${{port.code}}.setDescription("[Version " + to_string(m_version) + ", $ident, $port]");')
542
543 # Initialize the transition profiling
544 code.insert_newline()
545 for trans in self.transitions:
546 # Figure out if we stall
547 stall = False
548 for action in trans.actions:
549 if action.ident == "z_stall":

--- 685 unchanged lines hidden ---
543
544 # Initialize the transition profiling
545 code.insert_newline()
546 for trans in self.transitions:
547 # Figure out if we stall
548 stall = False
549 for action in trans.actions:
550 if action.ident == "z_stall":

--- 685 unchanged lines hidden ---