示例#1
0
文件: hardware.py 项目: agent001/HCL
    def _sizeof_type(self, type_name):
        '''Returns the size of words required by some type'''

        ans = 0
        if type_name in TYPE_SIZE:
            ans = TYPE_SIZE[type_name]
        else:
            ans = utilities.compound_sizeof(type_name)

        return ans
示例#2
0
	def _sizeof_type(self, type_name):
		'''Returns the size of words required by some type'''

		ans = 0
		if type_name in TYPE_SIZE:
			ans = TYPE_SIZE[type_name]
		else:
			ans = utilities.compound_sizeof(type_name)

		return ans
示例#3
0
文件: hardware.py 项目: agent001/HCL
    def _sizeof_variable(self, variable):
        '''Returns the size of words required by some variable in the amv'''

        var_type, var_addr = self.amv[variable]
        ans = 0
        if var_type in TYPE_SIZE:
            ans = TYPE_SIZE[var_type]
        else:
            ans = utilities.compound_sizeof(var_type)

        return ans
示例#4
0
	def _sizeof_variable(self, variable):
		'''Returns the size of words required by some variable in the amv'''

		var_type, var_addr = self.amv[variable]
		ans = 0
		if var_type in TYPE_SIZE:
			ans = TYPE_SIZE[var_type]
		else:
			ans = utilities.compound_sizeof(var_type)

		return ans