Skip to content

Commit 8bf5de7

Browse files
Merge pull request #756 from trabucayre/colognechip_gatemate_evb_a2
targets,platforms/colognechip_gatemate_evb: added A2 variant via --device arg, switch toolchain to peppercorn
2 parents 3abf3a1 + 42f04b9 commit 8bf5de7

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

docs/boards_inventory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ python3 .github/scripts/generate_board_inventory.py --write
4343
| `bochenjingxin_kintex7_basec` | bochenjingxin_kintex7_basec | vivado | `125000000.0` | - | included |
4444
| `brisbaneSilicon_brs_100_gw1nr9` | brisbaneSilicon_brs_100_gw1nr9 | gowin | `27000000.0` | - | included |
4545
| `camlink_4k` | camlink_4k | trellis | `81000000.0` | - | included |
46-
| `colognechip_gatemate_evb` | colognechip_gatemate_evb | colognechip | `24000000.0` | SDCard, SPI SDCard, SPI Flash | included |
46+
| `colognechip_gatemate_evb` | colognechip_gatemate_evb | peppercorn | `24000000.0` | SDCard, SPI SDCard, SPI Flash | included |
4747
| `colorlight_5a_75x` | colorlight_5a_75b, colorlight_5a_75e, colorlight_i5a_907 | trellis | `60000000.0` | Ethernet, Etherbone, SPI Flash | included |
4848
| `colorlight_i5` | colorlight_i5 | trellis | `60000000.0` | Ethernet, Etherbone, SDCard, SPI SDCard, Video Terminal, Video Framebuffer | included |
4949
| `colorlight_i9plus` | colorlight_i9plus | vivado | `100000000.0` | Ethernet, Etherbone, SPI Flash | included |

litex_boards/platforms/colognechip_gatemate_evb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ class Platform(CologneChipPlatform):
147147
default_clk_name = "clk10"
148148
default_clk_period = 1e9/10e6
149149

150-
def __init__(self, toolchain="colognechip"):
151-
CologneChipPlatform.__init__(self, "CCGM1A1", _io, _connectors, toolchain=toolchain)
150+
def __init__(self, toolchain="peppercorn", device="A1"):
151+
CologneChipPlatform.__init__(self, f"CCGM1{device}", _io, _connectors, toolchain=toolchain)
152152

153153
def create_programmer(self):
154-
return OpenFPGALoader("gatemate_evb_jtag")
154+
return OpenFPGALoader("gatemate_evb_jtag", index_chain=0)
155155

156156
def do_finalize(self, fragment):
157157
CologneChipPlatform.do_finalize(self, fragment)

litex_boards/targets/colognechip_gatemate_evb.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ def __init__(self, platform, sys_clk_freq):
5151
# BaseSoC ------------------------------------------------------------------------------------------
5252

5353
class 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",
120120
def 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

Comments
 (0)