schoeberl / chisel-lab Goto Github PK
View Code? Open in Web Editor NEWLab exercises for Chisel in the digital electronics 2 course at DTU
License: BSD 2-Clause "Simplified" License
Lab exercises for Chisel in the digital electronics 2 course at DTU
License: BSD 2-Clause "Simplified" License
This is correct install way
#install scala tool: https://www.scala-sbt.org/download.html
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt update
sudo apt install sbt
I think we should add your exercises as plain Chisel/Scala files with a README.md for the text and not dumping all Jupyter notebook stuff into this repo. There is still the Jupyter repo, we will not delete that one.
Martin
In HeapControl.scala, using RegEnable
will make full always be true after the first time when heap is full, so the dut cannot deassert full after a remove operation has finished on a previously full dut?
When working through the lab, in lab3 I have a failing test for AccuSpec
:
[info] AccuSpec:
[info] Accu
[info] Count15Spec:
[info] - should pass *** FAILED ***
[info] io_dout=0 (0x0) did not equal expected=3 (0x3) (lines in AccuSpec.scala: 7) (AccuSpec.scala:25)
In the AccuSpec.scala
file, there is no dut.clock.step(1)
between the last poke
and expect
. Adding this (see the diff below) made the test case stop failing. I do believe that this is the intended behaviour.
diff --git a/lab3/src/test/scala/AccuSpec.scala b/lab3/src/test/scala/AccuSpec.scala
index 9f861dd..47c1376 100644
--- a/lab3/src/test/scala/AccuSpec.scala
+++ b/lab3/src/test/scala/AccuSpec.scala
@@ -21,6 +21,7 @@ class AccuSpec extends AnyFlatSpec with ChiselScalatestTester {
dut.io.dout.expect(0.U)
dut.io.setZero.poke(false.B)
dut.io.din.poke(3.U)
+ dut.clock.step(1)
dut.io.dout.expect(3.U)
}
}
curl -Lo coursier https://git.io/coursier
chmod +x coursier
coursier will error
///////////////////////////////////////////////////////////// modify to this
#install coursier: https://get-coursier.io/docs/1.1.0-M10/cli-overview
curl -L -o coursier https://git.io/coursier-cli && chmod +x coursier && ./coursier --help
pip3 install jupyter
export SCALA_VERSION=2.12.8
export ALMOND_VERSION=0.2.1
./coursier bootstrap -r jitpack -i user -I user:sh.almond:scala-kernel-api_$SCALA_VERSION:$ALMOND_VERSION sh.almond:scala-kernel_$SCALA_VERSION:$ALMOND_VERSION -o almond
./almond --install
Hi Schoeberl
May I suggest a repository that contains exemplary solutions for the labs in this repository.
Thank you.
/Henrik
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.