Skip to content

Commit 55a2604

Browse files
authored
Merge pull request #6 from sysprog21/chisel-3_6
Upgrade to Chisel 3.6 and Ubuntu 24.04 LTS
2 parents 6951317 + 79791a7 commit 55a2604

File tree

5 files changed

+26
-27
lines changed

5 files changed

+26
-27
lines changed

4.1_firrtl_ast.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
},
101101
"outputs": [],
102102
"source": [
103-
"println(chisel3.Driver.emit(() => new DelayBy2(4)))"
103+
"println((new chisel3.stage.ChiselStage).emitChirrtl(new DelayBy2(4)))\n"
104104
]
105105
},
106106
{
@@ -129,7 +129,7 @@
129129
},
130130
"outputs": [],
131131
"source": [
132-
"val firrtlSerialization = chisel3.Driver.emit(() => new DelayBy2(4))\n",
132+
"val firrtlSerialization = (new chisel3.stage.ChiselStage).emitChirrtl(new DelayBy2(4))\n",
133133
"val firrtlAST = firrtl.Parser.parse(firrtlSerialization.split(\"\\n\").toIterator, Parser.GenInfo(\"file.fir\"))\n",
134134
"\n",
135135
"println(firrtlAST)"
@@ -343,4 +343,4 @@
343343
},
344344
"nbformat": 4,
345345
"nbformat_minor": 2
346-
}
346+
}

4.4_firrtl_add_ops_per_module.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
},
258258
"outputs": [],
259259
"source": [
260-
"val firrtlSerialization = chisel3.Driver.emit(() => new AddMe(8, 4))"
260+
"val firrtlSerialization = (new chisel3.stage.ChiselStage).emitChirrtl(new AddMe(8, 4))\n"
261261
]
262262
},
263263
{
@@ -317,4 +317,4 @@
317317
},
318318
"nbformat": 4,
319319
"nbformat_minor": 2
320-
}
320+
}

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# First stage : setup the system and environment
2-
FROM ubuntu:20.04 as base
2+
FROM ubuntu:24.04 as base
33

44
RUN \
55
apt-get update && \
@@ -8,15 +8,13 @@ RUN \
88
curl \
99
graphviz \
1010
openjdk-8-jre-headless \
11-
python3-distutils \
1211
gcc \
1312
python3-dev \
1413
&& \
1514
rm -rf /var/lib/apt/lists/*
1615

17-
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
18-
RUN python3 get-pip.py
19-
RUN pip3 install jupyter jupyterlab
16+
RUN apt-get update && apt-get install -y python3-pip && rm -rf /var/lib/apt/lists/*
17+
RUN pip3 install --no-cache-dir --break-system-packages jupyter jupyterlab
2018

2119
RUN useradd -ms /bin/bash bootcamp
2220

binder/postBuild

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
SCALA_VERSION=2.12.10 ALMOND_VERSION=0.9.1
3+
SCALA_VERSION=2.12.10
4+
ALMOND_VERSION=0.9.1
45

56
# Install coursier
67
curl -Lo coursier https://git.io/coursier-cli

source/load-ivy.sc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@ interp.repositories() ::: List(
44

55
@
66

7-
interp.configureCompiler(x => x.settings.source.value = scala.tools.nsc.settings.ScalaVersion("2.11.12"))
7+
// Chisel 3.6+ requires the compiler plugin
8+
import $plugin.$ivy.`edu.berkeley.cs:::chisel3-plugin:3.6.+`
9+
10+
interp.configureCompiler(x => x.settings.source.value = scala.tools.nsc.settings.ScalaVersion("2.12.10"))
811

912
// Uncomment and change to use proxy
1013
// System.setProperty("https.proxyHost", "proxy.example.com")
1114
// System.setProperty("https.proxyPort", "3128")
1215

13-
import $ivy.`edu.berkeley.cs::chisel3:3.4.+`
14-
import $ivy.`edu.berkeley.cs::chisel-iotesters:1.5.+`
15-
import $ivy.`edu.berkeley.cs::chiseltest:0.3.+`
16-
import $ivy.`edu.berkeley.cs::dsptools:1.4.+`
17-
import $ivy.`org.scalanlp::breeze:0.13.2`
16+
import $ivy.`edu.berkeley.cs::chisel3:3.6.+`
17+
import $ivy.`edu.berkeley.cs::chisel-iotesters:2.5.+`
18+
import $ivy.`edu.berkeley.cs::chiseltest:0.6.+`
19+
import $ivy.`edu.berkeley.cs::dsptools:1.5.+`
20+
import $ivy.`org.scalanlp::breeze:1.0`
1821
import $ivy.`edu.berkeley.cs::rocket-dsptools:1.2.0`
19-
import $ivy.`edu.berkeley.cs::firrtl-diagrammer:1.3.+`
22+
import $ivy.`edu.berkeley.cs::firrtl-diagrammer:1.6.+`
2023

2124
import $ivy.`org.scalatest::scalatest:3.2.2`
2225

2326
// Convenience function to invoke Chisel and grab emitted Verilog.
24-
def getVerilog(dut: => chisel3.core.UserModule): String = {
25-
import firrtl._
26-
return chisel3.Driver.execute(Array[String](), {() => dut}) match {
27-
case s:chisel3.ChiselExecutionSuccess => s.firrtlResultOption match {
28-
case Some(f:FirrtlExecutionSuccess) => f.emitted
29-
}
30-
}
27+
def getVerilog(dut: => chisel3.Module): String = {
28+
import chisel3.stage.ChiselStage
29+
(new ChiselStage).emitVerilog(dut)
3130
}
3231

3332
// Convenience function to invoke Chisel and grab emitted FIRRTL.
34-
def getFirrtl(dut: => chisel3.core.UserModule): String = {
35-
return chisel3.Driver.emit({() => dut})
33+
def getFirrtl(dut: => chisel3.Module): String = {
34+
import chisel3.stage.ChiselStage
35+
(new ChiselStage).emitChirrtl(dut)
3636
}
3737

3838
def compileFIRRTL(

0 commit comments

Comments
 (0)