Calculating Histogram in FPGA with One Clock

Publisher:SereneDreamsLatest update time:2011-09-21 Source: 互联网Keywords:FPGA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Histograms are often a useful tool for analyzing digital data. However, to obtain reliable results from a histogram, a large amount of data must be obtained, usually 100,000 to 1 million points. If you need to analyze the digital output of an ADC, you can use an FPGA (Figure 1).

The figure shows the histogram, RAM, and pulse generator sections used to capture and display the histogram calculated based on 14-bit data. The RAM block is the built-in RAM of the FPGA, while the histogram block is the VHDL (High-Level Design Language) code used for the calculation. The 14-bit parallel data Device_ Data[13..0] from the ADC enters the histogram block and enters the Rd_Addr input of the RAM. The RAM provides data at its address location RAMDataOut[ 15..0]. This data is looped back to the histogram block, which is incremented by 1 and sent to a 16-bit data output terminal DataOut[15..0]. When the WREN (write enable) terminal is at logic level 1, the data is written to the address at pin Wr_Addr[13..0]. This method is the same as if the data comes from Device_Data[13..0].

RAM has a fixed delay from input to output. That is, when the input is Rd_Addr, the data appears at its output RAMDataOut after a fixed delay. This delay varies with different FPGAs. Pay attention to this delay so that there is a delay of two clocks to Device_Data and then calculate the histogram. The delay in RAM should be less than two clock cycles; otherwise, there may be data loss. This constraint limits the maximum frequency of Device_Clk.

Cntr_Value gives the number of input data used to calculate the histogram. The Pulse_Gen block generates a pulse into the input Rst_Cntr to reset the counter. At this point, the histogram part calculates the histogram again with the next set of input data from Cntr_Value. Cntr_Value is 15 bits, but it can be increased to get more histogram data.

The Sel_Data and Rst_RAM signals reset the data stored in the FPGA RAM. When the Rst_RAM pin is high, all bits of the DataOut pin of the histogram block are 0. When the Sel_Data input pin of the histogram block is high, the output of RAM_Wr_Addr is not Device_Data, but an internally generated ramp that rises from 0 to 16384. The histogram block does not perform calculations because doing so would reset the address of the RAM.

Figure 1. The histogram calculation circuit obtains data from a RAM block in an FPGA.

When the FPGA has completed the histogram calculation, the RAM can select Sel_Data to be logic high and keep Rst_RAM to be logic low to read the histogram data. The data in the RAM address exits the output pins sequentially and the data can be transmitted to a PC. Since all blocks operate with a single clock Device_Clk, this design is simple and helps meet the timing constraints. This design can be easily modified to obtain 16-bit or 12-bit data histograms.

Keywords:FPGA Reference address:Calculating Histogram in FPGA with One Clock

Previous article:Building a UWB Pulse Generator on an FPGA
Next article:Improvement strategy of TMR method based on FPGA

Recommended ReadingLatest update time:2024-11-16 19:34

Research and Application of FPGA Parallel Digital Serial Transmission and Interface Technology
1 Introduction After more than ten years of rapid development at home and abroad with hardware, system and application design as the main content, the development of FPGA technology in modern information processing and control technology has begun to rise. Obviously, a series of modern info
[Embedded]
Research and Application of FPGA Parallel Digital Serial Transmission and Interface Technology
Design and implementation of a solar tracker based on FPGA
0 Introduction Solar energy is a clean, pollution-free energy source that is inexhaustible and has broad development prospects. However, solar energy is intermittent and has uncertain intensity and direction, which makes it difficult to collect solar energy. The use of a solar tracking device can keep the s
[Embedded]
Design and implementation of a solar tracker based on FPGA
Application of Embedded Logic Analyzer in FPGA Timing Matching Design
introduction As FPGA devices continue to grow in size and packaging density, the use of traditional logic analyzers in FPGA board-level debugging is becoming increasingly difficult. To this end, mainstream FPGA manufacturers have added embedded logic analyzer (ELA) IP soft cores t
[Test Measurement]
Design of a simple digital storage oscilloscope based on single chip microcomputer and FPGA
1 Introduction   Compared with traditional analog oscilloscopes, digital storage oscilloscopes not only have the advantages of waveform storage, small size, low power consumption, and easy use, but also have powerful real-time signal processing and analysis functions. In the field of electronic measurement, digital st
[Test Measurement]
Design of a simple digital storage oscilloscope based on single chip microcomputer and FPGA
Design and implementation of remote monitoring system based on FPGA+DSP
  The purpose and main research content of the project   Research purposes   In order to remotely manage equipment and monitor the environment on site, simplify on-site monitoring equipment, and effectively improve the stability and security of the entire system, a remote controller is planned to be developed, referre
[Embedded]
Design and implementation of remote monitoring system based on FPGA+DSP
Design and verification of logic chip function test system using FPGA chip
In the most primitive testing process, the testing of integrated circuits (ICs) relied on experienced testers using instruments such as signal generators, multimeters, and oscilloscopes. This testing method has low testing efficiency and cannot achieve large-scale and large-volume testing. With the continuous increase
[Test Measurement]
Design and verification of logic chip function test system using FPGA chip
Design of a Simple Digital Storage Oscilloscope Based on FPGA
0 Introduction The development of high-speed digital acquisition technology and FPGA technology has had a profound impact on traditional test instruments. Digital storage oscilloscope (DSO) is a comprehensive product of analog oscilloscope technology, digital measurement technology, and computer technology. It is ma
[Test Measurement]
Design of a Simple Digital Storage Oscilloscope Based on FPGA
Strengthening the collaborative ecosystem: SoC FPGA becomes a powerful weapon
Altera intends to gradually strengthen FPGA co-processors through more advanced process technology and closer industry cooperation, significantly improve the overall performance of SoC FPGA, and create greater differentiation advantages for seizing the embedded system market. As the penetration rate of SoC FPGA in the
[Analog Electronics]
Strengthening the collaborative ecosystem: SoC FPGA becomes a powerful weapon
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号