targets: Use "" for strings.

This commit is contained in:
Florent Kermarrec 2022-04-21 15:48:29 +02:00
parent 353aba0359
commit 575d681891
8 changed files with 26 additions and 26 deletions

View file

@ -74,10 +74,10 @@ class BaseSoC(SoCCore):
# SoCCore ---------------------------------------------------------------------------------- # SoCCore ----------------------------------------------------------------------------------
if kwargs.get("cpu_type", None) == "zynqmp": if kwargs.get("cpu_type", None) == "zynqmp":
kwargs['integrated_sram_size'] = 0 kwargs["integrated_sram_size"] = 0
kwargs['with_uart'] = False kwargs["with_uart"] = False
self.mem_map = { self.mem_map = {
'csr': 0x8000_0000, # Zynq GP0 default "csr": 0x8000_0000, # Zynq GP0 default
} }
SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on Alinx AXU2CGA", **kwargs) SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on Alinx AXU2CGA", **kwargs)
@ -90,7 +90,7 @@ class BaseSoC(SoCCore):
self.submodules += axi.AXI2Wishbone( self.submodules += axi.AXI2Wishbone(
axi = self.cpu.add_axi_gp_master(2, 32), axi = self.cpu.add_axi_gp_master(2, 32),
wishbone = wb_lpd, wishbone = wb_lpd,
base_address = self.mem_map['csr']) base_address = self.mem_map["csr"])
self.bus.add_master(master=wb_lpd) self.bus.add_master(master=wb_lpd)
self.bus.add_region("sram", SoCRegion( self.bus.add_region("sram", SoCRegion(
@ -102,7 +102,7 @@ class BaseSoC(SoCCore):
size = 512 * 1024 * 1024 // 8, size = 512 * 1024 * 1024 // 8,
linker = True) linker = True)
) )
self.constants['CONFIG_CLOCK_FREQUENCY'] = 1199880127 self.constants["CONFIG_CLOCK_FREQUENCY"] = 1199880127
# Leds ------------------------------------------------------------------------------------- # Leds -------------------------------------------------------------------------------------
if with_led_chaser: if with_led_chaser:

View file

@ -167,7 +167,7 @@ class BaseSoC(SoCCore):
class LiteDRAMSettingsEncoder(json.JSONEncoder): class LiteDRAMSettingsEncoder(json.JSONEncoder):
def default(self, o): def default(self, o):
if isinstance(o, (ControllerSettings, GeomSettings, PhySettings, TimingSettings)): if isinstance(o, (ControllerSettings, GeomSettings, PhySettings, TimingSettings)):
ignored = ['self', 'refresh_cls'] ignored = ["self", "refresh_cls"]
return {k: v for k, v in vars(o).items() if k not in ignored} return {k: v for k, v in vars(o).items() if k not in ignored}
elif isinstance(o, Signal) and isinstance(o.reset, Constant): elif isinstance(o, Signal) and isinstance(o.reset, Constant):
return o.reset return o.reset

View file

@ -61,8 +61,8 @@ class BaseSoC(SoCCore):
# SoCCore ---------------------------------------------------------------------------------- # SoCCore ----------------------------------------------------------------------------------
if kwargs.get("cpu_type", None) == "zynq7000": if kwargs.get("cpu_type", None) == "zynq7000":
kwargs['integrated_sram_size'] = 0 kwargs["integrated_sram_size"] = 0
kwargs['with_uart'] = False kwargs["with_uart"] = False
self.mem_map = { self.mem_map = {
'csr': 0x4000_0000, # Zynq GP0 default 'csr': 0x4000_0000, # Zynq GP0 default
} }
@ -82,7 +82,7 @@ class BaseSoC(SoCCore):
self.submodules += axi.AXI2Wishbone( self.submodules += axi.AXI2Wishbone(
axi = self.cpu.add_axi_gp_master(), axi = self.cpu.add_axi_gp_master(),
wishbone = wb_gp0, wishbone = wb_gp0,
base_address = self.mem_map['csr']) base_address = self.mem_map["csr"])
self.bus.add_master(master=wb_gp0) self.bus.add_master(master=wb_gp0)
# Leds ------------------------------------------------------------------------------------- # Leds -------------------------------------------------------------------------------------

View file

@ -78,15 +78,15 @@ class BaseSoC(SoCCore):
self.bus.add_master(master=wb_gp0) self.bus.add_master(master=wb_gp0)
self.bus.add_region("sram", SoCRegion( self.bus.add_region("sram", SoCRegion(
origin=self.cpu.mem_map["sram"], origin = self.cpu.mem_map["sram"],
size=512 * 1024 * 1024 - self.cpu.mem_map["sram"]) size = 512 * 1024 * 1024 - self.cpu.mem_map["sram"])
) )
self.bus.add_region("rom", SoCRegion( self.bus.add_region("rom", SoCRegion(
origin=self.cpu.mem_map["rom"], origin = self.cpu.mem_map["rom"],
size=256 * 1024 * 1024 // 8, size = 256 * 1024 * 1024 // 8,
linker=True) linker = True)
) )
self.constants['CONFIG_CLOCK_FREQUENCY'] = 666666687 self.constants["CONFIG_CLOCK_FREQUENCY"] = 666666687
# Leds ------------------------------------------------------------------------------------- # Leds -------------------------------------------------------------------------------------
if with_led_chaser: if with_led_chaser:

