OpenCores
URL https://opencores.org/ocsvn/gng/gng/trunk

Subversion Repositories gng

[/] [gng/] [trunk/] [c/] [taus176.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 guangxi.li
/*
2
 * Maximally equidistributed combined Tausworthe generator
3
 * (k1,k2,k3) = (63,58,55); (q1,q2,q3) = (5,19,24); (s1,s2,s3) = (24,13,7)
4
 * Period is approximately 2^176
5
 */
6
 
7
/*
8
 * Copyright (C) 2014, Guangxi Liu <guangxi.liu@opencores.org>
9
 *
10
 * This source file may be used and distributed without restriction provided
11
 * that this copyright statement is not removed from the file and that any
12
 * derivative work contains the original copyright notice and the associated
13
 * disclaimer.
14
 *
15
 * This source file is free software; you can redistribute it and/or modify it
16
 * under the terms of the GNU Lesser General Public License as published by
17
 * the Free Software Foundation; either version 2.1 of the License,
18
 * or (at your option) any later version.
19
 *
20
 * This source is distributed in the hope that it will be useful, but
21
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
23
 * License for more details.
24
 *
25
 * You should have received a copy of the GNU Lesser General Public License
26
 * along with this source; if not, download it from
27
 * http://www.opencores.org/lgpl.shtml
28
 */
29
 
30
 
31
#ifndef TAUS176_H
32
#define TAUS176_H
33
 
34
#ifdef __cplusplus
35
extern "C" {
36
#endif
37
 
38
/* Generator internal state */
39
typedef struct {
40
    unsigned long long z1, z2, z3;
41
} taus_state_t;
42
 
43
/* Update state */
44
unsigned long long taus_get(taus_state_t *state);
45
 
46
/* Set state using seed */
47
void taus_set(taus_state_t *state, unsigned long s);
48
 
49
 
50
#ifdef __cplusplus
51
}
52
#endif
53
 
54
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.