Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

fpga altera program by micro

Status
Not open for further replies.

franticEB

Full Member level 3
Joined
May 10, 2010
Messages
150
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,516
Hi,
I'm working on board where an Altera Cyclone IV EP4CE6E22I7N is mounted (with attached flash memory EPCS4). A microcontroller is also present in order to perform reading/writing operation on FPGA internal registers.

I always program FPGA by jtag usb blaster, loading a .jic file.

Now i want to program FPGA using microcontroller, and i don't know where to start.

Anyone could help me please? Is there any tutorial or VHDL code as example suitable for me?

Thanks in advance.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,841
Helped
14,116
Reputation
28,489
Reaction score
12,797
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,694
I always program FPGA by jtag usb blaster, loading a .jic file.
You mean you program the serial flash over JTAG which in turn configures the FPGA.
Now i want to program FPGA using microcontroller, and i don't know where to start.
Depends on if you want to program the EPS4 flash (non-volatile) or configure the FPGA (volatile)?
 

franticEB

Full Member level 3
Joined
May 10, 2010
Messages
150
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,516
You mean you program the serial flash over JTAG which in turn configures the FPGA.
Yes

Depends on if you want to program the EPS4 flash (non-volatile) or configure the FPGA (volatile)?
I want to program eps4 flash(non-volatile)

Is it possible make the micro write FPGA registers with binary file and then FPGA writes flash memory?

Or

could you give me other solutions?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,841
Helped
14,116
Reputation
28,489
Reaction score
12,797
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,694
The EPCS4 serial flash can be programmed from the FPGA fabric. You can use the altasmi_parallel MegaFunction for this purpose or use your own code. Another option is to connect µC GPIO pins to the serial flash and use the nCE pin to tri-state the FPGA pins during µC access to the flash. In other words, there are many ways to achieve what you want.
 

franticEB

Full Member level 3
Joined
May 10, 2010
Messages
150
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,516
The EPCS4 serial flash can be programmed from the FPGA fabric. You can use the altasmi_parallel MegaFunction for this purpose or use your own code. Another option is to connect µC GPIO pins to the serial flash and use the nCE pin to tri-state the FPGA pins during µC access to the flash. In other words, there are many ways to achieve what you want.
By schematic the uC is not connected to the epcs4 flash.

The TCK,TDO,TDI and TMS pis of jtag male connector on board, are connected to fpga's dedicated pins.
Fpga is also connected to flash through DATA,DCLK,DCS,ASDI pins.
So i think that the fpga already write its flash byself, but how can i view the block or the setting that performs this action?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,841
Helped
14,116
Reputation
28,489
Reaction score
12,797
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,694
By schematic the uC is not connected to the epcs4 flash.
You have been asking how to program the flash from µC. Connecting it to the flash is a possible option. If it's not available in your design, you can refer to the other options.

You should read the altasmi_parallel documentation to understand the standard method to program the flash from user FPGA logic. http://www.altera.com/literature/ug/ug_altasmi_parallel.pdf

So i think that the fpga already write its flash byself, but how can i view the block or the setting that performs this action?
The JTAG indirect programming is performed by the alt_sfl respectively alt_sfl_enhanced Megafunction. You can review the code in the megafunctions folder if you are interested in the details. The serial flash loader IP can be either included in the final design or loaded during flash programming only.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top