File: glibc_random.py

package info (click to toggle)
myhdl 0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,728 kB
  • sloc: python: 25,033; ansic: 2,203; makefile: 243; sh: 206
file content (9 lines) | stat: -rw-r--r-- 205 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
from __future__ import absolute_import
import myhdl
from myhdl import *


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