Author Topic: Setting up an fpga board  (Read 7359 times)

0 Members and 1 Guest are viewing this topic.

Offline DajgoroTopic starter

  • Frequent Contributor
  • **
  • Posts: 322
  • Country: hr
    • hackaday.io
Setting up an fpga board
« on: March 11, 2015, 04:20:06 am »
Hi.

I need to make a project that requires an fpga, something like a spartan 3 would do.
I poked with discrete cpld-s and fpga modules, but I never made a device with a discrete fpga chip.
I know that fpga-s need an external rom chip, and a clock source. I googled a bit, but I could not find an easy cookbook on how to set it all up. Any links to a cookbook like document?
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: Setting up an fpga board
« Reply #1 on: March 11, 2015, 08:31:39 am »
Why not start with a ready-made board? This is a low cost Altera one http://www.terasic.com.tw/cgi-bin/page/archive.pl?CategoryNo=139&No=593 and they have a special price for students. I'm sure there would be similar for Xilinx if you particularly wanted to use that make.

 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3070
  • Country: be
    • Freelance Hardware Engineer
Re: Setting up an fpga board
« Reply #2 on: March 11, 2015, 09:07:46 am »
There's not really a cookbook. There's hundreds and hundreds of pages of documentation, though O0

So a module is the better aproach for sure.

In addtion, not all FPGAs require an additional external ROM. Actel/Microsemi chips do not require them (non-volatile tech) and the Spartan 3AN series has it integrated in the package. Furthermore, not all FPGAs require an external clock source. If I remember, the Smartfusion has a clock inside.

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Setting up an fpga board
« Reply #3 on: March 11, 2015, 09:50:44 am »
There are also quite a few open source boards out there, that you could leverage for your designs.

Furthermore, not all FPGAs require an external clock source. If I remember, the Smartfusion has a clock inside.

Quite a few have a vaguely hidden RC configuration clock that you can leverage on start up if required. It is enough to get a design running to configure and switch onto the external clock.

e.g. for Spartan 6 it is hidden in the STARTUP_SPARTAN6 primitive:

Code: [Select]
STARTUP_SPARTAN6_inst : STARTUP_SPARTAN6
   port map (
      CFGCLK    => open,         -- 1-bit output: Configuration logic main clock output.
      CFGMCLK   => config_clock, -- 1-bit output: Configuration internal oscillator clock output.
      EOS       => open,         -- 1-bit output: Active high output signal indicates the End Of Configuration.
      CLK       => '0',          -- 1-bit input: User startup-clock input
      GSR       => '0',          -- 1-bit input: Global Set/Reset input (GSR cannot be used for the port name)
      GTS       => '0',          -- 1-bit input: Global 3-state input (GTS cannot be used for the port name)
      KEYCLEARB => '0'           -- 1-bit input: Clear AES Decrypter Key input from Battery-Backed RAM (BBRAM)
   );

It is somewhere between 1MHz and 50MHz, depending on config options used when generating the bitstream.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline Ice-Tea

  • Super Contributor
  • ***
  • Posts: 3070
  • Country: be
    • Freelance Hardware Engineer
Re: Setting up an fpga board
« Reply #4 on: March 11, 2015, 10:23:06 am »
Quite a few have a vaguely hidden RC configuration clock that you can leverage on start up if required. It is enough to get a design running to configure and switch onto the external clock.

Didn't know that but makes sense I suppose. They all run a clock to their conf device ;)

In the smartfusion it's not so hidden, though.

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: Setting up an fpga board
« Reply #5 on: March 11, 2015, 01:52:30 pm »
I'd offer to have a look to Altera MAX10. Might be easier to start with.
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
Re: Setting up an fpga board
« Reply #6 on: March 11, 2015, 02:01:45 pm »
Most manufacturers have a section in one of their manuals covering minimum setups.
Usually something like "configuration guide" for config devices (usually SPI flash), and also for power.
If all your IO is at the same voltage, Power is usually fairly straightforward but you need to check whether Vccaux is needed, as it is only required for soem I/O standards.

Looking at schematics of (simple) devboards will be a good start

Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline KM4FER

  • Regular Contributor
  • *
  • Posts: 81
  • Country: us
Re: Setting up an fpga board
« Reply #7 on: March 11, 2015, 02:12:33 pm »
It appears that this is a student assignment but it's not clear from your message if the assignment includes designing a hardware circuit using an fpga or if it is just to program an fgpa in an existing circuit.

In the March/April 2015 copy of QEX magazine from ARRL there is an article on using an Altera Cyclone fpga in a Bemicro board where the author goes through the steps required to program the fpga from existing sample code for a Software Defined Radio.  This might give you an overview of what you need to do for your assignment.

earl...
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Setting up an fpga board
« Reply #8 on: March 11, 2015, 03:14:12 pm »
Digilent has a lot of FPGA dev boards, and they provide schematics for most (all?) of them.  The CMODs are pretty basic and just include the components necessary to get it up and running, with maybe a couple of buttons or LEDs stuck on as well.

Here's the schematic for their Cmod S6 board, which uses a Xilinx Spartan-6:
http://digilentinc.com/Products/Detail.cfm?NavPath=2,400,1227&Prod=CMOD-S6
http://digilentinc.com/Data/Products/CMOD-S6/Cmod%20S6_sch.pdf
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
Re: Setting up an fpga board
« Reply #9 on: March 11, 2015, 03:33:48 pm »
There are also quite a few open source boards out there, that you could leverage for your designs.

Furthermore, not all FPGAs require an external clock source. If I remember, the Smartfusion has a clock inside.

Quite a few have a vaguely hidden RC configuration clock that you can leverage on start up if required. It is enough to get a design running to configure and switch onto the external clock.


AFAIK all FPGAs have an RC clock used for configuration. SOme have one that is accessble to user designs. Of course it is possible to have an FPGA design that needs no clock, but won't be very useful.
Clock requirement will be dependent on your design, and though clocks can go into any pin, where possible you should use the pins specifically allocated to clocks to ensure minimum delays. In some cases (e.g. driving PLLs) it may ne essential to use specific clock pins.
 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: Setting up an fpga board
« Reply #10 on: March 11, 2015, 04:45:07 pm »
Actually, you should always use a dedicated clock input pins for continuous (not stretched like SPI or I2C) clocks, because these clock inputs connects to global clock networks and can be constrained as clocks. Otherwise forget a proper design timing.
 

Offline that_guy

  • Contributor
  • Posts: 41
  • Country: gb
Re: Setting up an fpga board
« Reply #11 on: March 11, 2015, 05:35:21 pm »
I've found Xilinx's reference documentation to be generally excellent; well written and complete, if a little spread out amongst many documents.

Everything you need to design a circuit with a Spartan 3 FPGA that can be programmed and powered is in these docs:

UG332
XAPP453
XAPP623

Opinions differ on whether you really need the forest of decoupling caps that XAPP623 can end up recommending. That'll depend on your design.
 

Offline DajgoroTopic starter

  • Frequent Contributor
  • **
  • Posts: 322
  • Country: hr
    • hackaday.io
Re: Setting up an fpga board
« Reply #12 on: March 11, 2015, 10:00:40 pm »
It appears that this is a student assignment but it's not clear from your message if the assignment includes designing a hardware circuit using an fpga or if it is just to program an fgpa in an existing circuit.

It is a free topic assignment. I have to do something, and I want do do a small usb logic analyzer, because I know I can do it. One option was to use a XC9572XL, which I know how to set up and program, or I could just put a small fpga so that I can have proper functionality and expand it at some later time.
I could actually use a module, and I do indeed have one, but I would like to do it all on a single pcb. Since I always used Xilinx stuff, I would like to use an Xilinx fpga, just because I already know how the Xilinx ide works.

As for the schematic, any recommendations of a properly built open source module that I could clone the schematic from that includes something like a Spartan 3 XC3S200, or any other Xilinx fpga that is cheap, non bga and runs on 3.3V?
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19492
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Setting up an fpga board
« Reply #13 on: March 11, 2015, 10:46:42 pm »
It is a free topic assignment. I have to do something, and I want do do a small usb logic analyzer, because I know I can do it.

If the assignment's objective is to design a PCB and circuit with an FPGA, then making your own is a good idea.

If the assignment's objective is to design a logic analyser with an FPGA, then making your own PCB is a bad idea - use a module and add your value to that.

A major aggro with logic analyser is the probes and ground connections - that's where high-end commercial equipment wins and cheapo grot fails. Make sure you have enough ground connections and that the (analogue) signal integrity is preserved.

