Author Topic: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E  (Read 4251 times)

0 Members and 1 Guest are viewing this topic.

Offline fagoumaTopic starter

  • Contributor
  • Posts: 18
  • Country: gr
Hello to the community.

This semester at uni, i'll have a "Digital Circuits Lab" course where they use and implement exercises in Verilog and on the Babys 2 Spartan 3E board. I want a clean grade of 10 if possible in this course so practise at home is a must. We are allowed in the lab with the boards only once per week which is not enough for me.

So i thought to buy a cheap  FPGA for use at home and implementation of the exercises before going there and apply them to the Babys 2 board, which i cannot afford. I looked for cheap boards that belong to the Xilinx family and one that i found is the Elbert V2 Spartan 3A board. Doesn't have all the goodies the Babys 2 has but it's cheap. So here is my question.

Will i be able to implement a big part of the exercises on the Elbert V2 board?
 For example, i looked at last year's exercises. The first one uses the PS/2 port on the Babys 2 when the Elbert V2 doesn't have one. Can the TCK, TDI, TDO pins of the JTAG connector be used to connect a keyboard or this connector is only for programming the chip?  Another example is the use of the 4 7-segment displays on the Babys 2. The Elbert V2 has only 3 but i can implement my exercise with the 3 and when i m in the lab i''ll change some of the code to include the 4th 7-segment of the Babys.

So my real problem is if the Elbert has at least the pins to make the connections, such as a keyboard , even though it doesn't have the ports onboard like the Babys.
My end goal is to be ready when i will hand the exercises and not trying to fix my errors that time on the lab , just because i didn't have a board at my house trying the code i write.

Should i proceed buying an Elbert board? Do you have any other suggestions - advices? (Sorry for the long post.)
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 5138
  • Country: nz
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #1 on: September 06, 2017, 08:36:52 am »
Looks like a very nice board for the price!

There are plenty of user-defined pins available to connect to your own PS2 connector, but you'll need to implement your own controller in the FPGA instead of presumably using a standard one with the Basys 2.

Ten seconds of googling found several open source "PS2 keyboard for FPGA" implementations, including this one http://www.instructables.com/id/PS2-Keyboard-for-FPGA/
 

Offline fagoumaTopic starter

  • Contributor
  • Posts: 18
  • Country: gr
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #2 on: September 06, 2017, 09:27:39 am »
Thank you for you answer!

 I've seen this video but the guy is using a Babys 2 boards, too, which has the PS/2 port on board. I guess i will do a more in depth search, learn more things about FPGAs and then decide.
 

Z80

  • Guest
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #3 on: September 06, 2017, 09:39:11 am »
Digilent publish all the details of their Basys board so you can easily implement any of the peripherals yourself on any other FPGA.

https://reference.digilentinc.com/reference/programmable-logic/basys-2/reference-manual
 

Offline fagoumaTopic starter

  • Contributor
  • Posts: 18
  • Country: gr
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #4 on: September 06, 2017, 09:51:34 am »
Digilent publish all the details of their Basys board so you can easily implement any of the peripherals yourself on any other FPGA.

https://reference.digilentinc.com/reference/programmable-logic/basys-2/reference-manual

Thank you for your answer @Z80.

I found that manual on the course's website, too. But as i am still a complete noob on FPGAs i can't understand all of the information and end up in your advice. I guess i am afraid of buying sth and then not using it properly or instead of helping me, to give me a hard time.

So your opinion is to buy the cheap Elbert V2 board and i will find my way to implement everything i want?
 

Z80

  • Guest
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #5 on: September 06, 2017, 11:29:14 am »
The Elbert V2 board looks like a really good buy for learning FPGAs, it actually has slightly better specs than the Digilent.  The PS2 port on the Basys board is driven directly by the IO pins, all the hardware is implemented in the FPGA.  You can make your own with a PS2 socket and a couple of resistors which you can then plug into one of the expansion connectors on the Elbert.  The Digilent manual is actually really good as it not only shows you the hardware connections but also explains how the port works (it's a simple clocked serial port) with all the packet structure and timings.  If you are doing a course on this then everything you need to know should be explained to you.  Your projects will be quite easy to implement on either board as they are so simple and have no high speed stuff to worry about (it's actually a good exercise that will make you learn the tools and the FPGA better), but you will need to deal with these points:

You will be using the same tool (ISE Webpack) but you will need to create a separate project for each board (it's not hard once you have done it a couple of times).
You will need to make sure you assign your IO to the correct pins using the constraints file (you should be taught this in your class).
The 2 boards use a different clock speed.  The Basys has a default of 50MHz, the Elbert seems to use 12MHz (probably from the USB).  You will need to take this into account when moving your design between boards to keep your timing correct.  This is a slight problem because 12 isn't a simple division of 50 so you will need to get creative or read up on the built in clock manager IP module for the Spartan (another good exercise). ;D
 
The following users thanked this post: fagouma

Offline fagoumaTopic starter

  • Contributor
  • Posts: 18
  • Country: gr
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #6 on: September 06, 2017, 12:12:48 pm »
Thanks again for your answer @Z80.

Lectures start in about 2 weeks but i was thinking to buy the board earlier and be prepared for some things, as i will have another 2 demanding courses and extracurricular activities to do.

I will take your words into consideration and make my decision.

Edit: I am open to any other suggestions or advices.
 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #7 on: September 06, 2017, 01:16:53 pm »
While the lab board and its FPGA are a bit dated, I'd go with something as similar as possible, that way you can get comfortable with the whole environment. The Elbert board has a similar FPGA but of half the size. I'd be weary of diversity if you are starting with FPGAs, the whole "subject": board, programming, writing HDL and the development environment can take a pretty while to grasp. Most important imho is to get simulation right: ghdl or icarus verilog (or both) and gtkwave are your friends, ModelSim too, learn to use them, they will save your a.. more than once  :-+
 
The following users thanked this post: fagouma

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9987
  • Country: us
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #8 on: September 06, 2017, 01:43:20 pm »
I see two issues and both can be easily resolved:

First, the connector and IO device pinout will require separate .UCF files.  Fine, create a master file for each board and comment out the pins that aren't used in a particular experiment.  Select the lines with the mouse, right click and select the option to comment/uncomment.  You will also need to come up with a way to make the physical connections.  Check the two schematics for things like series resistors.  The Basys2 has 200 Ohm series resistors on each pin.  This helps protect the board from short circuits and helps reduce reflections.

Second, the need to multiply that 12 MHz clock by 4.166... to get it up to 50 MHz.  Just multiply by 25 and divide by 6 using a DCM (Digital Clock Manager):

https://www.xilinx.com/support/documentation/application_notes/xapp462.pdf

I must have missed the part where ISE has a Wizard for setting up the DCM.  See around page 17.  You will use the CLKFX output.  I always did it the hard way...

You may find that your labs don't actually require 50 MHz and the code actually divides the clock down to values appropriate for things like baud rate.   In this case, a simple change in the code for the divisor and it may work just fine.

In any event, once you have the DCM working, you can just plug it in to any project that comes along.

This is definitely workable!

There is one 'gotcha' and that is that the Basys2 uses an XC3S250 while the Elbert uses an XC3S50 which is a MUCH smaller chip:

https://www.xilinx.com/support/documentation/data_sheets/ds557.pdf

versus

https://www.xilinx.com/support/documentation/data_sheets/ds312.pdf

The Basys2 has about five times the logic and 4 times the BlockRAM and this is one of the differences in price.

Over at the Elbert web site, they provide a .UCF file...
« Last Edit: September 06, 2017, 01:44:59 pm by rstofer »
 
The following users thanked this post: fagouma

Offline rheb1026

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #9 on: September 06, 2017, 02:47:24 pm »
I just wanted to point out that Digilent often gives significant discounts to students, in case you didn't know. You may want to ask and see what they offer. When I bought a Digilent board for an FPGA class I think the discount was around 50% off, but that was a few years ago so I can't say with 100% certainty
 

Offline fagoumaTopic starter

  • Contributor
  • Posts: 18
  • Country: gr
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #10 on: September 06, 2017, 02:54:36 pm »
Thank you for your answers and your advices guys!

As it seems, you are already helping me in the issues i will meet. It's like, having the board already.

So, i will give it some more thought  but the Elbert is the closest board to Babys2, in my price range, that i can have. The main fact is that it's cheap and Numato Lab has a reseller in Bulgaria which is next to Greece, where i am located. I will ask about the discount at Digilent @rheb1026. Thanks for pointing that out.

I have experience in electronics and Arduino projects but FPGAs are different. I just hope, you won't get bored by my questions when i will start writing my code in the future.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9987
  • Country: us
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #11 on: September 06, 2017, 06:05:44 pm »
Digilent has an office in Romania if that is a help.

I don't know what your 'ultimate' project will be for your class.  If it is something like the LC3 RISC Processor (widely used in universities), it MIGHT fit the Elbert board and will definitely fit the Basys 2.  Unfortunately, neither chip has enough BlockRAM to instantiate 64Kx16 but the Basys 2 board comes a lot closer.

Although the Elbert board is economical (VERY economical), I think I would try every means available to use the same board the university is using.  There are enough issues getting FPGA projects to run without having to work through compatibility issues.  Yes, I know, I wasn't all that well off during my college years either.

 

Offline fagoumaTopic starter

  • Contributor
  • Posts: 18
  • Country: gr
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #12 on: September 06, 2017, 08:22:34 pm »
Digilent has an office in Romania if that is a help.
I just wanted to point out that Digilent often gives significant discounts to students, in case you didn't know. You may want to ask and see what they offer. When I bought a Digilent board for an FPGA class I think the discount was around 50% off, but that was a few years ago so I can't say with 100% certainty

I looked at the academic discounts and the distributers of Diligent. I just can't pay 100 or more euros/dollars for a board right now.
I am aware of the compability issues. I don't want to write the code  and expect to work the same only by changing the respective pins of each board.
But i want to learn and if possible take that grade 10.

Electronics is a thing i really like and being in a Computer Science department, FPGAs and their circuits are some of the closest things in what i like. I want to follow that sometime. Or at least to get more experience on the subject after i finish my course.

That's the thought behind the purchase of a board and have it at my home.
« Last Edit: September 06, 2017, 08:24:56 pm by fagouma »
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2829
  • Country: nz
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #13 on: September 06, 2017, 09:46:32 pm »
If $ is the limiting constraint...

1. Install ISE webpack

2. Learn to write a test bench, and work on a really good test bench

3. Spend a lot of time at home using the simulator to see how your designs behave

4. Walk into class. run the projects on the hardware, have them work first time, Score a 10, Be a hero, get the girl (or boy)....  ;D

I'm not that good with Test Benches myself, but have a look at http://hamsterworks.info/index.php/Hw_button_debounce for a button debouncer + test bench example.
« Last Edit: September 06, 2017, 09:54:32 pm by hamster_nz »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 
The following users thanked this post: Someone

Offline fagoumaTopic starter

  • Contributor
  • Posts: 18
  • Country: gr
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #14 on: September 07, 2017, 06:42:43 am »
If $ is the limiting constraint...

1. Install ISE webpack

2. Learn to write a test bench, and work on a really good test bench

3. Spend a lot of time at home using the simulator to see how your designs behave

4. Walk into class. run the projects on the hardware, have them work first time, Score a 10, Be a hero, get the girl (or boy)....  ;D

I'm not that good with Test Benches myself, but have a look at http://hamsterworks.info/index.php/Hw_button_debounce for a button debouncer + test bench example.

Thank you for your answer @hamster_nz.

The money is the limiting factor to buy a Babys 2 board which costs 100 and sth dollars. But i can manage to buy an Elbert V2 board  which will cost me around 40 euros. That method you described is the only way to work if you don't have a board at home, or any board. I read last year's course description and it's also the way they advise you to work.
 

Offline AlexanderNielsen

  • Newbie
  • Posts: 1
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #15 on: September 07, 2017, 05:03:42 pm »
Numato had a student/academy discount on around 20-30% once.
Its worth a try writing to them to see if they still have it.
 

Offline fagoumaTopic starter

  • Contributor
  • Posts: 18
  • Country: gr
Re: Cheap first FPGA for home use instead of using lab's Basys 2 Spartan 3E
« Reply #16 on: September 07, 2017, 05:25:41 pm »
Numato had a student/academy discount on around 20-30% once.
Its worth a try writing to them to see if they still have it.

Thank you for your answer @AlexanderNielsen .

I will look into it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf