cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
polyee13
Explorer
Explorer
8,289 Views
Registered: ‎11-28-2011

Pin Placement of I2C / System Management Bus Clocks and Data lines

Jump to solution

Do I2C/ SMBUS clock signals have to be routed to a GCLK pin of a Spartan-6 device? I'm running into some layout issues and a suggestion was made to move these clock and data signals from their current bank to another bank, which doesn't have any global clock pins. 

0 Kudos
1 Solution

Accepted Solutions
gszakacs
Professor
Professor
10,950 Views
Registered: ‎08-14-2007

@polyee13 wrote:

So with that said, it really shouldn't matter if the I2C clock lines are allocated to a Global clock pin. It's not like the I2C clock is a clock that will be distributed through the FPGA for the logic other than the I2C core.


Correct.

 

To add to that, you should know that unless you have an FPGA or CPLD with hysteresis on the

inputs (Schmitt triggers) you should not even consider using the SCL line as a clock.  Its rise

time is much too slow.

 

-- Gabor

-- Gabor

View solution in original post

0 Kudos
7 Replies
rcingham
Teacher
Teacher
8,286 Views
Registered: ‎09-09-2010
If the I2C/SMbus slave block you are using treats the SCK pin as a clock (rather than oversampling it for rising and falling edges), then it is doing things the hard way!

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
polyee13
Explorer
Explorer
8,284 Views
Registered: ‎11-28-2011

Not sure if I understand your reply. Let's assume that it treats the clock lines as a clock.

0 Kudos
bassman59
Historian
Historian
8,280 Views
Registered: ‎02-25-2008

@polyee13 wrote:

Not sure if I understand your reply. Let's assume that it treats the clock lines as a clock.


You missed his point. You should use your FPGA's high-speed global clock to oversample the I2C signals and look for levels. Remember that I2C isn't edge sensitive. 

----------------------------Yes, I do this for a living.
0 Kudos
rcingham
Teacher
Teacher
8,276 Views
Registered: ‎09-09-2010

"Not sure if I understand your reply. Let's assume that it treats the clock lines as a clock."

 

Don't assume. Find out.
If you looked at the HDL for the I2C block, would you understand it?


------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
polyee13
Explorer
Explorer
8,270 Views
Registered: ‎11-28-2011

So with that said, it really shouldn't matter if the I2C clock lines are allocated to a Global clock pin. It's not like the I2C clock is a clock that will be distributed through the FPGA for the logic other than the I2C core.

0 Kudos
gszakacs
Professor
Professor
10,951 Views
Registered: ‎08-14-2007

@polyee13 wrote:

So with that said, it really shouldn't matter if the I2C clock lines are allocated to a Global clock pin. It's not like the I2C clock is a clock that will be distributed through the FPGA for the logic other than the I2C core.


Correct.

 

To add to that, you should know that unless you have an FPGA or CPLD with hysteresis on the

inputs (Schmitt triggers) you should not even consider using the SCL line as a clock.  Its rise

time is much too slow.

 

-- Gabor

-- Gabor

View solution in original post

0 Kudos
bassman59
Historian
Historian
8,251 Views
Registered: ‎02-25-2008

@polyee13 wrote:

So with that said, it really shouldn't matter if the I2C clock lines are allocated to a Global clock pin. It's not like the I2C clock is a clock that will be distributed through the FPGA for the logic other than the I2C core.


The I2C clock isn't used as a clock, full stop. It's a flag that, when high, indicates that the state of SDA is a valid logic level. When SCK is low, SDA can change, but SDA must be stable some setup time before the rise of SCK and cannot change until after SCK falls. So what is usually done is for the FPGA to oversample SCK, note when its rising edge occurs, and then wait a few (fast system) clock ticks before actually reading the value on SDA. You want to wait because, as noted, the rise time on SCK and SDA are not all that fast due to resistive pull-ups.

----------------------------Yes, I do this for a living.
0 Kudos