Chisel-Lab 项目教程

Chisel-Lab 项目教程

chisel-lab Lab exercises for Chisel in the digital electronics 2 course at DTU chisel-lab 项目地址: https://gitcode.com/gh_mirrors/ch/chisel-lab

1. 项目的目录结构及介绍

chisel-lab/
├── build.sbt
├── project/
│   ├── build.properties
│   └── plugins.sbt
├── src/
│   ├── main/
│   │   ├── resources/
│   │   └── scala/
│   │       └── chisel3/
│   │           └── lab/
│   │               ├── Adder.scala
│   │               ├── ALU.scala
│   │               ├── Counter.scala
│   │               ├── Decoder.scala
│   │               ├── Mux.scala
│   │               └── RegisterFile.scala
│   └── test/
│       └── scala/
│           └── chisel3/
│               └── lab/
│                   ├── AdderSpec.scala
│                   ├── ALUSpec.scala
│                   ├── CounterSpec.scala
│                   ├── DecoderSpec.scala
│                   ├── MuxSpec.scala
│                   └── RegisterFileSpec.scala
└── README.md

目录结构介绍

  • build.sbt: 项目的构建配置文件,定义了项目的依赖、插件等信息。
  • project/: 包含项目的构建配置文件,如 build.propertiesplugins.sbt
  • src/main/scala/chisel3/lab/: 包含项目的核心代码,如 Adder.scala, ALU.scala 等。
  • src/test/scala/chisel3/lab/: 包含项目的测试代码,如 AdderSpec.scala, ALUSpec.scala 等。
  • README.md: 项目的介绍文档。

2. 项目的启动文件介绍

项目的启动文件通常是 build.sbt,它定义了项目的构建配置。以下是 build.sbt 的主要内容:

name := "chisel-lab"
version := "0.1"
scalaVersion := "2.12.10"

libraryDependencies ++= Seq(
  "edu.berkeley.cs" %% "chisel3" % "3.4.0",
  "edu.berkeley.cs" %% "chisel-iotesters" % "1.5.0"
)

启动文件介绍

  • name: 定义项目的名称。
  • version: 定义项目的版本。
  • scalaVersion: 定义项目使用的 Scala 版本。
  • libraryDependencies: 定义项目依赖的库,如 chisel3chisel-iotesters

3. 项目的配置文件介绍

项目的配置文件主要位于 project/ 目录下,包括 build.propertiesplugins.sbt

build.properties

sbt.version=1.3.8

plugins.sbt

addSbtPlugin("edu.berkeley.cs" % "sbt-chisel" % "2.4.2")

配置文件介绍

  • build.properties: 定义了项目使用的 SBT 版本。
  • plugins.sbt: 定义了项目使用的 SBT 插件,如 sbt-chisel

通过以上配置,项目可以正确地构建和运行。

chisel-lab Lab exercises for Chisel in the digital electronics 2 course at DTU chisel-lab 项目地址: https://gitcode.com/gh_mirrors/ch/chisel-lab

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

邵冠敬Robin

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值