@@ -51,12 +51,12 @@ def __init__(self, platform, sys_clk_freq):
5151# BaseSoC ------------------------------------------------------------------------------------------
5252
5353class BaseSoC (SoCCore ):
54- def __init__ (self , sys_clk_freq = 48e6 , toolchain = "colognechip " ,
54+ def __init__ (self , device = "A1" , sys_clk_freq = 48e6 , toolchain = "peppercorn " ,
5555 with_l2_cache = False ,
5656 with_led_chaser = True ,
5757 with_spi_flash = True ,
5858 ** kwargs ):
59- platform = colognechip_gatemate_evb .Platform (toolchain )
59+ platform = colognechip_gatemate_evb .Platform (toolchain , device )
6060
6161 # USBUART PMOD as Serial--------------------------------------------------------------------
6262 platform .add_extension (colognechip_gatemate_evb .usb_pmod_io ("PMODB" ))
@@ -120,6 +120,7 @@ def __init__(self, sys_clk_freq=48e6, toolchain="colognechip",
120120def main ():
121121 from litex .build .parser import LiteXArgumentParser
122122 parser = LiteXArgumentParser (platform = colognechip_gatemate_evb .Platform , description = "LiteX SoC on Gatemate EVB" )
123+ parser .add_target_argument ("--device" , default = "A1" , help = "FPGA device (A1, A2)." )
123124 parser .add_target_argument ("--sys-clk-freq" , default = 24e6 , type = float , help = "System clock frequency." )
124125 parser .add_target_argument ("--flash" , action = "store_true" , help = "Flash bitstream." )
125126 parser .add_target_argument ("--with-spi-flash" , action = "store_true" , help = "Enable memory-mapped SPI flash." )
@@ -129,6 +130,7 @@ def main():
129130 args = parser .parse_args ()
130131
131132 soc = BaseSoC (
133+ device = args .device ,
132134 sys_clk_freq = args .sys_clk_freq ,
133135 toolchain = args .toolchain ,
134136 with_spi_flash = args .with_spi_flash ,
0 commit comments