CN103729320A - Method for implementing CY7C68013 communication on basis of FPGA (field programmable gate array) - Google Patents
- ️Wed Apr 16 2014
Info
-
Publication number
- CN103729320A CN103729320A CN201310707821.4A CN201310707821A CN103729320A CN 103729320 A CN103729320 A CN 103729320A CN 201310707821 A CN201310707821 A CN 201310707821A CN 103729320 A CN103729320 A CN 103729320A Authority
- CN
- China Prior art keywords
- fpga
- data
- cy7c68013
- chip
- fifo Prior art date
- 2013-12-20 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims description 18
- 238000000034 method Methods 0.000 title claims description 7
- 230000005540 biological transmission Effects 0.000 claims description 30
- 230000000694 effects Effects 0.000 claims description 6
- 230000000295 complement effect Effects 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000007704 transition Effects 0.000 description 2
- 241000218691 Cupressaceae Species 0.000 description 1
- 241001269238 Data Species 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Communication Control (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
The invention relates to a method for implementing CY7C68013 communication on the basis of an FPGA (field programmable gate array). The method is used for communicating the FPGA with a USB (universal serial bus) chip CY7C68013, a fifo (first in first out) device is added into the FPGA for caching data, and accordingly loss of the data can be prevented; a function of transmitting data with high priorities in a prior manner is realized under the control of a state machine; an internal circuit of the FPGA comprises an FPGA interface module and a modulation, demodulation and data processing module; the FPGA interface module internally comprises three data interfaces and is used for communicating the FPGA with the chip CY7C68013, the FPGA and the chip CY7C68013 are communicated with each other via data ports of the chip CY7C68013, and 16bit data are transmitted between the FPGA and the chip CY7C68013 in each communication procedure. The method has the advantages that transmission of other data can be assuredly suspended under the control of the state machine in the FPGA and chip CY7C68013 communication procedures if the data with the high priorities arrive and transmission conditions are met, so that the important data with the high priorities can be assuredly transmitted in first time, the data are cached by the aid of fifo device, and loss of the data with low priorities can be assuredly prevented in transmission waiting procedures.
Description
Technical field
The present invention relates to the equipment such as communication, observing and controlling, particularly a kind of method that realizes many CY7C68013 communications based on FPGA.
Background technology
At present, along with the development of the communication technology, communication, each circuit board of measuring and controlling equipment circuit and the data transmission of usb interface are in an increasingly wide range of applications.The CY7C68013 chip of USB chip of the present invention based on CYPRESS company.Because USB chip only has the data-interface of one group of 16bit, for the transmission of several data (data, order etc.), have data jamming or transmit a certain data always and cause the problems such as other loss of datas.So not only can waste a large amount of time and wait for useful emergence message, also likely cause loss of data, the speed of communication and efficiency all can reduce greatly.
Summary of the invention
In view of the problem that present technology exists, the invention provides a kind of technical scheme that realizes CY7C68013 communication based on FPGA, the transmission that is able to realize data by the control of state machine has the object of priority.
The present invention realizes by such technical scheme: a kind of method that realizes CY7C68013 communication based on FPGA, for communicating by letter between FPGA and USB chip CY7C68013, it is characterized in that, at the inner fifo(first in first out that increases of FPGA) for data cached, prevent loss of data; The control of mated condition machine, realizes the function of the high high priority data of priority transmission;
FPGA internal circuit comprises FPGA interface module and modulation /demodulation, data processing module;
The inside of described FPGA interface module comprises three data-interfaces, and for communicating by letter of FPGA and CY7C68013 chip, the two communicates by the FPDP of CY7C68013 chip, each communications 16bit data;
Communication interface between FPGA and CY7C68013 chip adopts as gives a definition:
CY_DATA[15:0]: data path;
FLAGB: the full Status Flag of CY7C68013 chip internal fifo;
FLAGC: CY7C68013 chip internal fifo dummy status sign;
SLWR_N: write control signal, Low level effective;
PKTEND_N: write data complement mark, Low level effective;
SLRD_N: read control signal, Low level effective;
SLOE_N: exportable sign, Low level effective;
ADR[1:0]: the address ram of CY7C68013 chip internal;
Described CY7C68013 chip operation is under slave fifo pattern, and usb interface module is mainly by control circuit, and state machine forms, and wherein control circuit is for generation of read-write control signal; State machine is used for controlling execution and transmits and receive data;
PGA interface module, by three data-interfaces and CY7C68013 chip communication, has respectively three kinds of data to need transmission: A: the data that sent to CY7C68013 chip by FPGA; B: sent to the order of CY7C68013 chip by FPGA; C: sent to the order of FPGA by CY7C68013 chip.Their priority is: BCA;
PGA interface module control sequential comprises:
I part is for working as FPGA to CY info fifo non-NULL, and inner corresponding ram is pointed in the address of CY7C68013 chip and this ram is discontented, transmits the order that is sent to CY7C68013 chip by FPGA.Now SLWR_N is low level, and with effect, after data transmission completes, PKTEND_N signal is that low level represents that data transmission is complete;
II part is non-full for working as CY to FPGA info fifo, and the corresponding ram non-NULL of CY7C68013 chip, and now FPGA to CY info fifo is empty, transmits the order that is sent to FPGA by CY7C68013 chip.Now SLRD_N signal is low level, reads effectively, and SLOE_N signal drags down a clock period than SLRD_N signal is Zao simultaneously, guarantees the satisfied sequential requirement by CY7C68013 chip;
III part is for working as FPGA to CY data fifo non-NULL, and FPGA to CY info fifo is empty, and CY to FPGA info fifo is for full, and the corresponding ram of CY7C68013 chip is discontented, transmits the data that sent to CY7C68013 chip by FPGA.Now SLWR_N is low level, and with effect, after data transmission completes, PKTEND_N signal is that low level represents that data transmission is complete.
Advantage of the present invention is, in communication system, in the process of FPGA and CY7C68013 chip communication, by the control of state machine, can guarantee when the higher data of priority arrive and reach transmission conditions, suspend other data of transmission, the higher data of priority of prioritised transmission, to guarantee that the significant data that priority is higher can transmit in the very first time, use fifo to carry out buffer memory to data simultaneously, guarantee that the lower data of priority can not lose waiting in process waiting for transmission.
Accompanying drawing explanation
Fig. 1. data transmission general illustration;
Fig. 2. interface module control sequential schematic diagram;
Fig. 3. data transmission state transition diagram.
Embodiment
For a more clear understanding of the present invention, describe in conjunction with the accompanying drawings and embodiments the present invention in detail:
As shown in Figure 1 to Figure 3, CY7C68013 chip need to be configured to slave fifo pattern.By reading and writing data as 16bit data of the each transmission of data-interface.
The interface definition of FPGA and CY7C68013 chip is as follows:
CY_DATA[15:0]: data path;
FLAGB: the full Status Flag of CY7C68013 chip internal fifo;
FLAGC: CY7C68013 chip internal fifo dummy status sign;
SLWR_N: write control signal, Low level effective;
PKTEND_N: write data complement mark, Low level effective;
SLRD_N: read control signal, Low level effective;
SLOE_N: exportable sign, Low level effective;
ADR[1:0]: the address ram of CY7C68013 chip internal;
As shown in Figure 1, FPGA is mainly comprised of two parts: three fifo IP, and the data that enter code of the present invention for buffer memory, prevent because the higher data of transmission priority cause the loss of data that priority is lower; Steering logic, is used for producing read-write and controls the contents such as sequential, the priority of data transmission of communicating by letter of FPGA and CY7C68013 chip.
The present invention has three kinds of data needs transmission: A: the data that sent to CY7C68013 chip by FPGA; B: sent to the order of CY7C68013 chip by FPGA; C: sent to the order of FPGA by CY7C68013 chip.Their priority is: BCA.
As shown in Figure 2, be logic control circuit part.PGA interface module control sequential comprises:
I part is for working as FPGA to CY info fifo non-NULL, and inner corresponding ram is pointed in the address of CY7C68013 chip and this ram is discontented, transmits the order that is sent to CY7C68013 chip by FPGA.Now SLWR_N is low level, and with effect, after data transmission completes, PKTEND_N signal is that low level represents that data transmission is complete.II part is non-full for working as CY to FPGA info fifo, and the corresponding ram non-NULL of CY7C68013 chip, and now FPGA to CY info fifo is empty, transmits the order that is sent to FPGA by CY7C68013 chip.Now SLRD_N signal is low level, reads effectively, and SLOE_N signal drags down a clock period than SLRD_N signal is Zao simultaneously, guarantees the satisfied sequential requirement by CY7C68013 chip.III part is for working as FPGA to CY data fifo non-NULL, and FPGA to CY info fifo is empty, and CY to FPGA info fifo is for full, and the corresponding ram of CY7C68013 chip is discontented, transmits the data that sent to CY7C68013 chip by FPGA.Now SLWR_N is low level, and with effect, after data transmission completes, PKTEND_N signal is that low level represents that data transmission is complete.
As shown in Figure 3, be state machine transition diagram.Ten states, comprise an idle altogether.By detecting the full state of sky of each fifo, reach and make state machine redirect, realize according to the priority transmission data of BCA mentioned above.
According to the above description, in conjunction with art technology, can realize the solution of the present invention.
Claims (1)
1. a method that realizes CY7C68013 communication based on FPGA, for communicating by letter between FPGA and USB chip CY7C68013, is characterized in that, at the inner fifo(first in first out that increases of FPGA) for data cached, prevent loss of data; The control of mated condition machine, realizes the function of the high high priority data of priority transmission;
FPGA internal circuit comprises FPGA interface module and modulation /demodulation, data processing module;
The inside of described FPGA interface module comprises three data-interfaces, and for communicating by letter of FPGA and CY7C68013 chip, the two communicates by the FPDP of CY7C68013 chip, each communications 16bit data;
Communication interface between FPGA and CY7C68013 chip adopts as gives a definition:
CY_DATA[15:0]: data path;
FLAGB: the full Status Flag of CY7C68013 chip internal fifo;
FLAGC: CY7C68013 chip internal fifo dummy status sign;
SLWR_N: write control signal, Low level effective;
PKTEND_N: write data complement mark, Low level effective;
SLRD_N: read control signal, Low level effective;
SLOE_N: exportable sign, Low level effective;
ADR[1:0]: the address ram of CY7C68013 chip internal;
Described CY7C68013 chip operation is under slave fifo pattern, and usb interface module is mainly by control circuit, and state machine forms, and wherein control circuit is for generation of read-write control signal; State machine is used for controlling execution and transmits and receive data;
PGA interface module, by three data-interfaces and CY7C68013 chip communication, has respectively three kinds of data to need transmission: A: the data that sent to CY7C68013 chip by FPGA; B: sent to the order of CY7C68013 chip by FPGA; C: sent to the order of FPGA by CY7C68013 chip; Their priority is: BCA;
PGA interface module control sequential comprises:
I part is for working as FPGA to CY info fifo non-NULL, and inner corresponding ram is pointed in the address of CY7C68013 chip and this ram is discontented, transmits the order that is sent to CY7C68013 chip by FPGA; Now SLWR_N is low level, and with effect, after data transmission completes, PKTEND_N signal is that low level represents that data transmission is complete;
II part is non-full for working as CY to FPGA info fifo, and the corresponding ram non-NULL of CY7C68013 chip, and now FPGA to CY info fifo is empty, transmits the order that is sent to FPGA by CY7C68013 chip; Now SLRD_N signal is low level, reads effectively, and SLOE_N signal drags down a clock period than SLRD_N signal is Zao simultaneously, guarantees the satisfied sequential requirement by CY7C68013 chip;
III part is for working as FPGA to CY data fifo non-NULL, and FPGA to CY info fifo is empty, and CY to FPGA info fifo is for full, and the corresponding ram of CY7C68013 chip is discontented, transmits the data that sent to CY7C68013 chip by FPGA; Now SLWR_N is low level, and with effect, after data transmission completes, PKTEND_N signal is that low level represents that data transmission is complete.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310707821.4A CN103729320B (en) | 2013-12-20 | 2013-12-20 | A kind of based on the FPGA method realizing CY7C68013 communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310707821.4A CN103729320B (en) | 2013-12-20 | 2013-12-20 | A kind of based on the FPGA method realizing CY7C68013 communication |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103729320A true CN103729320A (en) | 2014-04-16 |
CN103729320B CN103729320B (en) | 2016-06-29 |
Family
ID=50453400
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310707821.4A Active CN103729320B (en) | 2013-12-20 | 2013-12-20 | A kind of based on the FPGA method realizing CY7C68013 communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103729320B (en) |
Cited By (4)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104363216A (en) * | 2014-11-04 | 2015-02-18 | 南车株洲电力机车研究所有限公司 | Data processing method and train network system |
CN106126462A (en) * | 2016-07-11 | 2016-11-16 | 上海航天设备制造总厂 | A kind of data collecting card based on VISA technology |
CN109446134A (en) * | 2018-09-18 | 2019-03-08 | 天津大学 | A kind of USB high-speed interface based on FPGA |
CN110059045A (en) * | 2019-04-22 | 2019-07-26 | 仓领电子科技(上海)有限公司 | A kind of no-dig technique sensing device bus sharing system based on FPGA, method and device |
Citations (7)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1890475A1 (en) * | 2006-08-15 | 2008-02-20 | STMicroelectronics (Research & Development) Limited | Video frame buffer |
WO2008131308A1 (en) * | 2007-04-19 | 2008-10-30 | Microsoft Corporation | Field-programmable gate array based accelerator system |
CN101808027A (en) * | 2010-03-31 | 2010-08-18 | 哈尔滨工业大学 | Data receiving, storing and forwarding device suitable for various ports |
US20130073758A1 (en) * | 2007-10-15 | 2013-03-21 | Ray Chang | Dynamic port power allocation apparatus and methods |
CN103092194A (en) * | 2013-02-01 | 2013-05-08 | 哈尔滨工业大学 | Performance test device and method of general servo mechanism based on universal serial bus (USB) |
CN103293992A (en) * | 2013-05-30 | 2013-09-11 | 徐渊 | USB (universal serial bus) flash drive type FPGA (field programmable gate array) development board |
CN103412847A (en) * | 2013-08-24 | 2013-11-27 | 西安电子科技大学 | FPGA-based (field programmable gate array-based) USB (universal serial bus) to multilink interface circuit |
-
2013
- 2013-12-20 CN CN201310707821.4A patent/CN103729320B/en active Active
Patent Citations (7)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1890475A1 (en) * | 2006-08-15 | 2008-02-20 | STMicroelectronics (Research & Development) Limited | Video frame buffer |
WO2008131308A1 (en) * | 2007-04-19 | 2008-10-30 | Microsoft Corporation | Field-programmable gate array based accelerator system |
US20130073758A1 (en) * | 2007-10-15 | 2013-03-21 | Ray Chang | Dynamic port power allocation apparatus and methods |
CN101808027A (en) * | 2010-03-31 | 2010-08-18 | 哈尔滨工业大学 | Data receiving, storing and forwarding device suitable for various ports |
CN103092194A (en) * | 2013-02-01 | 2013-05-08 | 哈尔滨工业大学 | Performance test device and method of general servo mechanism based on universal serial bus (USB) |
CN103293992A (en) * | 2013-05-30 | 2013-09-11 | 徐渊 | USB (universal serial bus) flash drive type FPGA (field programmable gate array) development board |
CN103412847A (en) * | 2013-08-24 | 2013-11-27 | 西安电子科技大学 | FPGA-based (field programmable gate array-based) USB (universal serial bus) to multilink interface circuit |
Cited By (5)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104363216A (en) * | 2014-11-04 | 2015-02-18 | 南车株洲电力机车研究所有限公司 | Data processing method and train network system |
CN106126462A (en) * | 2016-07-11 | 2016-11-16 | 上海航天设备制造总厂 | A kind of data collecting card based on VISA technology |
CN109446134A (en) * | 2018-09-18 | 2019-03-08 | 天津大学 | A kind of USB high-speed interface based on FPGA |
CN110059045A (en) * | 2019-04-22 | 2019-07-26 | 仓领电子科技(上海)有限公司 | A kind of no-dig technique sensing device bus sharing system based on FPGA, method and device |
CN110059045B (en) * | 2019-04-22 | 2024-04-12 | 吴进国 | FPGA-based bus sharing system, method and device for non-excavation sensing device |
Also Published As
Publication number | Publication date |
---|---|
CN103729320B (en) | 2016-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102760111B (en) | 2015-05-20 | FPGA-based (Field Programmable Gate Array) extended multi-serial port device and data receiving-transmitting method thereof |
CN102243619A (en) | 2011-11-16 | FPGA (Field Programmable Gate Array)-based method for realizing multi-path I2C (Inter-Integrated Circuit) bus port expansion |
CN104915303B (en) | 2017-11-21 | High speed digital I based on PXIe buses/O systems |
CN103034602B (en) | 2015-11-25 | A kind of content search chip based on peripheral component interconnect bus and system |
CN103729320A (en) | 2014-04-16 | Method for implementing CY7C68013 communication on basis of FPGA (field programmable gate array) |
CN103488607A (en) | 2014-01-01 | Communication system and communication method for SOC (system on chip) processor and FPGA (field-programmable gate array) chip on embedded linux platform |
CN204423250U (en) | 2015-06-24 | A kind of X86 embedded type CPU mainboard with multipath high-speed intelligent CAN |
CN105786741B (en) | 2023-05-23 | SOC high-speed low-power-consumption bus and conversion method |
CN102799558A (en) | 2012-11-28 | RS422 communication module based on CPCI bus |
CN104461971A (en) | 2015-03-25 | Data collecting control system and method |
CN108628793B (en) | 2021-04-02 | SPI communication circuit and method |
CN102176589A (en) | 2011-09-07 | Concentrator for universal serial bus (USB)-8 serial port RS422 |
CN103294411A (en) | 2013-09-11 | Low-speed load data loading module with mass memory function |
CN203732926U (en) | 2014-07-23 | Digital input and output expansion module for AGV vehicle-borne control systems |
CN105320637A (en) | 2016-02-10 | FLASH data read circuit |
CN201662798U (en) | 2010-12-01 | Port mapping device conversion device and control system |
CN206075266U (en) | 2017-04-05 | Multichannel ARINC429 Communication Cards |
CN205384545U (en) | 2016-07-13 | Display card accelerator based on vxworks |
CN115664539A (en) | 2023-01-31 | Photonic high performance bus |
CN102023948B (en) | 2012-05-30 | Direct interface method of USB 3.0 bus and high speed intelligent unified bus |
CN103995786B (en) | 2017-05-17 | Transmission method and device of high-speed cache consistency information |
CN205581857U (en) | 2016-09-14 | A device for realizing multiple master devices on the SPI bus |
CN202422113U (en) | 2012-09-05 | Switching system for realizing industry standard architecture (ISA) bus on performance optimization with enhanced RISC-performance computing (PowerPC) embedded computer |
CN203102274U (en) | 2013-07-31 | High speed data transmission connector |
CN104539281B (en) | 2018-05-11 | A kind of dual port RAM read/write channel switching distribution module with programmable function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2014-04-16 | C06 | Publication | |
2014-04-16 | PB01 | Publication | |
2014-05-14 | C10 | Entry into substantive examination | |
2014-05-14 | SE01 | Entry into force of request for substantive examination | |
2016-06-29 | C14 | Grant of patent or utility model | |
2016-06-29 | GR01 | Patent grant |