Skip to content

pencherek/2023-car-heirv-pencherek

Repository files navigation


CAr Labs Logo
Hevs CAr Laboratories

Labor Files for CAr Laboratories practical sessions Moodle Cyberlearn.

Table of contents

DescriptionHow To UseLaunchCreditsLicenseFind us on

Description

(Back to top)

Documentation

The documentation is available under the car-docs Git repository.

Moodle

As it changes each year, all you have to do is search on Moodle Cyberlearn for the course and select the one starting with the last two digits of the current year.

Course number:

  • YY_HES-SO-VS_Architecture des ordinateurs / Computerarchitektur

HEIRV32-MC

The HEIRV32-MC (MC standing for Multi Cycle) lab intends to recreate the previsouly seen HEIRV32-SC architecture while cutting the system into the five steps of the RISC-V pipeline.

It does not meet the minimum requirements for the RV32I ISA, but is simpler to implement and support the following instructions :

  • R-type (op rd rs1 rs2)
    • add : rd = rs1 + rs2
    • sub : rd = rs1 - rs2
    • slt : rd = (rs1 < rs2) ? 1:0
    • or : rd = rs1 | rs2
    • and : rd = rs1 & rs2
  • (opt) I-type (op rd rs1 imm), imm on 12 bits
    • addi : rd = rs1 + imm
    • slti : rd = (rs1 < imm) ? 1:0
    • ori : rd = rs1 | imm
    • andi : rd = rs1 & imm
    • lw (op dest imm(rs1)) : dest = Memory[rs1 + imm]
  • S-type (op rs2 offs(rs1)), offs on 12 bits
    • sw : Memory[rs1 + offs] = rs2
  • B-type (op rs1 rs2 imm]), imm given on 12 bits that will be << 1
    • beq : if(rs1 == rs2) -> PC += imm
  • (opt) J-type (op imm || op rd imm), imm given on 20 bits that will be << 1
    • jal : rd = PC + 4 (if no rd specified, rd = x1); PC += imm

Code can be written for it through its dedicated assembler (see inside the heivr32-asm folder).

How To Use

(Back to top)

To clone this template, you'll need Git. You can also opt for the archive version. HDL Designer, Modelsim and ISE 14.7 must be installed on your computer. See the wiki for help.

The use of the assembler is explained inside the heirv32-asm folder.

Finally, the doc can be found inside the doc folder.

Launch

# Clone this repository including submodules
git clone <repo_url>

# Go into the repository
cd car-labs

# Run the app
## Linux
./car-labs.bash

## Windows
.\car-labs.bat

Credits

(Back to top)

  • COF
  • PRC
  • ZAS
  • AMA

License

(Back to top)

©️ All rights reserved


Find us on

hevs.ch  ·  Facebook @hessovalais  ·  Twitter @hessovalais  ·  LinkedIn HES-SO Valais-Wallis  ·  Google+ HES-SO Valais Wallis  ·  Youtube HES-SO Valais-Wallis

About

2023-car-heirv-pencherek created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published