1
0
mirror of https://github.com/myhdl/myhdl.git synced 2025-01-24 21:52:56 +08:00
myhdl/scripts/benchmark/glibc_random.py
2019-03-12 18:34:14 +02:00

9 lines
166 B
Python

import myhdl
from myhdl import *
def glibc_random(seed):
random_word = intbv(0)[64:]
random_word[:] = seed * 1103515245 + 12345
return random_word[32:]