Background technology
In communication and control system, white Gaussian noise is a common noise signal very, therefore need utilize the white Gaussian noise signal source to test and the interference free performance of checking system.Simultaneously, in radio communication channel, usually need the white Gaussian noise signal source.So design realizes the white Gaussian noise signal source of simple in structure a, dependable performance, system is detected very necessary meaning.
Existing Gassian noise generator has physical noise generator and digital composite noise generator two classes usually.Though physical noise generator ratio of precision is higher, realize that circuit is comparatively complicated, so in engineering, more select the Digital Noise generator for use.At present, realize in systems such as microprocessor and DSP in a lot of white Gaussian noise sources, because they can calculate sine and exponential function easily by using function library.But utilize hardware emulator can increase substantially simulation velocity.
Through existing literature search is found, Chinese patent application number is: 88200391.7, name is called: digital voice grade Gaussian white noise generator, this technology comprises: noise source, amplifier, attenuator, but noise source is made of with erasable read only memory EPROM 28 rank m sequencers, and digital noise is output as general simulating the white noise through digital to analog converter.The pseudo random sequence that the digital white Gaussian noise that this technology realizes by hardware circuit, this technology directly produce sequencer is carried out the tap processing and is exported to digital to analog converter as digital white noise.But the digital white Gaussian noise output speed that this technology produced is low, and weak effect is not suitable for the application of complication system.
Summary of the invention
The objective of the invention is to overcome the above-mentioned deficiency of prior art, a kind of Gaussian white noise generator based on FPGA is provided.The present invention has realized the effective processing to pseudo random number by to function fitting and utilization, the output speed height, and noise effects is good, and is fit to be applied to complicated system.
The present invention is achieved by the following technical solutions:
The present invention includes: pseudo-random sequence generating device, arithmetic unit, storage device and control module, wherein: control module links to each other with arithmetic unit and transmits the computing command signal, control module links to each other with storage device and transmits data address signal and data useful signal, the control module transfer sequence that links to each other with pseudo-random sequence generating device generates command signal, arithmetic unit links to each other with storage device and transmits operational data and operation result, and pseudo-random sequence generating device links to each other with storage device and transmits the pseudo random sequence signal.
Described pseudo-random sequence generating device is first shift register.
Described arithmetic unit comprises: adder, multiplier, second shift register and two-dimensional circuit selector, wherein: second shift register links to each other with storage device and transmits the fitting function data, multiplier links to each other with second shift register and transmits the fitting function data, adder links to each other with multiplier and transmits multiplication result information, adder links to each other with storage device and transmits summed result information, the two-dimensional circuit selector links to each other with storage device and transmits final operation result, adder, multiplier, second shift register links to each other with control module respectively with the two-dimensional circuit selector and transmits the s operation control command information.
Described control module comprises: data address control submodule, data are effectively controlled submodule, pseudo random sequence is effectively controlled submodule and s operation control submodule, wherein: data address control submodule links to each other with storage device and transmits data address signal, data are effectively controlled the submodule transmission data effective control signal that links to each other with storage device, pseudo random sequence is effectively controlled the submodule transmission pseudo random sequence that links to each other with pseudo-random sequence generating device and is started and stop signal, s operation control submodule link to each other with arithmetic unit transfer function s operation control signal and two-dimensional circuit selector control signal.
Described storage device comprises: data storage cell and data address memory cell, wherein: data storage cell links to each other with control module and transmits store instruction information, data storage cell links to each other with pseudo-random sequence generating device and transmits effective pseudo random sequence information, data storage cell links to each other with arithmetic unit and transmits operational data information, and the data address memory cell links to each other with control module and transmits address data memory information.
Described control module links to each other with counter.
Compared with prior art, the invention has the beneficial effects as follows: reduced the complexity of device greatly, and improved the output speed of white Gaussian noise, the white Gaussian noise variance that obtains is approximately 1, thereby is suitable for complicated system.
Embodiment
Below in conjunction with accompanying drawing device of the present invention is further described: present embodiment is being to implement under the prerequisite with the technical solution of the present invention, provided detailed execution mode and concrete operating process, but protection scope of the present invention is not limited to following embodiment.
Embodiment
Present embodiment comprises: pseudo-random sequence generating device, arithmetic unit, storage device, counter and control module, wherein: control module links to each other with arithmetic unit and transmits the computing command signal, control module links to each other with storage device and transmits data address signal and data useful signal, the control module transfer sequence that links to each other with pseudo-random sequence generating device generates command signal, arithmetic unit links to each other with storage device and transmits operational data and operation result, pseudo-random sequence generating device links to each other with storage device and transmits the pseudo random sequence signal, and counter links to each other with control module and transmits count information.
Described pseudo-random sequence generating device is first shift register.
First shift register in the present embodiment is that maximum length is 50 a linear feedback shift register.
Described arithmetic unit comprises: adder, multiplier, second shift register and two-dimensional circuit selector, wherein: second shift register links to each other with storage device and transmits the fitting function data, multiplier links to each other with second shift register and transmits the fitting function data, adder links to each other with multiplier and transmits multiplication result information, adder links to each other with storage device and transmits summed result information, the two-dimensional circuit selector links to each other with storage device and transmits final operation result, adder, multiplier, second shift register links to each other with control module respectively with the two-dimensional circuit selector and transmits the s operation control command information.
Described control module comprises: data address control submodule, data are effectively controlled submodule, pseudo random sequence is effectively controlled submodule and s operation control submodule, wherein: data address control submodule links to each other with storage device and transmits data address signal, data are effectively controlled the submodule transmission data effective control signal that links to each other with storage device, pseudo random sequence is effectively controlled the submodule transmission pseudo random sequence that links to each other with pseudo-random sequence generating device and is started and stop signal, s operation control submodule link to each other with arithmetic unit transfer function s operation control signal and two-dimensional circuit selector control signal.
Described storage device comprises: data storage cell and data address memory cell, wherein: data storage cell links to each other by the internal data interface with control module and transmits store instruction information, data storage cell links to each other by the internal data interface with pseudo-random sequence generating device and transmits effective pseudo random sequence information, data storage cell links to each other by the internal data interface with arithmetic unit and transmits operational data information, data address memory cell and control module be by the internal data interface transmission address data memory information that links to each other, and data storage cell and data address memory cell are respectively by external data interface link to each other with external equipment transmitting data information and data address information.
The present embodiment device adopts Xilinx Spartan-3A DSP 1800A development board to realize, wherein: control module be wherein logical block and the Digital Logical Circuits of microprocessor IP kernel MicroBlaze realize; Pseudo-random sequence generating device and arithmetic unit be wherein logical block and the DPS arithmetic element of microprocessor IP kernel MicroBlaze in shift register realize; Storage device is that wherein logical block and the Block-RAM of microprocessor IP kernel MicroBlaze thereof realizes.
The enforcement running of present embodiment is:
Step 1: control module sends useful signal to pseudo-random sequence generating device.
Step 2: pseudo-random sequence generating device receives behind the effective order signal under the clock of 1.024KHz drives, and produces 50 random sequence, u
1And u
2Can get preceding 32 and back 18 of random sequence respectively, and respectively with u
1And u
2Pass to storage device.
Step 3: control module sends the data useful signal to storage device, and sends run signal to arithmetic unit.
Step 4: the data in the arithmetic unit read storage device, following column operations, and with operation result information x
1And x
2Pass to storage device, send computing simultaneously and finish signal to control module:
x
1=f(u
1)g
1(u
2),
x
2=f(u
1)g
2(u
2),
Step 5: the s operation control submodule in the control module constantly sends 0/1 instruction to the two-dimensional circuit selector, control result output, the two-dimensional circuit selector reads the corresponding data in the memory module and exports to the bus data interface by internal data bus according to signal.
Step 6: device whenever sends two groups of data, and control module just sends useful signal to pseudo-random sequence generating device once more, returns step 1, stops up to reaching the default number of times of counter.
The probability distribution schematic diagram of the white Gaussian noise that present embodiment obtains as shown in Figure 1, its ordinate is the probability in percent value, abscissa be signal to noise ratio (unit :/dB).
Adopt the method for prior art directly to adopt the variance of the white Gaussian noise that the data of pseudo random sequence produce to surpass 2, and the average of the white Gaussian noise of the device that adopts present embodiment after 10000 data that produce are handled is 0.010700336319647, variance is 0.999869024280097, the variance of the white Gaussian noise that obtains is approximately 1, thereby applied widely.