ArgParser.scala (a74491fc58c5cd01127b775542f99dfb2da0e736) ArgParser.scala (8cfc24b28454f1915c339ce79485711f8e438f59)
1/***************************************************************************************
2* Copyright (c) 2024 Beijing Institute of Open Source Chip (BOSC)
3* Copyright (c) 2020-2024 Institute of Computing Technology, Chinese Academy of Sciences
4* Copyright (c) 2020-2021 Peng Cheng Laboratory
5*
6* XiangShan is licensed under Mulan PSL v2.
7* You can use this software according to the terms and conditions of the Mulan PSL v2.
8* You may obtain a copy of Mulan PSL v2 at:

--- 13 unchanged lines hidden (view full) ---

22import xiangshan.{DebugOptionsKey, XSTileKey}
23import freechips.rocketchip.tile.MaxHartIdBits
24import difftest.DifftestModule
25
26import scala.annotation.tailrec
27import scala.sys.exit
28import chisel3.util.log2Up
29import utility._
1/***************************************************************************************
2* Copyright (c) 2024 Beijing Institute of Open Source Chip (BOSC)
3* Copyright (c) 2020-2024 Institute of Computing Technology, Chinese Academy of Sciences
4* Copyright (c) 2020-2021 Peng Cheng Laboratory
5*
6* XiangShan is licensed under Mulan PSL v2.
7* You can use this software according to the terms and conditions of the Mulan PSL v2.
8* You may obtain a copy of Mulan PSL v2 at:

--- 13 unchanged lines hidden (view full) ---

22import xiangshan.{DebugOptionsKey, XSTileKey}
23import freechips.rocketchip.tile.MaxHartIdBits
24import difftest.DifftestModule
25
26import scala.annotation.tailrec
27import scala.sys.exit
28import chisel3.util.log2Up
29import utility._
30import device.IMSICBusType
30
31object ArgParser {
32 // TODO: add more explainations
33 val usage =
34 """
35 |XiangShan Options
36 |--xs-help print this help message
37 |--version print version info

--- 101 unchanged lines hidden (view full) ---

139 case "--disable-alwaysdb" :: tail =>
140 nextOption(config.alter((site, here, up) => {
141 case DebugOptionsKey => up(DebugOptionsKey).copy(AlwaysBasicDB = false)
142 }), tail)
143 case "--xstop-prefix" :: value :: tail =>
144 nextOption(config.alter((site, here, up) => {
145 case SoCParamsKey => up(SoCParamsKey).copy(XSTopPrefix = Some(value))
146 }), tail)
31
32object ArgParser {
33 // TODO: add more explainations
34 val usage =
35 """
36 |XiangShan Options
37 |--xs-help print this help message
38 |--version print version info

--- 101 unchanged lines hidden (view full) ---

140 case "--disable-alwaysdb" :: tail =>
141 nextOption(config.alter((site, here, up) => {
142 case DebugOptionsKey => up(DebugOptionsKey).copy(AlwaysBasicDB = false)
143 }), tail)
144 case "--xstop-prefix" :: value :: tail =>
145 nextOption(config.alter((site, here, up) => {
146 case SoCParamsKey => up(SoCParamsKey).copy(XSTopPrefix = Some(value))
147 }), tail)
147 case "--imsic-use-tl" :: tail =>
148 case "--imsic-bus-type" :: value :: tail =>
148 nextOption(config.alter((site, here, up) => {
149 nextOption(config.alter((site, here, up) => {
149 case SoCParamsKey => up(SoCParamsKey).copy(IMSICUseTL = true)
150 case SoCParamsKey => up(SoCParamsKey).copy(IMSICBusType = device.IMSICBusType.withName(value))
150 }), tail)
151 case "--enable-ns" :: tail =>
152 nextOption(config.alter((site, here, up) => {
153 case coupledL2.tl2chi.NonSecureKey => true
154 }), tail)
155 case "--firtool-opt" :: option :: tail =>
156 firtoolOpts ++= option.split(" ").filter(_.nonEmpty)
157 nextOption(config, tail)

--- 83 unchanged lines hidden ---
151 }), tail)
152 case "--enable-ns" :: tail =>
153 nextOption(config.alter((site, here, up) => {
154 case coupledL2.tl2chi.NonSecureKey => true
155 }), tail)
156 case "--firtool-opt" :: option :: tail =>
157 firtoolOpts ++= option.split(" ").filter(_.nonEmpty)
158 nextOption(config, tail)

--- 83 unchanged lines hidden ---