11-16-2011 06:56 PM - edited 11-16-2011 06:59 PM
I want to connect IC SAA7113 which it have to interface with I2C bus. So, I want to use FPGA Spartan3 interface I2C with VHDL. I downloaded I2C Master Slave Core from http://opencores.org/project,i2c_master_slave . But I don't understand how to send data between master and slave. The code I2C Master Slave Core show connect between slave and master only. How to send my data between master and slave ? If you have some example with VHDL or easier solution about interface SAA7113 in FPGA please help me.
11-16-2011 09:03 PM
The code you linked looks very complex and has virtually no comments. I2C isn't a complicated protocol, so it would be a good exercise to implement your own I2C controller from scratch. A lot of the things you'll find on OpenCores will waste more of your time than they save!
fpga4fun.com has a short section on I2C, and unfortunately only a simple slave implementation.
11-17-2011 01:47 AM
11-17-2011 01:58 AM - edited 11-17-2011 02:02 AM
It looks like you may have to send quite a lot of set-up data to the SAA7113. It may be easier to do that control task from an embedded processor, such as the MicroBlaze.
Or configure a BRAM as a ROM, and stream the data from the ROM to the SAA7113 in one I2C transfer at startup. This should be a simple state machine design.
One BRAM is large enough to hold several 'profiles'. Each 'profile' requires 95 bytes. A single 8Kbit BRAM can hold 10 'profiles'.
-- Bob Elkind
11-17-2011 09:12 PM
If I use Microblaze it will be embeded system. That I'm not sure can it use parallel processing or it can use sequential statement only ? I want to interface multiple camera like this http://www.springerlink.com/content/e78t5332205q5n17/fulltext.pdf . How to do that ?
11-17-2011 09:19 PM
I2C on this chip only seems to be used for configuring registers, not for the video output itself. You could use one soft processor to program multiple chips, one after another, if you didn't care about registers being set at identical times (I'm not sure why you would).
If you wanted to process the video stream using MicroBlaze, you could do that too, or you could do it in pure HDL, or you could use multiple MicroBlaze cores, or whatever. Your design requirements should lead to the best choice.
11-18-2011 08:16 AM
like others said, you need the microcontroller and write the software to load the SA7113.
Microcontroller can be almost anything from soft core like MicroBlaze or real one.
When you deterine which is your uC, then you go to implemnt the I2C protocol, and again you have lot of choices, there're many many diferrent ways to do this
Notes that I2C is serial communication, you can talk to only one slave at a time
05-06-2015 04:08 AM
I was able to read different ICs with another opencores project at http://opencores.org/project,i2c. However it is wishbone compatible and seems complex.
A simple master module is in here https://www.eewiki.net/display/LOGIC/I2C+Master+(VHDL)
I plan to work on it but haven't used it yet.
05-18-2015 02:18 AM
Use the file "i2c_master_v01" from the project you have specified, its a simple I2C Core which acts as a Master; design a wrapper around it which will perform Writes/Reads and as Bob has suggest configure a ROM to store the Startup data from which the state-machine will read the data and give to the I2C Core.
05-20-2015 02:28 AM
A further option to considier is using a small footprint Picoblaze which comes with an I2C reference design that I have succesfully used in the past. Download here: