Skip to content

Instantly share code, notes, and snippets.

View diningyo's full-sized avatar
😆
Learning Chisel!!

diningyo diningyo

😆
Learning Chisel!!
View GitHub Profile
@diningyo
diningyo / Idu.v
Last active November 23, 2020 11:58
Chisel 3.3.2 vs. Chisel 3.4.0 (dirv-idu moudle)
// Chisel 3.4.0 w/ compiler pulg-in version
module Idu(
input io_ifu2idu_valid,
output io_ifu2idu_ready,
input [31:0] io_ifu2idu_inst,
input io_idu2exu_inst_ready,
output io_idu2exu_inst_valid,
output [31:0] io_idu2exu_inst_bits_rawData,
output [6:0] io_idu2exu_inst_bits_funct7,
output [4:0] io_idu2exu_inst_bits_rs2,
@diningyo
diningyo / iotester_option
Created June 20, 2019 14:48
chisel3.iotesters.Driverの引数
[info] Running chisel3.iotesters.Driver
Usage: chisel-testers [options] [<arg>...]
common options
-tn, --top-name <top-level-circuit-name>
This options defines the top level circuit, defaults to dut when possible
-td, --target-dir <target-directory>
This options defines a work directory for intermediate files, default is .
-ll, --log-level <Error|Warn|Info|Debug|Trace>
This options defines a work directory for intermediate files, default is .
@diningyo
diningyo / SampleBundleRegInit2.v
Created April 27, 2019 05:12
BundleとRegInitで作る初期化済みレジスタ(コンパニオン・オブジェクト版)から生成したRTL
module SampleBundleRegInit2(
input clock,
input reset,
input io_en,
input [31:0] io_data,
output [3:0] io_out1_a,
output [3:0] io_out1_b,
output [3:0] io_out2_a,
output [3:0] io_out2_b
);
@diningyo
diningyo / Top.dot.svg
Created February 24, 2019 12:37
Sodor 1st stage のトップブロックの構造
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diningyo
diningyo / Top_hierarchy.dot.svg
Created February 24, 2019 12:35
diagrammerで作ったSodor 1st-stage版のトップ階層図
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diningyo
diningyo / build.sbt
Created February 23, 2019 15:32
ChiselのRTL生成&テスト実行の際のsbtの設定ファイル
scalaVersion := "2.11.12"
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases")
)
libraryDependencies += "edu.berkeley.cs" %% "chisel3" % "3.0-SNAPSHOT"
libraryDependencies += "edu.berkeley.cs" %% "chisel-iotesters" % "[1.2.5,1.3-SNAPSHOT["
@diningyo
diningyo / Top.scala
Created February 23, 2019 15:31
ChiselのRTL生成&テストの実装サンプル
import chisel3._
import chisel3.iotesters
import chisel3.iotesters.PeekPokeTester
class Top(in0Bits: Int, in1Bits: Int) extends Module {
val io = IO(new Bundle {
val in0 = Input(UInt(in0Bits.W))
val in1 = Input(UInt(in0Bits.W))
val out = Output(UInt((in0Bits+1).W))
@diningyo
diningyo / module_3.2_exercise_regfile.v
Created December 2, 2018 03:24
Module3.2練習問題のレジスタファイルのRTL
module cmd5HelperRegisterFile( // @[:@3.2]
input clock, // @[:@4.4]
input reset, // @[:@5.4]
input io_wen, // @[:@6.4]
input [4:0] io_waddr, // @[:@6.4]
input [31:0] io_wdata, // @[:@6.4]
input [4:0] io_raddr_0, // @[:@6.4]
input [4:0] io_raddr_1, // @[:@6.4]
output [31:0] io_rdata_0, // @[:@6.4]
output [31:0] io_rdata_1 // @[:@6.4]
@diningyo
diningyo / Chisel_setup.log
Created October 13, 2018 13:38
Chiselのセットアップ実行時のダウンロードログ
Downloading https://repo1.maven.org/maven2/edu/berkeley/cs/chisel3_2.11/3.1.0/chisel3_2.11-3.1.0.pom.sha1
Downloading https://repo1.maven.org/maven2/edu/berkeley/cs/chisel3_2.11/3.1.0/chisel3_2.11-3.1.0.pom
Downloaded https://repo1.maven.org/maven2/edu/berkeley/cs/chisel3_2.11/3.1.0/chisel3_2.11-3.1.0.pom.sha1
Downloaded https://repo1.maven.org/maven2/edu/berkeley/cs/chisel3_2.11/3.1.0/chisel3_2.11-3.1.0.pom
Downloading https://repo1.maven.org/maven2/edu/berkeley/cs/chisel3_2.11/3.1.0/
Downloaded https://repo1.maven.org/maven2/edu/berkeley/cs/chisel3_2.11/3.1.0/
Downloading https://repo1.maven.org/maven2/edu/berkeley/cs/firrtl_2.11/1.1.0/firrtl_2.11-1.1.0.pom
Downloading https://repo1.maven.org/maven2/edu/berkeley/cs/firrtl_2.11/1.1.0/firrtl_2.11-1.1.0.pom.sha1
Downloaded https://repo1.maven.org/maven2/edu/berkeley/cs/firrtl_2.11/1.1.0/firrtl_2.11-1.1.0.pom
Downloaded https://repo1.maven.org/maven2/edu/berkeley/cs/firrtl_2.11/1.1.0/firrtl_2.11-1.1.0.pom.sha1
@diningyo
diningyo / Chisel_Bootcamp_setup.log
Last active October 13, 2018 13:13
Chisel Bootcamp環境構築の際のコマンドログ
dnn-admin@dnn:~$ uname -a
Linux dnn 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
dnn-admin@dnn:~$ conda create -n jupyter-scala python=3
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment /usr/local/src/app/pyenv/versions/miniconda3-4.3.11/envs/jupyter-scala:
The following NEW packages will be INSTALLED: