Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .mill-version

This file was deleted.

8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
BUILD_DIR = ./build

PRJ = playground

test:
mill -i $(PRJ).test
mill -i test

verilog:
$(call git_commit, "generate verilog")
mkdir -p $(BUILD_DIR)
mill -i $(PRJ).runMain Elaborate --target-dir $(BUILD_DIR)
mill -i runMain Elaborate --target-dir $(BUILD_DIR)

help:
mill -i $(PRJ).runMain Elaborate --help
mill -i runMain Elaborate --help

reformat:
mill -i __.reformat
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Contents at a glance:
* `.gitignore` - helps Git ignore junk like generated files, build products, and temporary files.
* `build.mill` - instructs mill to build the Chisel project
* `Makefile` - rules to call mill
* `playground/src/GCD.scala` - GCD source file
* `playground/src/DecoupledGCD.scala` - another GCD source file
* `playground/src/Elaborate.scala` - wrapper file to call chisel command with the GCD module
* `playground/test/src/GCDSpec.scala` - GCD tester
* `src/GCD.scala` - GCD source file
* `src/DecoupledGCD.scala` - another GCD source file
* `src/Elaborate.scala` - wrapper file to call chisel command with the GCD module
* `test/src/GCDSpec.scala` - GCD tester

Feel free to rename or delete files under `playground/` or use them as a reference/template.
Feel free to rename or delete files under `src/` and `test/` or use them as a reference/template.

## Getting Started

Expand Down
29 changes: 9 additions & 20 deletions build.mill
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
//| mill-version: 1.0.6

package build

// import Mill dependency
import mill._
import mill.define.Sources
import mill.modules.Util
import mill.scalalib.scalafmt.ScalafmtModule
import mill.scalalib.TestModule.ScalaTest
import mill.scalalib._
// support BSP
import mill.bsp._

object playground extends ScalaModule with ScalafmtModule { m =>
override def scalaVersion = "2.13.15"
object `package` extends ScalaModule with ScalafmtModule { m =>
override def scalaVersion = "2.13.18"

override def scalacOptions = Seq(
"-language:reflectiveCalls",
Expand All @@ -20,22 +17,14 @@ object playground extends ScalaModule with ScalafmtModule { m =>
"-Xcheckinit"
)

override def ivyDeps = Agg(ivy"org.chipsalliance::chisel:6.6.0")
override def scalacPluginIvyDeps = Agg(ivy"org.chipsalliance:::chisel-plugin:6.6.0")
override def mvnDeps = Seq(mvn"org.chipsalliance::chisel:7.6.0")
override def scalacPluginMvnDeps = Seq(mvn"org.chipsalliance:::chisel-plugin:7.6.0")

object test extends ScalaTests with TestModule.ScalaTest with ScalafmtModule {
override def ivyDeps = m.ivyDeps() ++ Agg(
ivy"org.scalatest::scalatest::3.2.19",
override def mvnDeps = m.mvnDeps() ++ Seq(
mvn"org.scalatest::scalatest::3.2.19",
// for formal flow in future
ivy"edu.berkeley.cs::chiseltest:6.0.0"
mvn"edu.berkeley.cs::chiseltest:6.0.0"
)
}

def repositoriesTask = Task.Anon {
Seq(
coursier.MavenRepository("https://repo.scala-sbt.org/scalasbt/maven-releases"),
coursier.MavenRepository("https://oss.sonatype.org/content/repositories/releases"),
coursier.MavenRepository("https://oss.sonatype.org/content/repositories/snapshots")
) ++ super.repositoriesTask()
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.