CN103530246A - FPGA data managing system - Google Patents

FPGA data managing system Download PDF

Info

Publication number
CN103530246A
CN103530246A CN201310490051.2A CN201310490051A CN103530246A CN 103530246 A CN103530246 A CN 103530246A CN 201310490051 A CN201310490051 A CN 201310490051A CN 103530246 A CN103530246 A CN 103530246A
Authority
CN
China
Prior art keywords
interrupt
bus
fpga
processing unit
external
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310490051.2A
Other languages
Chinese (zh)
Inventor
王耀斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi Gaoxin Industry Co Ltd
Original Assignee
Shaanxi Gaoxin Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shaanxi Gaoxin Industry Co Ltd filed Critical Shaanxi Gaoxin Industry Co Ltd
Priority to CN201310490051.2A priority Critical patent/CN103530246A/en
Publication of CN103530246A publication Critical patent/CN103530246A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

The invention relates to an FPGA data managing system which comprises an interrupt detection unit, an interrupt message queue, an interrupt response processing unit, a bus switch and a data cache zone. An FPGA is externally connected with multiple paths of AD converters. The interrupt detection unit completes detection of external interrupt signals and latch of channel numbers. The interrupt message queue is used for storing external interrupt channel numbers and responds according to the principle of first come, first process. The interrupt response processing unit is responsible for executing specific interrupt tasks. The bus switch is responsible for connecting a bus of the interrupt response processing unit and a responded channel bus. The data cache zone is used for storing data read from an external bus when the interrupt response processing unit executes the interrupt processing tasks. According to the FPGA data managing system, multiple peripheral interrupts of the same prior level can be processed in time and data errors or system faults caused by imbalance interrupt response are avoided.

Description

