CN103729320A - Method for implementing CY7C68013 communication on basis of FPGA (field programmable gate array) - Google Patents

Method for implementing CY7C68013 communication on basis of FPGA (field programmable gate array) Download PDF

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
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
Application number
CN201310707821.4A
Other languages
Chinese (zh)
Other versions
CN103729320B (en
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.)
Tianjin Optical Electrical Communication Technology Co Ltd
Original Assignee
Tianjin Optical Electrical Communication Technology 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 Tianjin Optical Electrical Communication Technology Co Ltd filed Critical Tianjin Optical Electrical Communication Technology Co Ltd
Priority to CN201310707821.4A priority Critical patent/CN103729320B/en
Publication of CN103729320A publication Critical patent/CN103729320A/en
Application granted granted Critical
Publication of CN103729320B publication Critical patent/CN103729320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

A kind of method that realizes CY7C68013 communication based on FPGA
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.
CN201310707821.4A 2013-12-20 2013-12-20 A kind of based on the FPGA method realizing CY7C68013 communication Active CN103729320B (en)

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 party
Publication 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 party
Publication 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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication 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 party
Publication 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
CN102243619A (en) FPGA (Field Programmable Gate Array)-based method for realizing multi-path I2C (Inter-Integrated Circuit) bus port expansion
CN103729320A (en) Method for implementing CY7C68013 communication on basis of FPGA (field programmable gate array)
CN103488607A (en) Communication system and communication method for SOC (system on chip) processor and FPGA (field-programmable gate array) chip on embedded linux platform
CN109446134A (en) A kind of USB high-speed interface based on FPGA
CN105786741B (en) SOC high-speed low-power-consumption bus and conversion method
CN104714918A (en) Method for receiving and buffering high-speed FC bus data in host computer environment
CN103823785A (en) Multi-way ARINC429 data transmit-receive circuit structure based on development of DSP and CPLD
CN105373511A (en) Device and method for simultaneous communication with multiple optical modules
CN104461971A (en) Data collecting control system and method
CN103412847B (en) USB based on FPGA turns multichannel link interface circuit
CN102176589A (en) Concentrator for universal serial bus (USB)-8 serial port RS422
CN203732926U (en) Digital input and output expansion module for AGV vehicle-borne control systems
CN105320637A (en) FLASH data read circuit
CN115664539A (en) Photonic high performance bus
CN206075266U (en) Multichannel ARINC429 Communication Cards
CN103559159A (en) Information processing method and electronic device
CN201662798U (en) Port mapping device conversion device and control system
CN205384545U (en) Display card accelerator based on vxworks
CN205283577U (en) Device through high speed bus extension multichannel RS422485 interface
CN204406391U (en) A kind of data of optical fiber gyroscope R-T unit based on SPI
CN103647728B (en) A kind of STM32 micro-chip and Linux system high-speed serial ports Anti-jamming Communication method
CN203102274U (en) High speed data transmission connector
CN202422113U (en) Switching system for realizing industry standard architecture (ISA) bus on performance optimization with enhanced RISC-performance computing (PowerPC) embedded computer
CN103634237A (en) MCMC [MicroTCA (Micro Telecom Computing Architecture) Carrier Management Controller]
CN204965140U (en) Simple and easy controller that can be used to digit control machine tool human -computer interaction

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant