ì
Computer Systems and Networks
ECPE 170 – Jeff Shafer – University of the Pacific
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
ì
ECPE 170 – Jeff Shafer – University of the Pacific
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
ì
Spring 2019 Computer Systems and Networks
3
ì 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 */ }
Spring 2019 Computer Systems and Networks
5