params.py (11498:e0cbca57e1e9) | params.py (11620:57f21c16adde) |
---|---|
1# Copyright (c) 2012-2014 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 --- 764 unchanged lines hidden (view full) --- 773 self.end = Addr(args[1]) 774 else: 775 raise TypeError, "Too many arguments specified" 776 777 if kwargs: 778 raise TypeError, "Too many keywords: %s" % kwargs.keys() 779 780 def __str__(self): | 1# Copyright (c) 2012-2014 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 --- 764 unchanged lines hidden (view full) --- 773 self.end = Addr(args[1]) 774 else: 775 raise TypeError, "Too many arguments specified" 776 777 if kwargs: 778 raise TypeError, "Too many keywords: %s" % kwargs.keys() 779 780 def __str__(self): |
781 return '%s:%s' % (self.start, self.end) | 781 return '%s:%s:%s:%s:%s:%s' \ 782 % (self.start, self.end, self.intlvHighBit, self.xorHighBit,\ 783 self.intlvBits, self.intlvMatch) |
782 783 def size(self): 784 # Divide the size by the size of the interleaving slice 785 return (long(self.end) - long(self.start) + 1) >> self.intlvBits 786 787 @classmethod 788 def cxx_predecls(cls, code): 789 Addr.cxx_predecls(code) --- 4 unchanged lines hidden (view full) --- 794 Addr.swig_predecls(code) 795 796 @classmethod 797 def cxx_ini_predecls(cls, code): 798 code('#include <sstream>') 799 800 @classmethod 801 def cxx_ini_parse(cls, code, src, dest, ret): | 784 785 def size(self): 786 # Divide the size by the size of the interleaving slice 787 return (long(self.end) - long(self.start) + 1) >> self.intlvBits 788 789 @classmethod 790 def cxx_predecls(cls, code): 791 Addr.cxx_predecls(code) --- 4 unchanged lines hidden (view full) --- 796 Addr.swig_predecls(code) 797 798 @classmethod 799 def cxx_ini_predecls(cls, code): 800 code('#include <sstream>') 801 802 @classmethod 803 def cxx_ini_parse(cls, code, src, dest, ret): |
802 code('uint64_t _start, _end;') | 804 code('uint64_t _start, _end, _intlvHighBit = 0, _xorHighBit = 0;') 805 code('uint64_t _intlvBits = 0, _intlvMatch = 0;') |
803 code('char _sep;') 804 code('std::istringstream _stream(${src});') 805 code('_stream >> _start;') 806 code('_stream.get(_sep);') 807 code('_stream >> _end;') | 806 code('char _sep;') 807 code('std::istringstream _stream(${src});') 808 code('_stream >> _start;') 809 code('_stream.get(_sep);') 810 code('_stream >> _end;') |
811 code('if (!_stream.fail() && !_stream.eof()) {') 812 code(' _stream.get(_sep);') 813 code(' _stream >> _intlvHighBit;') 814 code(' _stream.get(_sep);') 815 code(' _stream >> _xorHighBit;') 816 code(' _stream.get(_sep);') 817 code(' _stream >> _intlvBits;') 818 code(' _stream.get(_sep);') 819 code(' _stream >> _intlvMatch;') 820 code('}') |
|
808 code('bool _ret = !_stream.fail() &&' 809 '_stream.eof() && _sep == \':\';') 810 code('if (_ret)') | 821 code('bool _ret = !_stream.fail() &&' 822 '_stream.eof() && _sep == \':\';') 823 code('if (_ret)') |
811 code(' ${dest} = AddrRange(_start, _end);') | 824 code(' ${dest} = AddrRange(_start, _end, _intlvHighBit, \ 825 _xorHighBit, _intlvBits, _intlvMatch);') |
812 code('${ret} _ret;') 813 814 def getValue(self): 815 # Go from the Python class to the wrapped C++ class generated 816 # by swig 817 from m5.internal.range import AddrRange 818 819 return AddrRange(long(self.start), long(self.end), --- 1298 unchanged lines hidden --- | 826 code('${ret} _ret;') 827 828 def getValue(self): 829 # Go from the Python class to the wrapped C++ class generated 830 # by swig 831 from m5.internal.range import AddrRange 832 833 return AddrRange(long(self.start), long(self.end), --- 1298 unchanged lines hidden --- |