Git Product home page Git Product logo

b4-processor's Introduction

Scala CI

B4-Processor

OoOのプロセッサ

準備

これらのソフトウェアをインストールしておく必要があります。

プロセッサの生成・テストコードの生成

NixについてはNixの公式サイトやZero to Nixを参考にしてみてください。

開発

テスト

  • Verilator
  • Ivarus Verilog

プロセッサの生成

次のコマンドで./processorにSystem Verilogのソースが出力されます。

$ make processor

テストコードの生成

次のコマンドで./programsにいくつかテスト用のプログラムとriscv-testsのコンパイル結果が出力されます。

$ make programs

テスト用のプログラムの生成

テスト用プログラムはnixを使って管理しています。

テスト方法

いくつかの時間のかかるテストを除いたテストは次のように行います。

$ sbt "testOnly * -- -l org.scalatest.tags.Slow"

すべてのテストを実行するには次のコマンドを実行します。(とても時間がかかります)

$ sbt test

細かく実行するテストを決めたい場合はIntellij IDEAでプロジェクトを開き、各テストを実行してください。

トラブルシューティング

依存関係周りを編集したらプロセッサが生成できない

コンパイル中に依存関係周りで問題が発生していれば、Nixの依存関係のキャッシュに問題がある場合があります。 その場合は./flake.nixを次のように編集します。

diff --git a/flake.nix b/flake.nix
index 726feaa..478b09e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -37,7 +37,7 @@
             ];
           };
           buildInputs = with pkgs; [ circt ];
-          depsSha256 = "sha256-W1Kgoc58kruhLW0CDzvuUgAjuRZbT4QqStJLAAnPuhc=";
+          depsSha256 = "sha256-0000000000000000000000000000000000000000000=";
           buildPhase = ''
             sbt "runMain b4processor.B4Processor"
           '';

また一度makeすると次のエラーメッセージが出てきます。

error: hash mismatch in fixed-output derivation '/nix/store/01ghymlaf8f1r9ssqvdhn4j5kz3gk153-B4Processor-sbt-dependencies.tar.zst.drv':
         specified: sha256-0000000000000000000000000000000000000000000=
            got:    sha256-W1Kgoc58kruhLW0CDzvuUgAjuRZbT4QqStJLAAnPuhc=

ここで出てきたハッシュに置き換えてmakeするとうまくビルドされると思います。

b4-processor's People

Contributors

pineapplehunter avatar scala-steward avatar michiya-kato avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.