EmbDev.net

Forum: FPGA, VHDL & Verilog Lattice MachXO2 EFB block


Author: Venkatesh Raju (Company: VVDN technologies) (venkatesraju39)
Posted on:

Rate this post
0 useful
not useful
Hi all,

 Perhaps someone who has experience in Lattice EFB may answer this.



 I am building a design on a MachXO2 using the EFB for I2C MASTER
 communication

 I built my own state machine for writing and reading to the wishbone
 bus.

I Could able to read/write EFB I2C Master to I2C slave external device.

the actual problem is when we flash the FPGA to work properly(i mean to 
say for successful read/write operation in I2C doesn't happen unless we 
give power on reset)

since our our requirement is to flash the FPGA and use it.. there is no 
provision of giving power on reset in actual application.

When we give power on reset it works flawlessly after flash but it 
doesn't work when we flash the fpga and use before giving the power on 
reset.

when i probed the I2C lines after flashing the FPGA and before giving 
power on reset. a write / read leads to continuous generation of SCL and 
No data SDA.


same logic works flawlessly after giving power on reset.

Am i missing something here.. Any help would be very helpful...
Thanks....

Author: Lattice User (Guest)
Posted on:

Rate this post
0 useful
not useful
Venkatesh Raju wrote:

> since our our requirement is to flash the FPGA and use it.. there is no
> provision of giving power on reset in actual application.

Of course there is.
Just create your own:
module reset_gen(input wire clk, output wire reset);
reg [7:0] counter = 0;
always @(posedge clk)
   if( counter[7] == 1'b0 ) counter <= counter + 1;
assign reset = ~counter[7];
endmodule

Allergy warning: the code may contain typos and other erros.

Author: Venkatesh Raju (Company: VVDN technologies) (venkatesraju39)
Posted on:

Rate this post
0 useful
not useful
Actually we tried this option , generating the reset signal and giving 
to the EFB module din't worked.

I2C hard ip in EFB module always need power on reset after flashing for 
a proper functioning. otherwise it I2C clock pulses are coming 
continuously.

Author: Lattice User (Guest)
Posted on:

Rate this post
0 useful
not useful
Have you tried to disable the I2C master with your state machine before 
triggering the reboot?

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.