A kind of FPGA data management system
Technical field
The present invention relates to a kind of FPGA data management system.
Background technology
FPGA claims again field programmable gate array.It is a kind of programmable logic device (PLD), as a kind of semi-custom circuit in special IC field, occurs.Both solve the deficiency of custom circuit, overcome again the limited shortcoming of original programming device gate circuit.FPGA has can repeat to revise design, the fast remarkable advantage of travelling speed.Its general design that adopts hardware description language (verilog or VHDL) completing circuit, the comprehensive and placement-and-routing through specific purpose tool, forms binary file.The binary file of producing powers on and can automatically move after being burned onto on FPGA.
Because FPGA adopts the method for software programming, realize hardware circuit design, so adopt FPGA to carry out design circuit, there is very large dirigibility.For a specific function, adopt FPGA to realize than adopting the software on application specific processor to realize, maximum advantage is speed.Adopt the functional circuit of FPGA realization, can give full play of the advantage of concurrent working, and response speed can reach below 10 nanoseconds.And the function that adopts software to realize, work that can only serial, and response speed is generally at the delicate even Millisecond of hundreds of.So in modern electronic system design, it is more and more that FPGA applies.
In the application system based on FPGA, sometimes can utilize FPGA to manage a plurality of external interrupt.Traditional management method is the method adopting based on priority poll, and each is interrupted arranging fixing priority, carries out successively poll.This method is reliable and stable, but need to may can not be processed in time because of the unbalanced external interrupt that makes of interrupting processing the system of external event response in time improper for some, causes external data to lose or the system failure.Proposition of the present invention is exactly in order to address this problem, and makes a plurality of external interrupt of equal priority can be processed in time, has avoided because the unbalanced data of bringing of interrupt response are made mistakes or the system failure.
summary of the invention
The object of the present invention is to provide a kind of FPGA data management system, it makes a plurality of external interrupt of equal priority can be processed in time, has avoided because the unbalanced data of bringing of interrupt response are made mistakes or the system failure.
Technical solution of the present invention is:
A data management system, its special character is:
At FPGA, comprise interconnective interruption detecting unit, interrupt message queue, interrupt response processing unit, bus switch and data buffer; Described interruption detecting unit completes the detection of external interrupt signal and latching of channel number; The external multi-channel A/D converter of described FPGA;
Described interrupt message queue is used for storing external interrupt channel number, guarantees to respond according to the principle of interrupting first processing first;
Described interrupt response processing unit is responsible for carrying out concrete interrupt task;
Described bus switch is responsible for the bus of interrupt response processing unit to be connected with the channel bus being responded;
Described data buffer is used for depositing interrupt response processing unit and carries out the data that read from external bus while interrupting Processing tasks.
Above-mentioned FPGA data management system, is characterized in that: when the external multi-channel A/D converter of FPGA, particularly
1) interrupt detection and the record that detecting unit is responsible for external interrupt signal, the channel information of external interrupt is deposited in interrupt message queue;
2) when interrupting detecting unit, detect after the look-at-me of outside any one passage, in interrupt message queue, deposit current channel number in;
3) when storage channels, according to the principle of first depositing first, sequentially carry out, guarantee to record accurately the sequencing that interrupts generation;
4) in interrupt response processing unit pass-along message, this message queue is according to the principle of first in first out, guarantees that the interruption first occurring first processes;
5) interrupt response processing unit is carried out concrete interrupt task processing, according to different application scenarios, can design different functions, for the designed hardware platform of the present invention, reads exactly the data in AD conversion, and is written in data buffer;
6) channel number that bus switch transmits out according to message queue, carries out the multichannel of bus and selects to switch, and guarantees that the data bus of interrupt response processing unit is connected with the data bus of the AD ALT-CH alternate channel that will be responded.
Tool of the present invention has the following advantages:
1, interruption processing speed is fast.Than traditional employing software, carry out handling interrupt task, the processing that adopts FPGA to carry out task has the shorter response time.Software handling interrupt task all will be processed and three processes of popping through stacked, task at every turn, and on general processor, this process, switching time can be longer if carry out task under operating system substantially all at Microsecond grade at present.And the present invention does not have stacked and two processes of popping completely, and task handles all-pass and crosses hardware and realize, and the task processing time can reach nanosecond.This is very useful in high real-time system.
2, interrupt response is balanced in time.The classic method that adopts FPGA management interrupt task is that the polling method based on priority manages, this method is to each task fixing priority of arranging in advance, then according to this order poll check successively, there is interruption to process, do not interrupt continuing poll check.This method can cause larger poll time waste.And the present invention is first response first to the thinking of interrupt response, there is no the process of poll, thereby guarantee the corresponding in time of interrupt task.
Accompanying drawing explanation
Fig. 1 is the system logic block diagram of the present invention while realizing in FPGA.
Embodiment
For solving existing employing FPGA, manage the unbalanced problem that a plurality of equal priority are interrupted, it is example that the hardware platform of the external 4 road high-speed A/D converters of FPGA is take in the present invention, introduces the method that realizes multitask real-time management in FPGA.This management method can be generalized to other occasions that adopts FPGA to carry out real-time multi-task management, such as the serial ports of the external multichannel of FPGA, and the external multichannel CAN bus of FPGA, etc.
The implementation method of the present invention in FPGA is referring to Fig. 1.Enforcement of the present invention depends on five basic modules: interrupt detecting unit, interrupt message queue, interrupt response processing unit, bus switch and data buffer.
Interrupt detecting unit and complete the detection of external interrupt, and corresponding channel number is latched into interrupt message queue.The corresponding synchronizer of each interrupt source and a decision device.Synchronizer circuit adopts secondary d type flip flop to carry out the synchronous of signal, and the signal metastable state problem with erasure signal when the cross clock domain, guarantees that signal is by reliable samples.Latch circuit is used for latching current look-at-me, passes to passage memory circuit.When external interrupt signal is a pulse signal, after latch, can become a level signal, guarantee that look-at-me can not be missed sampling.Passage is adjudicated the responsible look-at-me that each latch is latched of memory circuit and is judged, the channel number corresponding to useful signal carries out record, is written in interrupt message queue.
Interrupt message queue is mainly realized by a FIFO.After each channel number that sends look-at-me is latched, according to the precedence occurring, be written in FIFO, when guaranteeing in commission to break task, can carry out according to the principle of first processing first.
Bus switch adopts one group of MUX to realize, the selection input signal of this MUX is exactly the channel number of interrupt message queue output, according to this channel number, in bus switch inside, carry out bus switch, the bus that the bus of interrupt response processing unit is corresponding with channel number is connected.
Interrupt response processing unit is responsible for carrying out concrete interrupt task processing capacity, and this task function is realized by state machine.The hardware platform mentioned for the present invention reads exactly the data after conversion, and leaves in the storage area of formulating in data buffer from AD converter.According to different application systems, specific tasks may be different, but task treatment scheme substantially all can be abstract reads and the large state of inner storage administration two for the external interface of data.

Claims (2)

1. a FPGA data management system, is characterized in that:
At FPGA, comprise interconnective interruption detecting unit, interrupt message queue, interrupt response processing unit, bus switch and data buffer; Described interruption detecting unit completes the detection of external interrupt signal and latching of channel number; The external multi-channel A/D converter of described FPGA;
Described interrupt message queue is used for storing external interrupt channel number, guarantees to respond according to the principle of interrupting first processing first;
Described interrupt response processing unit is responsible for carrying out concrete interrupt task;
Described bus switch is responsible for the bus of interrupt response processing unit to be connected with the channel bus being responded;
Described data buffer is used for depositing interrupt response processing unit and carries out the data that read from external bus while interrupting Processing tasks.
2. FPGA data management system according to claim 1, is characterized in that: when the external multi-channel A/D converter of FPGA, particularly
1) interrupt detection and the record that detecting unit is responsible for external interrupt signal, the channel information of external interrupt is deposited in interrupt message queue;
2) when interrupting detecting unit, detect after the look-at-me of outside any one passage, in interrupt message queue, deposit current channel number in;
3) when storage channels, according to the principle of first depositing first, sequentially carry out, guarantee to record accurately the sequencing that interrupts generation;
4) in interrupt response processing unit pass-along message, this message queue is according to the principle of first in first out, guarantees that the interruption first occurring first processes;
5) interrupt response processing unit is carried out concrete interrupt task processing, according to different application scenarios, can design different functions, for the designed hardware platform of the present invention, reads exactly the data in AD conversion, and is written in data buffer;
6) channel number that bus switch transmits out according to message queue, carries out the multichannel of bus and selects to switch, and guarantees that the data bus of interrupt response processing unit is connected with the data bus of the AD ALT-CH alternate channel that will be responded.
CN201310490051.2A 2013-10-18 2013-10-18 FPGA data managing system Pending CN103530246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310490051.2A CN103530246A (en) 2013-10-18 2013-10-18 FPGA data managing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310490051.2A CN103530246A (en) 2013-10-18 2013-10-18 FPGA data managing system

Publications (1)

Publication Number Publication Date
CN103530246A true CN103530246A (en) 2014-01-22

Family

ID=49932273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310490051.2A Pending CN103530246A (en) 2013-10-18 2013-10-18 FPGA data managing system

Country Status (1)

Country Link
CN (1) CN103530246A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677474A (en) * 2016-04-06 2016-06-15 福建星网智慧科技股份有限公司 Interruption polymerization device and method based on FPGA

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677474A (en) * 2016-04-06 2016-06-15 福建星网智慧科技股份有限公司 Interruption polymerization device and method based on FPGA

Similar Documents

Publication Publication Date Title
US7779286B1 (en) Design tool clock domain crossing management
CN103049323A (en) Multi-interrupt balance management method implemented in FPGA (field programmable gate array)
CN102012717A (en) Clock switching method and device
CN105446934B (en) A kind of moving-target and CFAR detection system based on multi-core DSP
CN103376400A (en) Chip testing method and chip
CN104503931A (en) Multi-channel analog signal acquisition method
US8659336B2 (en) Apparatus and method for synchronising signals
EP2434404B1 (en) Method and arrangement for streaming data profiling
CN107656886B (en) Cross-clock-domain signal processing circuit and processing method thereof
WO2012125718A1 (en) Bi-modal arbitration nodes for a low-latency adaptive asynchronous interconnection network and methods for using the same
CN105404598A (en) Real-time data acquisition system and method
CN101834715A (en) Data processing method, data processing system and data processing device
CN103955419A (en) Logic analyzer with serial bus protocol on-line real-time detection analysis function
CN100578480C (en) Interrupt processing method and device
US20040006724A1 (en) Network processor performance monitoring system and method
CN103177133A (en) Method and system of data acquisition and storage
CN105550131B (en) A kind of interface data processing system and method based on finite state machine and ARINC659 buses
CN103530246A (en) FPGA data managing system
CN101937364B (en) Interrupt synthesizing method and device
US20240193116A1 (en) Event-driven readout system with non-priority arbitration for multichannel data sources
JP5787829B2 (en) Multiprocessor
CN105527896A (en) Twelve-channel isolated type speed measurement board card
CN112035399A (en) FPGA-based SPI slave module implementation method
CN105224481A (en) PWM transmits the implementation of data in input mode
Liu Design of Multi-Serial Port Controller based on PCIe

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140122

WD01 Invention patent application deemed withdrawn after publication