MIPS Assembly (Random Numbers) 2 Lab Schedule Activities - - PowerPoint PPT Presentation

mips assembly
SMART_READER_LITE
LIVE PREVIEW

MIPS Assembly (Random Numbers) 2 Lab Schedule Activities - - PowerPoint PPT Presentation

Computer Systems and Networks ECPE 170 Jeff Shafer University of the Pacific MIPS Assembly (Random Numbers) 2 Lab Schedule Activities Assignments Due This Week Lab 10 Due by Apr 11 th 5:00am Lab work time MIPS


slide-1
SLIDE 1

ì

Computer Systems and Networks

ECPE 170 – Jeff Shafer – University of the Pacific

MIPS Assembly

(Random Numbers)

slide-2
SLIDE 2

Lab Schedule

Activities

ì

This Week

ì

Lab work time

ì

MIPS Random Number Generator

Assignments Due

ì

Lab 10

ì

Due by Apr 11th 5:00am ì

Lab 11

ì

Due by Apr 19th 5:00am ì

Lab 12

ì

Due by May 1st 5:00am

Spring 2019 Computer Systems and Networks

2

slide-3
SLIDE 3

ì

Random Number Generator

Spring 2019 Computer Systems and Networks

3

slide-4
SLIDE 4

Random Number Generator

ì MIPS syscalls do not provide a random number

generator L

ì Need to create a simple one for Lab 11

ì

Low quality - Not suitable for cryptography!

Spring 2019 Computer Systems and Networks

4

m_w = <choose-initializer>; /* must not be zero */ m_z = <choose-initializer>; /* must not be zero */ uint32_t get_random() { m_z = 36969 * (m_z & 65535) + (m_z >> 16); m_w = 18000 * (m_w & 65535) + (m_w >> 16); return (m_z << 16) + m_w; /* 32-bit result */ }

slide-5
SLIDE 5

Spring 2019 Computer Systems and Networks

5

In-Class Discussion of MIPS Implementation