URL
https://opencores.org/ocsvn/tcp_socket/tcp_socket/trunk
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 4 |
Line 29... |
Line 29... |
if contents is not None:
|
if contents is not None:
|
for location, value in enumerate(contents, reg):
|
for location, value in enumerate(contents, reg):
|
self.memory_content_4[location] = value
|
self.memory_content_4[location] = value
|
return reg
|
return reg
|
|
|
|
def regsize(self, reg):
|
|
return self.all_registers[reg][1]
|
|
|
def new(self, size, name="temporary_register"):
|
def new(self, size, name="temporary_register"):
|
assert type(size) == int
|
assert type(size) == int
|
reg = 0
|
reg = 0
|
while reg in self.registers:
|
while reg in self.registers or (reg in self.all_registers and self.regsize(reg) != size):
|
reg += 1
|
reg += 1
|
self.registers.append(reg)
|
self.registers.append(reg)
|
self.all_registers[reg] = (name, size)
|
self.all_registers[reg] = (name, size)
|
return reg
|
return reg
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.