mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc/integration/common: simplify get_version
This commit is contained in:
parent
4d761e1afd
commit
0a737cb624
1 changed files with 2 additions and 6 deletions
|
@ -20,12 +20,8 @@ def mem_decoder(address, size=0x10000000):
|
|||
return lambda a: (a[log2_int(size):] == (address >> log2_int(size)))
|
||||
|
||||
def get_version(with_time=True):
|
||||
if with_time:
|
||||
return datetime.datetime.fromtimestamp(
|
||||
time.time()).strftime("%Y-%m-%d %H:%M:%S")
|
||||
else:
|
||||
return datetime.datetime.fromtimestamp(
|
||||
time.time()).strftime("%Y-%m-%d")
|
||||
fmt = "%Y-%m-%d %H:%M:%S" if with_time else "%Y-%m-%d"
|
||||
return datetime.datetime.fromtimestamp(time.time()).strftime(fmt)
|
||||
|
||||
def get_mem_data(filename_or_regions, endianness="big", mem_size=None):
|
||||
# create memory regions
|
||||
|
|
Loading…
Reference in a new issue