Merge pull request #623 from Dolu1990/vexriscv_smp

cpu/vexriscv_smp Add --with-coherent-dma  --without-coherent-dma
This commit is contained in:
enjoy-digital 2020-08-06 14:31:20 +02:00 committed by GitHub
commit d5062d1f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 7 deletions

View File

@ -45,6 +45,8 @@ class VexRiscvSMP(CPU):
@staticmethod @staticmethod
def args_fill(parser): def args_fill(parser):
parser.add_argument("--cpu-count", default=1, help="") parser.add_argument("--cpu-count", default=1, help="")
parser.add_argument("--with-coherent-dma", action='store_true', help="")
parser.add_argument("--without-coherent-dma", action='store_true', help="")
parser.add_argument("--dcache-width", default=None, help="L1 data cache bus width") parser.add_argument("--dcache-width", default=None, help="L1 data cache bus width")
parser.add_argument("--icache-width", default=None, help="L1 instruction cache bus width") parser.add_argument("--icache-width", default=None, help="L1 instruction cache bus width")
parser.add_argument("--dcache-size", default=None, help="L1 data cache size in byte per CPU") parser.add_argument("--dcache-size", default=None, help="L1 data cache size in byte per CPU")
@ -64,6 +66,8 @@ class VexRiscvSMP(CPU):
VexRiscvSMP.dcache_ways = 2 VexRiscvSMP.dcache_ways = 2
VexRiscvSMP.icache_ways = 2 VexRiscvSMP.icache_ways = 2
VexRiscvSMP.coherent_dma = True VexRiscvSMP.coherent_dma = True
if(args.with_coherent_dma): VexRiscvSMP.coherent_dma = bool(True)
if(args.without_coherent_dma): VexRiscvSMP.coherent_dma = bool(False)
if(args.dcache_width): VexRiscvSMP.dcache_width = int(args.dcache_width) if(args.dcache_width): VexRiscvSMP.dcache_width = int(args.dcache_width)
if(args.icache_width): VexRiscvSMP.icache_width = int(args.icache_width) if(args.icache_width): VexRiscvSMP.icache_width = int(args.icache_width)
if(args.icache_width): VexRiscvSMP.dcache_size = int(args.dcache_size) if(args.icache_width): VexRiscvSMP.dcache_size = int(args.dcache_size)