simultaneous GPIF read/write

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
dimac_335226
Level 1
Level 1
5 replies posted Welcome! First question asked

Hello there,
I am designing a readout system for an imaging sensor. Basic idea is to send control signals (+ configuration data) to the sensor and read acquired data back. I am using synchronous communication and the chip acts as slave to FX3. USB streamer looks like the most appropriate mechanism for data exchange with the PC at the moment. GPIF is employed to run basic state machine. Communication with the sensor happens via usb as follows:
1) computer program (e.g. control centre) sends data to USB out end point. The first bit represents a function for sensor to do, rest of the data packet represents data to be sent to the chip.
2) Data goes to GPIF state machine, where it is transmitted to the sensor.
3) Sensor responds with some data.
4) Data from the sensor goes to CPU, receives some treatment (de-serialisation, header etc)
5) Final data goes to the PC via USB in end point and gets saved on the hard drive.
I progressed quite far with the implementation of the system thanks to many useful examples on the web site and other forum posts. However, I did stuck in one place and any help or suggestion how to implement this would be greatly appreciated.

One of the communication commands to be sent to the sensor makes the sensor respond as the data is being transmitted to it.
So effectively, I will require to record data on one GPIF pin into buffer as the data is being transmitted to the sensor on another GPIF pin. I can pass this data to the PC later. The GPIF designed doesn't seem to allow the state to send and receive data simultaneously. Could this be overcame somehow? Timing diagram is attached for convenience.

Many thanks,
Dima

0 Likes
1 Reply
Anonymous
Not applicable

 Hi,

   

It is impossible for a same state in the GPIF State Machine to read/write simultaneously, as the GPIF databus can never be bidirectional.

   

You will have to split that packet into smaller parts such that, after the first part is sent, you receive the response from the sensor through another state and again transmit the remaining part to the sensor.

   

Regards,

   

- Madhu Sudhan

0 Likes