Added README.
This project implements a Brainfsck interpreter in Chisel with multiple simulation and hardware targets.
Brainfsck.scala
DataMem.scala
SimulatedRom.scala
UartRx.scala
UartTx.scala
CrossBuffer.scala
PassthroughBuffer.scala
RandomDelay.scala
FpgaTop.scala
NvboardTop.scala
Simulate.scala
SimulateTop
Run simulation:
sbt "runMain brainfsck.Simulate"
FpgaTop
Generate Verilog for FPGA synthesis:
sbt "runMain brainfsck.FpgaTop"
This will:
target/src/main/sv/
target/src/main/mi/
NvboardTop
Generate Verilog for NVBoard simulation:
sbt "runMain brainfsck.NvboardTop"
This generates SystemVerilog files in target/src/main/sv/
The project includes a C++ main file (src/main/cc/main.cc) for NVBoard integration. To use with NVBoard:
src/main/cc/main.cc
The main.cc file handles:
The project includes several example programs:
tolower.bf
repeat.bf
hello.bf
Run the test suites with:
sbt test
Tests cover:
Hardware implement of brainfsck.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
Brainfsck Interpreter in Chisel
This project implements a Brainfsck interpreter in Chisel with multiple simulation and hardware targets.
Project Structure
Brainfsck.scala: Main Brainfsck interpreter coreDataMem.scala: Data memory implementationSimulatedRom.scala: ROM for storing Brainfsck programsUartRx.scala/UartTx.scala: UART transmitter/receiverCrossBuffer.scala: Cross-domain bufferPassthroughBuffer.scala: Passthrough buffer implementationRandomDelay.scala: Random delay module for testingFpgaTop.scala: Top-level module for FPGA implementationNvboardTop.scala: Top-level module for NVBoard simulationSimulate.scala: Simulation testbenchTargets
1. Simulation Target (
SimulateTop)Run simulation:
2. FPGA Target (
FpgaTop)Generate Verilog for FPGA synthesis:
This will:
target/src/main/sv/target/src/main/mi/3. NVBoard Target (
NvboardTop)Generate Verilog for NVBoard simulation:
This generates SystemVerilog files in
target/src/main/sv/NVBoard Integration
The project includes a C++ main file (
src/main/cc/main.cc) for NVBoard integration. To use with NVBoard:The main.cc file handles:
Brainfsck Programs
The project includes several example programs:
tolower.bf: Converts input to lowercaserepeat.bf: Repeats one sentence based on user choicehello.bf: Hello world programTesting
Run the test suites with:
Tests cover: