📄 lmseq.h
字号:
#ifndef _MSEQL_H#define _MSEQL_H/* * $Log: lmseq.h,v $ * Revision 1.2 2000/05/15 11:08:32 bjc97r * sys/types.h has been included so that unsigned long can be recognised. * * Revision 1.1 2000/05/03 14:30:04 bjc97r * Initial revision * * */#include <sys/types.h>typedef struct { unsigned long state0; /* lower 32 bits of PN register state */ unsigned long state1; /* upper 32 bits of PN register state */ unsigned long mask0; /* lower 32 bits of PN mask to get the next state */ unsigned long mask1; /* upper 32 bits of PN mask to get the next state */} LMseq;/* * lmseq_create() differs from mseq_create() in that it can handle * higher order generator polynomials up to 63. * The polynomial should be given by a string representation of * octal value of the polynomial without leading '0'. For example, * mseql = mseql_create( 40, "20000012000005", 0, 1 ) . * seed1 corresponds to upper 32bits and seed0 lower 32bits * as the initial state of the PN registers. */LMseq * lmseq_create( unsigned deg, char * poly, unsigned long seed1, unsigned long seed0 );/* lmseql_free() deallocates the memory space for the m-sequence generator. */void lmseq_free( LMseq * id );/* * lmseq() gives the next m-sequence bit of the m-sequence generator. * The generated bit is unipolar, ie 1 or 0. */char lmseq( LMseq * id );#endif /* _MSEQL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -