Generator.scala (f4ef5325a605ea8365971ebda8b3ac9c184f7865) | Generator.scala (e3da8bad334fc71ba0d72f0607e2e93245ddaece) |
---|---|
1/*************************************************************************************** | 1/*************************************************************************************** |
2* Copyright (c) 2020-2021 Institute of Computing Technology, Chinese Academy of Sciences | 2* Copyright (c) 2024 Beijing Institute of Open Source Chip (BOSC) 3* Copyright (c) 2020-2024 Institute of Computing Technology, Chinese Academy of Sciences |
3* Copyright (c) 2020-2021 Peng Cheng Laboratory 4* 5* XiangShan is licensed under Mulan PSL v2. 6* You can use this software according to the terms and conditions of the Mulan PSL v2. 7* You may obtain a copy of Mulan PSL v2 at: 8* http://license.coscl.org.cn/MulanPSL2 9* 10* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 11* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 12* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 13* 14* See the Mulan PSL v2 for more details. 15***************************************************************************************/ 16 17package top 18 19import circt.stage._ 20import chisel3.stage.ChiselGeneratorAnnotation | 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: 9* http://license.coscl.org.cn/MulanPSL2 10* 11* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 12* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 13* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 14* 15* See the Mulan PSL v2 for more details. 16***************************************************************************************/ 17 18package top 19 20import circt.stage._ 21import chisel3.stage.ChiselGeneratorAnnotation |
21import xiangshan.types.RunFirrtlTransformAnnotation | |
22import xiangshan.transforms._ 23 24object Generator { 25 def execute(args: Array[String], mod: => chisel3.RawModule, firtoolOpts: Array[String]) = { | 22import xiangshan.transforms._ 23 24object Generator { 25 def execute(args: Array[String], mod: => chisel3.RawModule, firtoolOpts: Array[String]) = { |
26 val annotations = chisel3.BuildInfo.version match { 27 case "3.6.0" => Seq( 28 RunFirrtlTransformAnnotation(new PrintControl), 29 RunFirrtlTransformAnnotation(new PrintModuleName) 30 ) 31 case _ => firtoolOpts.map(FirtoolOption.apply).toSeq 32 } | 26 val annotations = firtoolOpts.map(FirtoolOption.apply).toSeq |
33 | 27 |
34 (new XiangShanStage).execute(args, ChiselGeneratorAnnotation(mod _) +: annotations) | 28 (new XiangShanStage).execute(args, ChiselGeneratorAnnotation(() => mod) +: annotations) |
35 } 36} | 29 } 30} |