1
0
Fork 0

build: include chiselName and give an example of using it (#738)

This commit is contained in:
Wesley W. Terpstra 2017-05-12 06:25:58 -07:00 committed by GitHub
parent 18725a05b0
commit 05e7501e7a
2 changed files with 5 additions and 2 deletions

View File

@ -15,7 +15,8 @@ object BuildSettings extends Build {
parallelExecution in Global := false,
traceLevel := 15,
scalacOptions ++= Seq("-deprecation","-unchecked"),
libraryDependencies ++= Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value)
libraryDependencies ++= Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
)
lazy val chisel = project in file("chisel3")

View File

@ -3,6 +3,7 @@
package uncore.tilelink2
import Chisel._
import chisel3.experimental.chiselName
import config._
import diplomacy._
import util._
@ -27,7 +28,8 @@ class TLRAM(address: AddressSet, executable: Boolean = true, beatBytes: Int = 4)
// We require the address range to include an entire beat (for the write mask)
require ((address.mask & (beatBytes-1)) == beatBytes-1)
lazy val module = new LazyModuleImp(this) {
lazy val module = new Implementation
@chiselName class Implementation extends LazyModuleImp(this) {
val io = new Bundle {
val in = node.bundleIn
}