There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline DajgoroTopic starter

  • Frequent Contributor
  • **
  • Posts: 322
  • Country: hr
    • hackaday.io
Re: Setting up an fpga board
« Reply #14 on: March 11, 2015, 11:18:13 pm »
It is a free topic assignment. I have to do something, and I want do do a small usb logic analyzer, because I know I can do it.

If the assignment's objective is to design a PCB and circuit with an FPGA, then making your own is a good idea.

If the assignment's objective is to design a logic analyser with an FPGA, then making your own PCB is a bad idea - use a module and add your value to that.


A major aggro with logic analyser is the probes and ground connections - that's where high-end commercial equipment wins and cheapo grot fails. Make sure you have enough ground connections and that the (analogue) signal integrity is preserved.
I know the story abotu signal integrity, and actually I am not aiming for any high speed stuff.
I want two things out of this project:
1. Learn how to set up an fpga for future projects.
2. Do a flexible board that will serve as an simple logic analyzer, but can be expanded for other uses in the future
3. Pass the class

As an advice from another eevblog user, I looked into Lattice x02 devices, those seem to fit the bill also.
For that seems that I need a ft2232 also.

This looks straightforward:
http://www.ccse.kfupm.edu.sa/~ahmadsm/coe203-082/S3BOARD-rm.pdf

X02 board:
http://www.latticesemi.com/~/media/Documents/UserManuals/MQ/MachXO2BreakoutBoardEvaluationKitUsersGuide.pdf?document_id=43937

Somehow I don't trust that ftdi chip to work on the first try.


Anyone handled the x02 before that can share some feedback?
« Last Edit: March 11, 2015, 11:32:28 pm by Dajgoro »
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
Re: Setting up an fpga board
« Reply #15 on: March 12, 2015, 12:11:03 am »
Anyone handled the x02 before that can share some feedback?
I like the XO2, because :
Single supply - onboard core voltage regulator  (HC versions)
Onboard flash (can still download to SRAM for quicker debugging), so no need or external config device
Internal oscillator (not very accurate though)
Lattice Diamond software is rather less colossal that Xilinx ISE
They do nice cheap, simple eval boards like the one you linked above
For doing your own board, easy to use on 2 layer PCB
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19492
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Setting up an fpga board
« Reply #16 on: March 12, 2015, 12:55:30 am »
I know the story abotu signal integrity, and actually I am not aiming for any high speed stuff.

Of course I'm sure you realise you don't get to choose that high speed aspect; it is chosen for you by the rise time (not bitrate) of whatever you are probing.
« Last Edit: March 12, 2015, 09:30:32 am by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline DajgoroTopic starter

  • Frequent Contributor
  • **
  • Posts: 322
  • Country: hr
    • hackaday.io
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13745
  • Country: gb
    • Mike's Electric Stuff
Re: Setting up an fpga board
« Reply #18 on: March 12, 2015, 09:08:38 am »
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Setting up an fpga board
« Reply #19 on: March 12, 2015, 04:53:12 pm »
It is a free topic assignment. I have to do something, and I want do do a small usb logic analyzer, because I know I can do it. One option was to use a XC9572XL, which I know how to set up and program, or I could just put a small fpga so that I can have proper functionality and expand it at some later time.

You should use an FPGA because those devices have decent-sized block RAMs. CPLDs don't have them, so you have no way of storing samples, which is important if you are interested in implementing any sort of triggering.

 

Offline DajgoroTopic starter

  • Frequent Contributor
  • **
  • Posts: 322
  • Country: hr
    • hackaday.io
Re: Setting up an fpga board
« Reply #20 on: March 17, 2015, 08:04:42 am »
I decided to go for the X02. I will get that cheap devboard as well.
Shipping from mouser would cost me ~150$, so I asked a friend to give me his.
 

Offline DrRich

  • Newbie
  • Posts: 7
  • Country: gb
Re: Setting up an fpga board
« Reply #21 on: March 18, 2015, 08:13:08 pm »
I have used the Lattice XP2 for quite a few projects in the past, the XP2-17 being the largest flash based device I have found which is still PQFP. Quite nice devices, but they do need a separate 1.2V core supply. There is a reference design supplied by lattice for using a FTDI chip for communications and programming of the FPGA.

The Spartan 6 LX9 is also a rather nice IC, and is also available in non-BGA packages.

I have not used any XO2 parts yet, going to check them out now!  :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf