params.py (14049:b9aea12fc52c) params.py (14052:8e23338327aa)
1# Copyright (c) 2012-2014, 2017-2019 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

1480 code('#include "enums/$0.hh"', cls.__name__)
1481
1482 @classmethod
1483 def cxx_ini_parse(cls, code, src, dest, ret):
1484 code('if (false) {')
1485 for elem_name in cls.map.keys():
1486 code('} else if (%s == "%s") {' % (src, elem_name))
1487 code.indent()
1# Copyright (c) 2012-2014, 2017-2019 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

1480 code('#include "enums/$0.hh"', cls.__name__)
1481
1482 @classmethod
1483 def cxx_ini_parse(cls, code, src, dest, ret):
1484 code('if (false) {')
1485 for elem_name in cls.map.keys():
1486 code('} else if (%s == "%s") {' % (src, elem_name))
1487 code.indent()
1488 code('%s = Enums::%s;' % (dest, elem_name))
1488 name = cls.__name__ if cls.enum_name is None else cls.enum_name
1489 code('%s = %s::%s;' % (dest, name if cls.is_class else 'Enums',
1490 elem_name))
1489 code('%s true;' % ret)
1490 code.dedent()
1491 code('} else {')
1492 code(' %s false;' % ret)
1493 code('}')
1494
1495 def getValue(self):
1496 import m5.internal.params

--- 695 unchanged lines hidden ---
1491 code('%s true;' % ret)
1492 code.dedent()
1493 code('} else {')
1494 code(' %s false;' % ret)
1495 code('}')
1496
1497 def getValue(self):
1498 import m5.internal.params

--- 695 unchanged lines hidden ---