Skip to content

Commit ebcced5

Browse files
committed
Merge branch 'master' into release; update to 3.1.0 release.
2 parents 0cc9e8f + 2990411 commit ebcced5

34 files changed

+71
-55
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Chisel Tutorials (Release branch)
1+
Chisel Tutorials (Development branch)
22
================
33

44
These are the tutorials for [Chisel](https://github.com/ucb-bar/chisel3).
@@ -14,7 +14,7 @@ Getting the Repo
1414
$ git clone https://github.com/ucb-bar/chisel-tutorial.git
1515
$ cd chisel-tutorial
1616
$ git fetch origin
17-
$ git checkout release
17+
$ git checkout master
1818

1919

2020
Executing Chisel

build.sbt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def scalacOptionsVersion(scalaVersion: String): Seq[String] = {
44
// switch to support our anonymous Bundle definitions:
55
// https://github.com/scala/bug/issues/10047
66
CrossVersion.partialVersion(scalaVersion) match {
7-
case Some((2, scalaMajor: Int)) if scalaMajor < 12 => Seq()
7+
case Some((2, scalaMajor: Long)) if scalaMajor < 12 => Seq()
88
case _ => Seq("-Xsource:2.11")
99
}
1010
}
@@ -16,7 +16,7 @@ def javacOptionsVersion(scalaVersion: String): Seq[String] = {
1616
// Java 7 compatible code for Scala 2.11
1717
// for compatibility with old clients.
1818
CrossVersion.partialVersion(scalaVersion) match {
19-
case Some((2, scalaMajor: Int)) if scalaMajor < 12 =>
19+
case Some((2, scalaMajor: Long)) if scalaMajor < 12 =>
2020
Seq("-source", "1.7", "-target", "1.7")
2121
case _ =>
2222
Seq("-source", "1.8", "-target", "1.8")
@@ -26,21 +26,21 @@ def javacOptionsVersion(scalaVersion: String): Seq[String] = {
2626

2727
organization := "edu.berkeley.cs"
2828

29-
version := "3.0.0"
29+
version := "3.1.0"
3030

3131
name := "chisel-tutorial"
3232

33-
scalaVersion := "2.11.11"
33+
scalaVersion := "2.11.12"
3434

35-
crossScalaVersions := Seq("2.11.11", "2.12.3")
35+
crossScalaVersions := Seq("2.11.12", "2.12.4")
3636

3737
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-language:reflectiveCalls")
3838

3939
// Provide a managed dependency on X if -DXVersion="" is supplied on the command line.
40-
// The following are the default development versions, not the "release" versions.
40+
// The following are the current "release" versions.
4141
val defaultVersions = Map(
42-
"chisel3" -> "3.0.+",
43-
"chisel-iotesters" -> "1.1.+"
42+
"chisel3" -> "3.1.+",
43+
"chisel-iotesters" -> "1.2.+"
4444
)
4545

4646
libraryDependencies ++= (Seq("chisel3","chisel-iotesters").map {

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 0.13.16
1+
sbt.version = 1.1.1

run-examples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
args=$@
3-
sbt -v "test:run-main examples.Launcher $args"
3+
sbt -v "test:runMain examples.Launcher $args"

run-problem.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
args=$@
3-
sbt "test:run-main problems.Launcher $args"
3+
sbt "test:runMain problems.Launcher $args"

run-solution.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
args=$@
3-
sbt "test:run-main solutions.Launcher $args"
3+
sbt "test:runMain solutions.Launcher $args"

src/main/scala/examples/Router.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Packet extends Bundle {
3232
*
3333
* @param n is the number of fanned outputs for the routed packet
3434
*/
35-
class RouterIO(n: Int) extends Bundle {
35+
class RouterIO(val n: Int) extends Bundle {
3636
val read_routing_table_request = DeqIO(new ReadCmd())
3737
val read_routing_table_response = EnqIO(UInt(Router.addressWidth.W))
3838
val load_routing_table_request = DeqIO(new WriteCmd())

src/main/scala/examples/Stack.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ package examples
44
import chisel3._
55
import chisel3.util.log2Ceil
66

7-
import scala.collection.mutable.HashMap
8-
import scala.collection.mutable.{Stack => ScalaStack}
9-
import scala.util.Random
10-
117
class Stack(val depth: Int) extends Module {
128
val io = IO(new Bundle {
139
val push = Input(Bool())

src/main/scala/problems/VecShiftRegisterSimple.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class VecShiftRegisterSimple extends Module {
1515
})
1616

1717
val initValues = Seq.fill(4) { 0.U(8.W) }
18-
val delays = RegInit(Vec(initValues))
18+
val delays = RegInit(VecInit(initValues))
1919

2020
// Implement below ----------
2121

src/main/scala/solutions/Mul.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Mul extends Module {
2121
for (i <- 0 until 16)
2222
for (j <- 0 until 16)
2323
mulsValues += (i * j).asUInt(8.W)
24-
val tbl = Vec(mulsValues)
24+
val tbl = VecInit(mulsValues)
2525
io.z := tbl((io.x << 4.U) | io.y)
2626

2727
}

0 commit comments

Comments
 (0)