Skip to content

Conversation

@Crackle07
Copy link

No description provided.

@lethalNeutrino lethalNeutrino changed the title first draft done? feat(risc-v): first draft Nov 20, 2025
- section: RISC-V
href: content/RISC-V/index.qmd
contents:
- href: content/RISC-V/instruction_formats.qmd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you add a href to content/RISC-V/index.qmd here:

CleanShot 2025-11-20 at 15 55 32@2x

such as addition of two numbers or storing data to memory. Below is a comparison between RISCV code and its equivalent C code:


::: {layout-ncol=2}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Landrew layout nit: add tailwindcss

---
---
title: "RISC-V Instruction Formats"
subtitle: "UC Berkeley, CS 61C"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this like tripled

**2. Which fields decide the ALU operation for R-type instructions?**

::: {.callout-note collapse="true" title="Check Answer"}
**funct3, funct7, and opcode.**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

monospace funct3 etc.

::: {.callout-note collapse="true" title="Check Answer"}
**funct3, funct7, and opcode.**

While the opcode identifies the instruction as R-Type, the `funct` fields select the specific operation (Add vs Sub vs Xor).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add sub xor


### Conceptual Pre-Check

**1.1 True or False: The opcode field determines the instruction type (R, I, I$\star$, S, etc.).**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should just use an asterisk instead of $\star$ for accessibility reasons

#### R-Type: Register Operations

**Structure:**
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this into a table possbly a @lethalNeutrino


### Format Summary Table

| Format | Registers | Immediate Bits | Use Case | Example |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run markdown formatter on these tables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants