Giter Site home page Giter Site logo

rptu-eis / adsproject Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 4.0 1.4 MB

This repository contains the basic files for the class project of the course "Architecture of Digital Systems I"

Home Page: https://eit.rptu.de/fgs/eis/teaching/85-571

Scala 100.00%
chisel hardware-designs processor-architecture risc-v teaching-materials

adsproject's Introduction

CI Pipeline: 01 Warm-Up CI Pipeline: 02 Single-Cycle RISC-V Core CI Pipeline: 03 Multi-Cycle RISC-V Core CI Pipeline: 04 Pipelined RISC-V Core


Logo

ADS I Class Project
Group #XXX
Winter Semester 202X/202X

GitHub repository for Architecture of Digital Systems I Class Project

Report Bug


Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contact
  5. Acknowledgments

About the Project

Our lectures, Architecture of Digital Systems I (EIT-EIS-571-V-4) and Architecture of Digital Systems II (EIT-EIS-573-V-4), deal with the basic principles of computer architecture for single CPU cores and SoCs. To deepen the students' knowledge of computer architecture and provide an impression of how a processor core is implemented, we offer this class project as an add-on to ADS I.

Chisel - A modern Hardware Description Language

Chisel 1 (Constructing Hardware in a Scala Embedded Language) is an open-source HDL based on the programming language Scala. It is used to describe digital systems at the register-transfer level (RTL) and is therefore on the same abstraction level as VHDL and (System) Verilog.

Advantages of Chisel over other HDLs are its object-oriented and functional programming characteristics inherited from Scala. This allows a modern coding style and better IDE support compared to VHDL or System Verilog. Additionally, while VHDL and Verilog were introduced as hardware simulators, Chisel is a hardware generator clearly intended to synthezise hardware designs.

In general, a Chisel design is a scala program describing how to build a specific Chisel graph that represents the hardware design. During compilation and generating of the Chisel graph, severel checks are done in order to guarantee a working circuit. The checks include syntax, invalid circuit designs, unconnected wires, etc.

Afterwards, the behaviour of the designed circuit can be simulated with FIRRTL (Flexible Internal Representation for RTL). Setting inputs and analyzing the circuit's outputs in simulation can be used to test and validate the behaviour of the design. Unlike other hardware description languages, Chisel is doing checks on whether the design is synthesizable before the simulation is done, during the generation of the Chisel graph. The intermediate representation in FIRRTL can later be translated into System Verilog code which enables FPGA emulation of the circuit design and even the construction of ASICs.

Getting Started

To take this course you should have a basic knowledge of digital circuits. Here at RPTU, undergrad courses teaching those topics are for example Grundlagen der Informationsverarbeitung and Labor Digitaltechnik I. If you got your Bachelor's degree from another university, you probably took similar courses.

Prerequisites

In general, it is best to use a machine running Linux Ubuntu 20.04 or newer for this course. Other Linux distributions, Windows (with Linux subsystem) or macOS might be suitable as well, but if you want to use them you need to figure out how to install and build everything for yourself, if the provided instructions don't work.

An Editor / IDE for Chisel

We recommend using an integrated development environment (IDE) as an editor for coding. IDEs provide helpful functions like the integration of version control systems (e.g. Git) or syntax highlighting and other helpful features to keep a better overview over big code bases. In case you already have worked with an IDE that you favor, feel free to use it. If this area is new to you, IntelliJ is a professional IDE that also provides support for Chisel. As a student, you can get a free license here.

Java / Scala / sbt

First of all, as Scala (the underlying programming language of Chisel) uses the java virtual machine (JVM), your workspace must be able to run java. Afterward, you need some more tools like the Scala compiler (scalac), the Scala build tool (sbt), and some others, to use all features of Chisel. Luckily, Scala provides all of these tools in one combined script. You just need to execute the following command in your terminal (on Linux) and the script will automatically check if you have some of the tools already present and install the missing ones.

curl -fL https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup

If you need more information, just check the official scala install page.

Git Version Control

Git is the most common version control system in the world today. GitHub, on the other hand, is a cloud-based service that offers a platform for storing and managing projects using Git. Generally, working with GitHub is based on some simple principles. There are some very complex commands, too, but you usually won't need them in your everyday work with Git. To install Git, you can use the following command:

sudo apt install git-all

(back to top)

How to Git

Git

  1. Forking the Main Repository
  • Click on the "Fork" button at the top-right corner of the page.
  • This will create a copy of the repository under your GitHub account.
  1. Cloning the Forked Repository
  • Open a terminal or command prompt on your local machine.
  • Navigate to the directory where you want to clone the repository.
  • Run the following command, replacing with the name of your GitHub account:
git clone https://github.com/<your-account>/ADSProject
  1. Creating a New Branch
  • Change into the cloned repository directory.
  • Run the following command to create a new branch that starts from the exact state as the main branch you're currently on.
  • Replace 'XXX' with your group number:
git checkout -b <GroupXXX>
  1. Pushing the New Branch to your Fork on GitHub
  • Your forked repository on GitHub doesn't know about the new branch you created, yet.
  • Push the new branch to your repository with the following command: '''git push --set-upstream origin '''
  1. Pushing Changes to the New Branch}
  • Make the desired changes to the files in your local repository.
  • Run the following commands to stage and commit your changes:
git add <file-you-want-to-add>  // "add ." will add all new files
git commit -a -m "Your commit message"
  • Finally, push your changes to your repository using the following command:
git push

Whenever you want to add, commit and push changes to your repo, you can do this by repeating step 5. If multiple people work in the same directory, you should always pull the changes other people pushed recently to avoid conflicts (e.g., by editing the same region of the same file simultaneously). Getting the latest state is simply done by using \textit{git pull}:

git pull

That's it! You have now successfully forked a repository, cloned it, created a new branch, and pushed your changes to the new branch on GitHub.

(back to top)

Contact

Tobias Jauch - [email protected]

(back to top)

Additional Materials

If you want to learn more about Chisel, you can start with the material listed below:

If you want to set up a Linux subsystem on your Windows PC, you can find information on how to do so below:

(back to top)

Footnotes

  1. Jonathan Bachrach, Huy Vo, Brian Richards, Yunsup Lee, Andrew Waterman, Rimas Avižienis, John Wawrzynek, and Krste Asanović. 2012. Chisel: constructing hardware in a Scala embedded language. In Proceedings of the 49th Annual Design Automation Conference (DAC '12). Association for Computing Machinery, New York, NY, USA, 1216–1225.

adsproject's People

Contributors

tojauch avatar

Stargazers

 avatar  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.