From: Antti on
it depends, :) microblaze is true overkill, but picoblaze isnt,
specially if you have some other minor managements taks to take also,
then it really pays the fpga resource price it takes

antti

From: c d saunter on
Antti (Antti.Lukats(a)xilant.com) wrote:
: it depends, :) microblaze is true overkill, but picoblaze isnt,
: specially if you have some other minor managements taks to take also,
: then it really pays the fpga resource price it takes

Also if the 'I2C' device isn't following the spec particularly well then
debugging the interface by reloading the picoblaze ROM at run time makes
for a much better interactive debugging experience than recompiling VHDL!

Of course this isn't relevant as nobody would ever ship a device with a
broken I2C compatible interface...

cds
From: Brad Smallridge on
Excellent! Felix, Thank you.

This code synthesizes to 26 slices on a V4.
Probably more if more I2C need to be sent.

I needed to change only this clkdiv line to
help speed up a ModelSim simulate,

-- signal clkdiv: unsigned(8 downto 0);
signal clkdiv: unsigned(1 downto 0);

I'll change it back to adjust to my frequencies.

All the SDA and SCL lines appear to be rising and
falling per I2C spec.

Thanks so much.

Brad





From: Brad Smallridge on
Excellent! Felix, Thank you.

This code synthesizes to 26 slices on a V4.
Probably more if more I2C need to be sent.

I needed to change only this clkdiv line to
help speed up a ModelSim simulate,

-- signal clkdiv: unsigned(8 downto 0);
signal clkdiv: unsigned(1 downto 0);

I'll change it back to adjust to my frequencies.

All the SDA and SCL lines appear to be rising and
falling per I2C spec.

Thanks so much.

Brad



From: Felix Bertram on
Hi Brad,

> Excellent! Felix, Thank you.

I am glad to hear that this was helpful.

> This code synthesizes to 26 slices on a V4.
> Probably more if more I2C need to be sent.

all I2C data are stored in a ROM (seq, seqT) which is probably 10 bits
wide (i2cT) and as deep as your I2C sequence requires.

In case you have longer sequences, you might want to check how this ROM
is really synthesized. If the synthesizer does not infer the ROM
properly, you might want to replace the command tag (i2cE) by a two-bit
vector.

> I needed to change only this clkdiv line to
> help speed up a ModelSim simulate,
>
> -- signal clkdiv: unsigned(8 downto 0);
> signal clkdiv: unsigned(1 downto 0);
>
> I'll change it back to adjust to my frequencies.

the module was originally clocked by a 24 MHz clock. You might need to
adjust it to your requirements.

And of course: You will need to create your own I2C sequence. Please
note that the module is cyclically repeating the pattern. This might or
might not fit with your application.



Best regards, Felix
--
Dipl.-Ing. Felix Bertram
http://www.bertram-family.com/felix