Skip to content

Commit 52e6df4

Browse files
committed
Merge branch 'master' into release
2 parents 327d930 + 7ec20f5 commit 52e6df4

File tree

7 files changed

+15
-17
lines changed

7 files changed

+15
-17
lines changed

ChangeLog

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
ChangeLog for Chisel v2.2.37
1+
ChangeLog for Chisel v2.2.38
22

3-
#740 Wide rom fix
4-
Remove Getting Started and refer to Chisel3.
5-
Update README.md (point to Chisel3, add Resolvers to getting started build.sbt
3+
Move {as,to}{U,S}Int definitions to Node.scala, and add them as Bundle key words.
4+
Update deprecated Fill() usage in FillApp.scala.

ReleaseNotes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
ReleaseNotes for Chisel v2.2.37
1+
ReleaseNotes for Chisel v2.2.38
22

3-
This release of Chisel is a maintenance release, incorporating a bug fix for issue #740 - unable to create a ROM with datawidth more than 64 bits.
3+
This release of Chisel is a maintenance release, incorporating support for Chisel3's {as,to}{U,S}Int methods in all Chisel Data types.
44

55
We will be removing support for Scala 2.10 in future Chisel
66
releases. Please verify your code compiles and runs correctly under

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ def versionToArray(v: String): Array[String] = v.split('.')
22

33
lazy val chiselBuildSettings = Seq (
44
organization := "edu.berkeley.cs",
5-
// version := "2.2.37",
6-
version := "2.2.37",
5+
// version := "2.2.38",
6+
version := "2.2.38",
77
name := "Chisel",
88
scalaVersion := "2.11.7",
99
crossScalaVersions := Seq("2.10.6", "2.11.7"),

src/main/scala/Bits.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,8 @@ abstract class Bits extends Data with proc {
7272
}
7373

7474
def fromInt(x: Int): this.type
75-
def toSInt(): SInt = chiselCast(this){SInt()}
76-
def toUInt(): UInt = chiselCast(this){UInt()}
7775
override def getNode: Node = if (procAssigned) this else super.getNode
7876

79-
// Chisel3 - rename these to make the reinterpret cast more explicit
80-
final def asUInt() = toUInt
81-
final def asSInt() = toSInt
82-
8377
// internal, non user exposed connectors
8478
private var assigned = false
8579
private def checkAssign(src: Node) = {

src/main/scala/Bundle.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ object Bundle {
3535
val keywords = Set("elements", "flip", "toString",
3636
"flatten", "binding", "asInput", "asOutput", "unary_$tilde",
3737
"unary_$bang", "unary_$minus", "clone", "cloneType", "toUInt", "toBits",
38-
"toBool", "toSInt", "asDirectionless")
38+
"toBool", "toSInt", "asDirectionless", "asUInt", "asSInt")
3939

4040
def apply[T <: Bundle](b: => T)(implicit p: Parameters): T = {
4141
Driver.parStack.push(p.push)

src/main/scala/Node.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,14 @@ abstract class Node extends Nameable {
439439
if (!isTypeNode || inputs.isEmpty) this
440440
else inputs(0).getNode
441441

442-
// TODO: change function name to toUInt?
443442
/** @return This node as a UInt */
444443
def toBits(): UInt = chiselCast(this){UInt()}
444+
def toSInt(): SInt = chiselCast(this){SInt()}
445+
def toUInt(): UInt = chiselCast(this){UInt()}
446+
447+
// Chisel3 - rename these to make the reinterpret cast more explicit
448+
final def asUInt() = toUInt()
449+
final def asSInt() = toSInt()
445450

446451
/** @return This node */
447452
def toNode: Node = this

src/test/scala/FillApp.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class FillSuite extends TestSuite {
4242
val io = new Bundle {
4343
val a = UInt(INPUT, 4)
4444
}
45-
val f = Fill(UInt(1,1), 3)
45+
val f = Fill(3, UInt(1,1))
4646
}
4747

4848
val testArgs = chiselEnvironmentArguments() ++ Array("--targetDir", dir.getPath.toString(),

0 commit comments

Comments
 (0)