StateMachine.py (10012:ec5a5bfb941d) StateMachine.py (10078:9400a90ec5d1)
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;

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

453#else
454#define APPEND_TRANSITION_COMMENT(str) do {} while (0)
455#endif
456
457/** \\brief constructor */
458$c_ident::$c_ident(const Params *p)
459 : AbstractController(p)
460{
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;

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

453#else
454#define APPEND_TRANSITION_COMMENT(str) do {} while (0)
455#endif
456
457/** \\brief constructor */
458$c_ident::$c_ident(const Params *p)
459 : AbstractController(p)
460{
461 m_name = "${ident}";
461 m_machineID.type = MachineType_${ident};
462 m_machineID.num = m_version;
462''')
463 num_in_ports = len(self.in_ports)
464 code(' m_in_ports = $num_in_ports;')
465 code.indent()
466
467 #
468 # After initializing the universal machine parameters, initialize the
469 # this machines config parameters. Also detemine if these configuration

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

540}
541
542void
543$c_ident::init()
544{
545 MachineType machine_type = string_to_MachineType("${{var.machine.ident}}");
546 int base M5_VAR_USED = MachineType_base_number(machine_type);
547
463''')
464 num_in_ports = len(self.in_ports)
465 code(' m_in_ports = $num_in_ports;')
466 code.indent()
467
468 #
469 # After initializing the universal machine parameters, initialize the
470 # this machines config parameters. Also detemine if these configuration

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

541}
542
543void
544$c_ident::init()
545{
546 MachineType machine_type = string_to_MachineType("${{var.machine.ident}}");
547 int base M5_VAR_USED = MachineType_base_number(machine_type);
548
548 m_machineID.type = MachineType_${ident};
549 m_machineID.num = m_version;
550
551 // initialize objects
552
553''')
554
555 code.indent()
556 for var in self.objects:
557 vtype = var.type
558 vid = "m_%s_ptr" % var.c_ident

--- 983 unchanged lines hidden ---
549 // initialize objects
550
551''')
552
553 code.indent()
554 for var in self.objects:
555 vtype = var.type
556 vid = "m_%s_ptr" % var.c_ident

--- 983 unchanged lines hidden ---