Merge pull request #1424 from ucb-bar/new-cfg-finder

New Scala-based Config Finder
This commit is contained in:
Abraham Gonzalez
2023-04-05 13:41:56 -07:00
committed by GitHub
5 changed files with 29 additions and 86 deletions

View File

@@ -0,0 +1,19 @@
package chipyard
import org.reflections.Reflections
import org.reflections.scanners.Scanners.SubTypes
import scala.jdk.CollectionConverters._
import scala.collection.{SortedSet}
import freechips.rocketchip.config.{Config}
object ConfigFinder {
def main(args: Array[String]) = {
val reflections = new Reflections()
val classes = reflections.get(SubTypes.of(classOf[Config]).asClass()).asScala
val sortedClasses = SortedSet[String]() ++ classes.map(_.getName)
for (cls <- sortedClasses) {
println(cls)
}
}
}