CPE223 Midterm

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:57 PM on 5/15/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

what does .data do?

uses the data section for storage starting at 0000_6000

2
New cards

what does .eqv do?

sets a variable equal to a number (.eqv variable, #)

3
New cards

what does .text do?

starts the coding section

4
New cards

what does .byte, .half, .word do?

byte designates a byte size to a term, half designates halfworld, word designates word

5
New cards

what does .space do?

use it as something: .space 64, which reserves 64 bytes of data for the object something

6
New cards

How do you use these? Create a data array of 0-3 words and start the code.

.data

array:

.word 0,1,2,3

.text

7
New cards

How do you write timing diagrams?

fetch starts first with execute coming after and cycling. Only read enable signals are clocked at fetch, and write is clocked at execute. Write instructions at execute, and write register results at fetch

8
New cards

What are the datapaths for alu?

Goes through reg_file into ALU using either registers or immediates. Then goes back into wa and PC+4 goes to PC mux 0.

9
New cards

What are the datapaths for branch?

Goes through the immediate generator and BAG and BCG. PC values are added to immediate or register.

10
New cards

what are the datapaths for jal and jalr?

Goes through imm gen and BAG either using PC value or register value for addition. PC+4 goes to reg_file wd

11
New cards

what are the datapaths for lw, auipc, sw?

They go through the alu using addition. Instructions with an immediate, rs1, and rs2 go through the memory module with rs2 going into DIN2 and ALU_result into address 2. auipc uses pc value in ALU with immediate and goes straight into rd, lw goes into addr2 then into wd.

12
New cards

How do you create machine code from instructions?

identify opcode and function 3 bits, find registers and immediate by using the bottom table for immediates.

13
New cards

How do you convert decimal to binary and hexadecimal to decimal?

divide the decimal by 2 and take the remainder while diving again by the quotient until 0. Place remainders in reverse order for binary. To get hex to decimal, multiply hex values by their base 16 to the power of their place and add all parts

14
New cards

when do you use always_ff and always_comb

use always ff for memory and synchronous (use <=). Use always comb for nonmemory and async and cases (=)

15
New cards

How do you create cases?

always_comb begin case(…) 0: begin … end… default; endcase… end

16
New cards

How do you model registers with 9-0 bits and 0-6 rows? How do you call on bits 6-4 of register 3?

logic[9:0]ram[0:6], ram[3][6:4]

17
New cards

When is something divisible by 4? how do you divide and multiply by 4?

a binary number divisible by 4 has 2 LSB of 0. Divide by shifting right twice and multiply by shifting left twice.

18
New cards

How do you find the amount of registers?

Highest - lowest + 1

19
New cards

what is the range of bits for unsigned bits? for signed?

unsigned is 2^n - 1. Signed is -2^(n-1):2^(n-1)-1

Explore top notes

note
Cells
Updated 1253d ago
0.0(0)
note
AMSCO AP World History 7.6, 7.7
Updated 1101d ago
0.0(0)
note
Key Moments in the Outsiders
Updated 1223d ago
0.0(0)
note
Color Combinations or Schemes
Updated 1276d ago
0.0(0)
note
Cells
Updated 1253d ago
0.0(0)
note
AMSCO AP World History 7.6, 7.7
Updated 1101d ago
0.0(0)
note
Key Moments in the Outsiders
Updated 1223d ago
0.0(0)
note
Color Combinations or Schemes
Updated 1276d ago
0.0(0)

Explore top flashcards

flashcards
Science 6th grade finale
83
Updated 1044d ago
0.0(0)
flashcards
Hindi
64
Updated 311d ago
0.0(0)
flashcards
FR 1 - Basic Convo
25
Updated 212d ago
0.0(0)
flashcards
Economics chapter 4
25
Updated 900d ago
0.0(0)
flashcards
Forces and Friction Test
27
Updated 881d ago
0.0(0)
flashcards
DITD #1
47
Updated 1148d ago
0.0(0)
flashcards
Science 6th grade finale
83
Updated 1044d ago
0.0(0)
flashcards
Hindi
64
Updated 311d ago
0.0(0)
flashcards
FR 1 - Basic Convo
25
Updated 212d ago
0.0(0)
flashcards
Economics chapter 4
25
Updated 900d ago
0.0(0)
flashcards
Forces and Friction Test
27
Updated 881d ago
0.0(0)
flashcards
DITD #1
47
Updated 1148d ago
0.0(0)