litex/soc/integration: use format_constant for soc.h
This commit is contained in:
parent
51a6914afa
commit
12e1f3f4da
|
@ -28,6 +28,7 @@ from sysconfig import get_platform
|
||||||
|
|
||||||
from migen import *
|
from migen import *
|
||||||
|
|
||||||
|
from litex.gen.format import format_constant
|
||||||
from litex.soc.interconnect.csr import CSRStatus
|
from litex.soc.interconnect.csr import CSRStatus
|
||||||
from litex.soc.integration.soc import SoCRegion
|
from litex.soc.integration.soc import SoCRegion
|
||||||
|
|
||||||
|
@ -181,7 +182,7 @@ def get_soc_header(constants, with_access_functions=True):
|
||||||
value = "\"" + value + "\""
|
value = "\"" + value + "\""
|
||||||
ctype = "const char *"
|
ctype = "const char *"
|
||||||
else:
|
else:
|
||||||
value = str(value)
|
value = format_constant(value)
|
||||||
ctype = "int"
|
ctype = "int"
|
||||||
r += "#define "+name+" "+value+"\n"
|
r += "#define "+name+" "+value+"\n"
|
||||||
if with_access_functions:
|
if with_access_functions:
|
||||||
|
|
Loading…
Reference in New Issue