Thanks to visit codestin.com
Credit goes to github.com

Skip to content

shahzaibk23/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core

Rv32i Five Stage Pipelined Core in CHISEL HDL

Requirements

  • SBT >= 1.9.7
  • Verilator >= 5.012
  • Chisel >= 7.0.0.

How to Run?

Clone the Repo

git clone https://github.com/shahzaibk23/core

To Dump the RTL

sbt "runMain core.CoreDriver --imem /path/to/imem --dmem /path/to/dmem --target-dir /out/dir/

All Modules' .sv files will be dumped in the --target-dir directory.

3. To Run a Bare Metal Program and Dump .vcd

  • Add you instructions' hex in instrx.hex
  • Run the Command
sbt "testOnly core.Top_test -- -DemitVcd=1"
  • This will dump the .vcd in path build/chiselsim/Top_test/Top-under-test/workdir-verilator/trace.vcd

To Dump RVFI Signature

  • Update the paths to your imem and dmem in src/test/scala/core/TopTracer_test.scala
  • Run the command
sbt "testOnly core.TopTracer_test -- -DemitVcd=1" > tracer_output.log 2>&1s
  • This will dump all the logs+signature in tracer_output.log

To Manually Run a RISCOF's riscv-arch-test repo test and compare the reference signature with core's

  • Update the paths to your imem and dmem in src/test/scala/core/TopTracer_test.scala
  • Run the commands
sbt "testOnly core.TopTracer_test -- -DemitVcd=1" > tracer_output.log 2>&1s
awk '/Begin Logging/{flag=1; next} /End Logging/{flag=0} flag' tracer_output.log > TopTracer_clean.log
diff TopTracer_clean.log riscof/riscof_work/I/src/sb-align-01.S/ref/Reference-spike.signature
  • This will compare the core's signature with any test in riscof_work dir (i.e sb-align for this case)

Artifacts:

  • Program's waveform at: build/chiselsim/TopTracer_test/Top-under-test/workdir-verilator/trace.vcd
  • Clean Signature File at: TopTracer_clean.log

To Run RISCOF Compliance

  • Pre-Reqs: riscof pip package + spike simulator
cd riscof/
riscof arch-test --clone
riscof --verbose info run --config ./config.ini --suite ./riscv-arch-test/riscv-test-suite/rv32i_m --env ./riscv-arch-test/riscv-test-suite/env

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published