Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP, add Verilator support #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
FROM openjdk:11

# Install SBT tool
ENV SBT_VERSION 1.9.0
RUN curl -L -o sbt-$SBT_VERSION.zip https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.zip && unzip sbt-$SBT_VERSION.zip -d ops
ENV PATH="/ops/sbt/bin/:${PATH}"

# Install Verilator
RUN apt-get update && apt-get install git make autoconf g++ flex bison -y
RUN git clone https://github.com/verilator/verilator /opt/verilator && cd /opt/verilator \
&& git pull && git checkout v4.226
RUN cd /opt/verilator && unset VERILATOR_ROOT && autoconf && ./configure && make && make install

WORKDIR /design
2 changes: 1 addition & 1 deletion src/test/scala/MergerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ case class TestInput(value: Int, lastInput: Boolean)

class MergerSpec extends AnyFreeSpec with ChiselScalatestTester {
"One buffer wins and advances" in {
test(new Merger(busWidth = 4, numberOfBuffers = 4)).withAnnotations(Seq(WriteVcdAnnotation)) { dut =>
test(new Merger(busWidth = 4, numberOfBuffers = 4)).withAnnotations(Seq(VerilatorBackendAnnotation)) { dut =>
// reset Merger for a new comparison round
dut.io.reset.poke(true.B)
dut.clock.step()
Expand Down