Merge pull request #513 from josuah/master

lattice_ecp5_evn: add_jtagbone flag
This commit is contained in:
enjoy-digital 2023-08-01 11:38:23 +02:00 committed by GitHub
commit f780b5faed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View file

@ -1,9 +1,10 @@
interface ftdi adapter driver ftdi
ftdi_vid_pid 0x0403 0x6010 adapter speed 25000
ftdi_channel 0 transport select jtag
ftdi_layout_init 0xfff8 0xfffb ftdi vid_pid 0x0403 0x6010
ftdi channel 0
ftdi layout_init 0x00e8 0x60eb
reset_config none reset_config none
adapter_khz 5000 set _CHIPNAME ecp5
jtag newtap $_CHIPNAME tap -irlen 8 -expected-id 0x81113043
jtag newtap ecp5 tap -irlen 8 -expected-id 0x81113043

View file

@ -46,6 +46,7 @@ class _CRG(LiteXModule):
class BaseSoC(SoCCore): class BaseSoC(SoCCore):
def __init__(self, sys_clk_freq=50e6, toolchain="trellis", x5_clk_freq=None, def __init__(self, sys_clk_freq=50e6, toolchain="trellis", x5_clk_freq=None,
with_led_chaser = True, with_led_chaser = True,
with_jtagbone = True,
**kwargs): **kwargs):
platform = lattice_ecp5_evn.Platform(toolchain=toolchain) platform = lattice_ecp5_evn.Platform(toolchain=toolchain)
@ -55,6 +56,10 @@ class BaseSoC(SoCCore):
# SoCCore ---------------------------------------------------------------------------------- # SoCCore ----------------------------------------------------------------------------------
SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on ECP5 Evaluation Board", **kwargs) SoCCore.__init__(self, platform, sys_clk_freq, ident="LiteX SoC on ECP5 Evaluation Board", **kwargs)
# JtagBone ---------------------------------------------------------------------------------
if with_jtagbone:
self.add_jtagbone()
# Leds ------------------------------------------------------------------------------------- # Leds -------------------------------------------------------------------------------------
if with_led_chaser: if with_led_chaser:
self.leds = LedChaser( self.leds = LedChaser(
@ -68,12 +73,14 @@ def main():
parser = LiteXArgumentParser(platform=lattice_ecp5_evn.Platform, description="LiteX SoC on ECP5 Evaluation Board.") parser = LiteXArgumentParser(platform=lattice_ecp5_evn.Platform, description="LiteX SoC on ECP5 Evaluation Board.")
parser.add_target_argument("--sys-clk-freq", default=60e6, type=float, help="System clock frequency.") parser.add_target_argument("--sys-clk-freq", default=60e6, type=float, help="System clock frequency.")
parser.add_target_argument("--x5-clk-freq", type=int, help="Use X5 oscillator as system clock at the specified frequency.") parser.add_target_argument("--x5-clk-freq", type=int, help="Use X5 oscillator as system clock at the specified frequency.")
parser.add_target_argument("--with-jtagbone", action="store_true", help="Add JTAGBone.")
args = parser.parse_args() args = parser.parse_args()
soc = BaseSoC( soc = BaseSoC(
toolchain = args.toolchain, toolchain = args.toolchain,
sys_clk_freq = args.sys_clk_freq, sys_clk_freq = args.sys_clk_freq,
x5_clk_freq = args.x5_clk_freq, x5_clk_freq = args.x5_clk_freq,
with_jtagbone = args.with_jtagbone,
**parser.soc_argdict) **parser.soc_argdict)
builder = Builder(soc, **parser.builder_argdict) builder = Builder(soc, **parser.builder_argdict)
if args.build: if args.build: