Stop using deprecated FileSystemUtilities to create files
This commit is contained in:
parent
832e56d3c7
commit
fe670e5421
2
chisel3
2
chisel3
@ -1 +1 @@
|
||||
Subproject commit 54cd58cbb435170dd2ed67dafe1cb1d769a799e8
|
||||
Subproject commit ce42ef15128a626e723249ae7b129fb5a370fa9c
|
2
firrtl
2
firrtl
@ -1 +1 @@
|
||||
Subproject commit b7de40e23161a7346fea90576f07b5c200c2675b
|
||||
Subproject commit 81f631bc87aa22fff8569e96ae5c4e429df9e1d4
|
@ -1 +1 @@
|
||||
Subproject commit 45f346678d0d6acfe894daa6321058b5857dfc72
|
||||
Subproject commit a07029b8dbaa4385f94130da238b26b69f89b539
|
@ -6,7 +6,7 @@ import Chisel._
|
||||
import cde.Parameters
|
||||
import uncore.devices.{DbBusConsts, DMKey}
|
||||
|
||||
object TestBenchGeneration extends FileSystemUtilities {
|
||||
object TestBenchGeneration {
|
||||
def generateVerilogFragment(
|
||||
topModuleName: String, configClassName: String, p: Parameters) = {
|
||||
val nMemChannel = p(NMemoryChannels)
|
||||
@ -298,7 +298,7 @@ object TestBenchGeneration extends FileSystemUtilities {
|
||||
end
|
||||
""" } mkString
|
||||
|
||||
val f = createOutputFile(s"$topModuleName.$configClassName.tb.vfrag")
|
||||
val f = TestGeneration.createOutputFile(s"$topModuleName.$configClassName.tb.vfrag")
|
||||
f.write(debugDefs + nasti_defs + nasti_delays + instantiation + ticks)
|
||||
f.close
|
||||
}
|
||||
@ -391,7 +391,7 @@ object TestBenchGeneration extends FileSystemUtilities {
|
||||
#endif
|
||||
""" } mkString
|
||||
|
||||
val f = createOutputFile(s"$topModuleName.$configClassName.tb.cpp")
|
||||
val f = TestGeneration.createOutputFile(s"$topModuleName.$configClassName.tb.cpp")
|
||||
f.write(assigns)
|
||||
f.write(interrupts)
|
||||
f.close
|
||||
|
@ -41,7 +41,7 @@ class BenchmarkTestSuite(makePrefix: String, val dir: String, val names: LinkedH
|
||||
override def toString = s"$makeTargetName = \\\n" + names.map(n => s"\t$n.riscv").mkString(" \\\n") + postScript
|
||||
}
|
||||
|
||||
object TestGeneration extends FileSystemUtilities{
|
||||
object TestGeneration {
|
||||
import scala.collection.mutable.HashMap
|
||||
val asmSuites = new LinkedHashMap[String,AssemblyTestSuite]()
|
||||
val bmarkSuites = new HashMap[String,BenchmarkTestSuite]()
|
||||
@ -90,6 +90,9 @@ run-$kind-tests-fast: $$(addprefix $$(output_dir)/, $$(addsuffix .run, $targets)
|
||||
).mkString("\n"))
|
||||
f.close
|
||||
}
|
||||
|
||||
def createOutputFile(name: String) =
|
||||
new java.io.FileWriter(s"${Driver.targetDir}/$name")
|
||||
}
|
||||
|
||||
object DefaultTestSuites {
|
||||
@ -170,7 +173,7 @@ object DefaultTestSuites {
|
||||
"cm","cs","cv","cy","dc","df","dm","do","dr","ds","du","dv").map(_+"_matmul")): _*))
|
||||
}
|
||||
|
||||
object TestGenerator extends App with FileSystemUtilities {
|
||||
object TestGenerator extends App {
|
||||
val projectName = args(0)
|
||||
val topModuleName = args(1)
|
||||
val configClassName = args(2)
|
||||
@ -199,16 +202,16 @@ object TestGenerator extends App with FileSystemUtilities {
|
||||
TestBenchGeneration.generateCPPFragment(
|
||||
topModuleName, configClassName, paramsFromConfig)
|
||||
|
||||
val pdFile = createOutputFile(s"$topModuleName.$configClassName.prm")
|
||||
val pdFile = TestGeneration.createOutputFile(s"$topModuleName.$configClassName.prm")
|
||||
pdFile.write(ParameterDump.getDump)
|
||||
pdFile.close
|
||||
val v = createOutputFile(configClassName + ".knb")
|
||||
val v = TestGeneration.createOutputFile(configClassName + ".knb")
|
||||
v.write(world.getKnobs)
|
||||
v.close
|
||||
val d = new java.io.FileOutputStream(Driver.targetDir + "/" + configClassName + ".cfg")
|
||||
d.write(paramsFromConfig(ConfigString))
|
||||
d.close
|
||||
val w = createOutputFile(configClassName + ".cst")
|
||||
val w = TestGeneration.createOutputFile(configClassName + ".cst")
|
||||
w.write(world.getConstraints)
|
||||
w.close
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import uncore.tilelink._
|
||||
import uncore.agents._
|
||||
import uncore.coherence._
|
||||
|
||||
object UncoreBuilder extends App with FileSystemUtilities {
|
||||
object UncoreBuilder extends App {
|
||||
val topModuleName = args(0)
|
||||
val configClassName = args(1)
|
||||
val config = try {
|
||||
@ -28,7 +28,7 @@ object UncoreBuilder extends App with FileSystemUtilities {
|
||||
|
||||
chiselMain.run(args.drop(2), gen)
|
||||
|
||||
val pdFile = createOutputFile(s"$topModuleName.prm")
|
||||
val pdFile = new java.io.FileWriter(s"${Driver.targetDir}/$topModuleName.prm")
|
||||
pdFile.write(ParameterDump.getDump)
|
||||
pdFile.close
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user