ArgParser.scala (e3da8bad334fc71ba0d72f0607e2e93245ddaece) ArgParser.scala (1fc8b8778a8bfc722c895017ebb477b5ecdd325e)
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:

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

65 list match {
66 case Nil => config
67 case "--xs-help" :: tail =>
68 println(usage)
69 if(tail == Nil) exit(0)
70 nextOption(config, tail)
71 case "--config" :: confString :: tail =>
72 nextOption(getConfigByName(confString), tail)
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:

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

65 list match {
66 case Nil => config
67 case "--xs-help" :: tail =>
68 println(usage)
69 if(tail == Nil) exit(0)
70 nextOption(config, tail)
71 case "--config" :: confString :: tail =>
72 nextOption(getConfigByName(confString), tail)
73 case "--issue" :: issueString :: tail =>
74 nextOption(config.alter((site, here, up) => {
75 case coupledL2.tl2chi.CHIIssue => issueString
76 }), tail)
73 case "--num-cores" :: value :: tail =>
74 nextOption(config.alter((site, here, up) => {
75 case XSTileKey => (0 until value.toInt) map { i =>
76 up(XSTileKey).head.copy(HartId = i)
77 }
78 case MaxHartIdBits =>
79 log2Up(value.toInt) max up(MaxHartIdBits)
80 }), tail)

--- 81 unchanged lines hidden ---
77 case "--num-cores" :: value :: tail =>
78 nextOption(config.alter((site, here, up) => {
79 case XSTileKey => (0 until value.toInt) map { i =>
80 up(XSTileKey).head.copy(HartId = i)
81 }
82 case MaxHartIdBits =>
83 log2Up(value.toInt) max up(MaxHartIdBits)
84 }), tail)

--- 81 unchanged lines hidden ---