From 35dd5554ba20635aca081d48db1d63b0b7afd997 Mon Sep 17 00:00:00 2001 From: Michal Sieron Date: Thu, 3 Mar 2022 11:59:26 +0100 Subject: [PATCH 1/3] tools/litex_json2renode: Add cv32e40p support --- litex/tools/litex_json2renode.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/litex/tools/litex_json2renode.py b/litex/tools/litex_json2renode.py index 788c53057..e77c41bb8 100755 --- a/litex/tools/litex_json2renode.py +++ b/litex/tools/litex_json2renode.py @@ -253,6 +253,24 @@ cpu: CPU.RiscV32 @ sysbus timeProvider: empty interruptMode: InterruptMode.Vectored """ + elif kind == 'cv32e40p': + result = """ +cpu: CPU.CV32E40P @ sysbus +""" + if variant == 'standard': + result += """ + cpuType: "rv32imc" +""" + else: + result += """ + cpuType: "rv32imc" +""" + if time_provider: + result += """ + timeProvider: {} +""".format(time_provider) + + return result else: raise Exception('Unsupported cpu type: {}'.format(kind)) From d86bdb71ecf205156c65213dd2ca61a15358ef72 Mon Sep 17 00:00:00 2001 From: Michal Sieron Date: Thu, 3 Mar 2022 12:03:03 +0100 Subject: [PATCH 2/3] tools/litex_json2renode: Don't use generic RV32 for Ibex --- litex/tools/litex_json2renode.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/litex/tools/litex_json2renode.py b/litex/tools/litex_json2renode.py index e77c41bb8..8137a5b35 100755 --- a/litex/tools/litex_json2renode.py +++ b/litex/tools/litex_json2renode.py @@ -248,10 +248,7 @@ cpu: CPU.PicoRV32 @ sysbus """ elif kind == 'ibex': return """ -cpu: CPU.RiscV32 @ sysbus - cpuType: "rv32imc" - timeProvider: empty - interruptMode: InterruptMode.Vectored +cpu: CPU.IbexRiscV32 @ sysbus """ elif kind == 'cv32e40p': result = """ From c3fb321532c6560899c4bda7f0f0d70f6f45c3e4 Mon Sep 17 00:00:00 2001 From: Michal Sieron Date: Thu, 3 Mar 2022 12:04:33 +0100 Subject: [PATCH 3/3] tools/litex_json2renode: Add support for Minerva --- litex/tools/litex_json2renode.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litex/tools/litex_json2renode.py b/litex/tools/litex_json2renode.py index 8137a5b35..259eea571 100755 --- a/litex/tools/litex_json2renode.py +++ b/litex/tools/litex_json2renode.py @@ -245,6 +245,10 @@ cpu: CPU.VexRiscv @ sysbus return """ cpu: CPU.PicoRV32 @ sysbus cpuType: "rv32imc" +""" + elif kind == 'minerva': + return """ +cpu: CPU.Minerva @ sysbus """ elif kind == 'ibex': return """