Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhutmost/chisel-template
https://github.com/zhutmost/chisel-template
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/zhutmost/chisel-template
- Owner: zhutmost
- Created: 2023-05-11T08:03:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-11T08:04:14.000Z (over 1 year ago)
- Last Synced: 2024-04-28T04:13:34.908Z (7 months ago)
- Language: Scala
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chisel Template
## Dependencies
Click the triangle (►) on the left to view the installation guide.
JDK
Before starting, please make sure you have a JDK >= 8 installed. You can install a JDK through the package manager that comes with your OS, or just download a prebuilt binaries such as [Temurin](https://adoptium.net) or [Oracle OpenJDK](https://jdk.java.net/19).
To install a JDK LTS:
```sh
# macOS with Homebrew
brew install openjdk@17
# Ubuntu
apt install default-jdk
```Mill build tool
Mill is a powerful and easy-to-use build tool by [Haoyi Li](https://github.com/lihaoyi).
To install Mill:
```sh
# macOS with Homebrew
brew install mill
```To install mill on other platforms, please visit [its documentation](https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html).
CIRCT
CIRCT is a MLIR-based circuit IR compilation tool, which is required by chisel.
Download binary from its [GitHub page](https://github.com/llvm/circt) and add to PATH.
## Usage
Clone this repository to your local.
```shell
git clone [email protected]:zhutmost/chisel-template.git
cd chisel-template
rm -rf .git
```Open a terminal in the root of your cloned repository and build. The first time it runs, the process may take some minutes to download dependencies.
```shell
mill mylib.runMain mylib.RtlEmitter
```To open this project in an IDE (such as IDEA), please export the BSP configuration first.
```sh
mill mill.bsp.BSP/install
```To format your code with scalafmt, run:
```sh
mill mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources
```You can freely add your Chisel code in `mylib` package, and have fun!