View file

@ -92,7 +92,7 @@ class BaseSoC(SoCCore):
self.submodules += axi.AXI2Wishbone( self.submodules += axi.AXI2Wishbone(
axi = self.cpu.add_axi_gp_master(), axi = self.cpu.add_axi_gp_master(),
wishbone = wb_gp0, wishbone = wb_gp0,
base_address = self.mem_map['csr']) base_address = self.mem_map["csr"])
self.bus.add_master(master=wb_gp0) self.bus.add_master(master=wb_gp0)
# Leds ------------------------------------------------------------------------------------- # Leds -------------------------------------------------------------------------------------

View file

@ -54,7 +54,7 @@ class BaseSoC(SoCCore):
# SoCCore ---------------------------------------------------------------------------------- # SoCCore ----------------------------------------------------------------------------------
kwargs["with_uart"] = False kwargs["with_uart"] = False
if kwargs.get("cpu_type", None) == "eos_s3": if kwargs.get("cpu_type", None) == "eos_s3":
kwargs['integrated_sram_size'] = 0 kwargs["integrated_sram_size"] = 0
SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on QuickLogic QuickFeather", **kwargs) SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on QuickLogic QuickFeather", **kwargs)
# EOS-S3 Integration ----------------------------------------------------------------------- # EOS-S3 Integration -----------------------------------------------------------------------

View file

@ -66,7 +66,7 @@ class BaseSoC(SoCCore):
# SoCCore ---------------------------------------------------------------------------------- # SoCCore ----------------------------------------------------------------------------------
if kwargs.get("cpu_type", None) == "zynqmp": if kwargs.get("cpu_type", None) == "zynqmp":
kwargs['integrated_sram_size'] = 0 kwargs["integrated_sram_size"] = 0
SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on KV260", **kwargs) SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on KV260", **kwargs)
# ZynqMP Integration ----------------------------------------------------------------------- # ZynqMP Integration -----------------------------------------------------------------------
@ -134,15 +134,15 @@ class BaseSoC(SoCCore):
base_address = self.mem_map["csr"]) base_address = self.mem_map["csr"])
self.bus.add_master(master=wb_gp0) self.bus.add_master(master=wb_gp0)
self.bus.add_region("sram", SoCRegion( self.bus.add_region("sram", SoCRegion(
origin=self.cpu.mem_map["sram"], origin = self.cpu.mem_map["sram"],
size=2 * 1024 * 1024 * 1024) # DDR size = 2 * 1024 * 1024 * 1024) # DDR
) )
self.bus.add_region("rom", SoCRegion( self.bus.add_region("rom", SoCRegion(
origin=self.cpu.mem_map["rom"], origin = self.cpu.mem_map["rom"],
size=512 * 1024 * 1024 // 8, size = 512 * 1024 * 1024 // 8,
linker=True) linker = True)
) )
self.constants['CONFIG_CLOCK_FREQUENCY'] = 1333333008 self.constants["CONFIG_CLOCK_FREQUENCY"] = 1333333008
def finalize(self, *args, **kwargs): def finalize(self, *args, **kwargs):
super(BaseSoC, self).finalize(*args, **kwargs) super(BaseSoC, self).finalize(*args, **kwargs)

View file

@ -55,7 +55,7 @@ class BaseSoC(SoCCore):
# SoCCore ---------------------------------------------------------------------------------- # SoCCore ----------------------------------------------------------------------------------
if kwargs.get("cpu_type", None) == "zynqmp": if kwargs.get("cpu_type", None) == "zynqmp":
kwargs['integrated_sram_size'] = 0 kwargs["integrated_sram_size"] = 0
SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on ZCU216", **kwargs) SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on ZCU216", **kwargs)
# ZynqMP Integration ----------------------------------------------------------------------- # ZynqMP Integration -----------------------------------------------------------------------
@ -122,7 +122,7 @@ class BaseSoC(SoCCore):
size = 512 * 1024 * 1024 // 8, size = 512 * 1024 * 1024 // 8,
linker = True) linker = True)
) )
self.constants['CONFIG_CLOCK_FREQUENCY'] = 1200000000 self.constants["CONFIG_CLOCK_FREQUENCY"] = 1200000000
# LEDs ------------------------------------------------------------------------------------- # LEDs -------------------------------------------------------------------------------------
if with_led_chaser: if with_led_chaser: