Author Topic: Use of FPGAs to teach Digital Circuits I  (Read 11749 times)

0 Members and 1 Guest are viewing this topic.

Offline scrlk_Topic starter

  • Newbie
  • Posts: 5
  • Country: pe
Use of FPGAs to teach Digital Circuits I
« on: March 17, 2015, 01:56:11 am »
Hi, I've been interested in electronics since I was 12 and after some bad vocational choices I enrolled myself in EE at a local university. I am in second semester now and one of my courses for this semester is called Digital Circuits I.
Today was the first lesson and the professor introduced himself and the course to the class. One of the things he said were that he wont teach the course using 30 years old chips and that we need to keep updated. Then he present us and Altera FPGA experimenter's board (I didn't look carefully the model) EDIT:After some seaching I found out that the dev board is an Altera® DE2-115. He said that we are going to use it throughout the course. Instantly, I had mixed feelings about that; on one side, I was excited and curious, but on the other, I was pretty sad and disappointed :-\. Before the class, I was eager to learn using all the common and popular ics (ttl, cmos logic.) But it seems we are only to program the board and replace lots of experimentation and prototyping that the old ics give. I dont know it yet but I think we are just going to use a board as a "tangible simulator" (if you can understand me). I really dont think were are going to study deep on FPGAs in these course.
I felt the same way about oscilloscopes; the lab at my school has only digital ones and on Introduction to Electronics we were only instructed to use digital ones not analogues. :-\ (but of course I asked for and crt one to experiment several times on free hours. :-+)
I had read a lot about many subjects regarding electronics, I had make some 555 timer circuits, power supplies (lm317 /lm338), really basic glue logic, and some microcontroller projects. I had watched lots of videos and tutorials too, lots of theory, but I feel I need some practice and experience.

So I want some words of experience and wisdom about this situation, what do you think about using and Altera FPGA board on a basic digital circuits course?

Thanks for your attention and replies.

« Last Edit: March 19, 2015, 04:04:34 am by scrlk_ »
 

Offline eaj0010

  • Newbie
  • Posts: 4
Re: Use of FPGAs to teach Digital Circuits I
« Reply #1 on: March 17, 2015, 02:28:25 am »
Howdy,

I think using an Altera FPGA evalulation board (I'm betting it's the MAX 10 part) is an excellent idea to learn FPGAs, and digital logic in general. I have been in the field for about 10 years designing boards / FPGAs with Altera and Xilinx FPGAs and they are fun to work with.

FPGAs such as the one you are going to use, can interface with several different IO technologies such as those you mentioned (Typically LVTTL/LVCMOS for single ended IO, and LVDS / CML / PECL for differential).

While I can empathize with you wanting to learn the basics at the chip level, FPGAs do in fact build circuits within the part (you code, but the resultant code is a physical circuit...not software running on a platform) and you are free to create timers, multiplexors, basic glue logic, etc. to your hearts content. Within the chip are blocks called slices that have combinations of muxes, D-type flip flops, and LUTs that all get connected together based on how you design the chip. Once you program it, the fuse circuitry literally builds the design and it runs as if it was a standalone part. FPGAs are also volatile too, thus if you don't have a way to program a flash that programs the part on startup (I'm betting that board does), your program will be lost and you'll have to re-program it again if you cut the power.

I code using VHDL (I think the industry primarily uses Verilog / System Verilog) as I work in defense, and the language is a very "hard" language to learn. I mean that in the sense it is not very forgiving with syntactical errors.

As for using a FPGA eval board to learn that stuff, I think it is a great start. I didn't have the opportunity to do FPGA design work when I was in college, and I wish I did.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Use of FPGAs to teach Digital Circuits I
« Reply #2 on: March 17, 2015, 04:56:20 am »
great idea. noi need to muck about spending hours wirewrapping or breadboarding with loose TTL parts.

the altera software still lets you draw schematics.
so my 2 cents says you will see base functionality using schematics , gates, registers, counters, shifters, adders , and more complex stuff.
you can construct it , simulate it and actually run it on the fpga.

once more complex systems are in order you will switch to a synthesis language.

i think it is excellent. the point is to learn digital logic , not troubleshoot bad contacts in a strip board or waste 3 hours out of 4 wirewrapping a circuit.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #3 on: March 17, 2015, 05:07:17 am »
once more complex systems are in order you will switch to a synthesis language.
While that is true, you can create an schematic symbol out of that module and use it in the top schematic.
So you are only limited to digital circuits and the number of LEs in the FPGA.
 

Offline scrlk_Topic starter

  • Newbie
  • Posts: 5
  • Country: pe
Re: Use of FPGAs to teach Digital Circuits I
« Reply #4 on: March 17, 2015, 05:12:02 am »
Thanks for the feedback guys, I understand each of your points. After some seaching I found out that the dev board is an Altera® DE2-115. I am getting more excited the more I read the manual!
 

Offline JoeN

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
Re: Use of FPGAs to teach Digital Circuits I
« Reply #5 on: March 17, 2015, 07:52:33 am »
That is a pretty powerful board.  Way more powerful than the MAX10 that Terasic has available now.   Are you all buying one or are there a few to use in the lab? 

If you want to do logic experimentation using 74HCT or 74LS ICs, by all means, get yourself a few and experiment.  Or even a few old GALs and a very cheap programmer off of eBay.  But really that isn't the way things are done anymore.  You just don't see boards with scads of discrete chips on them.  Usually, if there are a multitude of small chips it is going to be drivers or opamps, not a bunch of logic.  But you will see a few here and there when it is necessary
Have You Been Triggered Today?
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19509
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Use of FPGAs to teach Digital Circuits I
« Reply #6 on: March 17, 2015, 08:28:05 am »
There is nothing stopping you experimenting with topics outside your course.

In fact if you do that it will look extremely good on your CV - employers will realise that you havinitiative, love the subject and do more than is necessary. They will then correctly infer that you will do more for them than is necessary. You have just jumped 90% of the queue :)
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 scrlk_Topic starter

  • Newbie
  • Posts: 5
  • Country: pe
Re: Use of FPGAs to teach Digital Circuits I
« Reply #7 on: March 17, 2015, 04:17:14 pm »
That is a pretty powerful board.  Way more powerful than the MAX10 that Terasic has available now.   Are you all buying one or are there a few to use in the lab? 

No, the lab have them. A group of two or three students per board.


If you want to do logic experimentation using 74HCT or 74LS ICs, by all means, get yourself a few and experiment.  Or even a few old GALs and a very cheap programmer off of eBay.  But really that isn't the way things are done anymore.  You just don't see boards with scads of discrete chips on them.  Usually, if there are a multitude of small chips it is going to be drivers or opamps, not a bunch of logic.  But you will see a few here and there when it is necessary

I will buy myself some or ask in the lab at free hours. I want to be able to use them and know when they are the best choice or necessary. I dont want to choose the overkill option. I will make myself time for this.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #8 on: March 17, 2015, 05:58:07 pm »
No, the lab have them. A group of two or three students per board.

If you want something to play with at home you can get yourself a DE0-Nano for $61 academic price from terasic, they do have other nice DE boards with academic price for around $100 and $150.

If you want one cheap for learning but without many examples you could get an Arrow BeMicro CV for $50 with 25000 LE and a cyclone V,  or the even cheaper BeMicro MAX 10 for $30 but only 8000 LEs. Of course they don't have all the peripherals but you can add them in a breadboard.

More info about the BeMicro CV in this thread that someone was looking for a nano or an alternative:
 
https://www.eevblog.com/forum/buysellwanted/wtb-(uk)-de0-nano-development/msg628796/#msg628796

Also a quick tutorial to do some logic gates in verilog and exported as a symbol to use in a schematic top level in  a link on that thread, but I'll add the link in here too:
https://www.eevblog.com/forum/microcontrollers/bemicro-cv-questions/msg524041/#msg524041

Not as nice but cheap and suitable to do things when you don't have access to the board in the lab.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 7949
  • Country: us
  • Retired, now restoring antique test equipment
Re: Use of FPGAs to teach Digital Circuits I
« Reply #9 on: March 17, 2015, 06:01:29 pm »
After learning how digital circuits work using the FPGA boards, you will find that sometimes you need to use actual devices to see how things can go wrong in more extreme applications (ground bounce, fanout issues, interface to other devices, etc.), but that should come after understanding the logic.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8646
  • Country: gb
Re: Use of FPGAs to teach Digital Circuits I
« Reply #10 on: March 17, 2015, 06:23:33 pm »
...I enrolled myself in EE at a local university...

...One of the things he said were that he wont teach the course using 30 years old chips and that we need to keep updated. Then he present us and Altera FPGA experimenter's board (I didn't look carefully the model). He said that we are going to use it throughout the course. Instantly, I had mixed feelings about that; on one side, I was excited and curious, but on the other, I was pretty sad and disappointed :-\. Before the class, I was eager to learn using all the common and popular ics (ttl, cmos logic.)...

...I felt the same way about oscilloscopes; the lab at my school has only digital ones and on Introduction to Electronics we were only instructed to use digital ones not analogues. :-\ (but of course I asked for and crt one to experiment several times on free hours. :-+)...

...I had read a lot about many subjects regarding electronics, I had make some 555 timer circuits, power supplies (lm317 /lm338), really basic glue logic, and some microcontroller projects. I had watched lots of videos and tutorials too, lots of theory, but I feel I need some practice and experience....
Are you sure you wanted to sign up for EE, and not a history course?
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: Use of FPGAs to teach Digital Circuits I
« Reply #11 on: March 17, 2015, 07:15:17 pm »
Using an FPGA for teaching digital design? OK will make the practical parts easier, but will you learn about K-maps? How about logic optimisation? State machine reduction? or good old fashioned race conditions.

FPGAs are very nice if your system has lots of power free, but try designing one when all you have is 0.5mA from your supply. Also, if you ever have to design a state machine from discrete logic where you are not allowed to use anything programmable you could have a lot of problems. You might easily have the latter conditions in safety critical circuits
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #12 on: March 17, 2015, 07:30:12 pm »
Using an FPGA for teaching digital design? OK will make the practical parts easier, but will you learn about K-maps? How about logic optimisation? State machine reduction? or good old fashioned race conditions.

Why not? If the course is done properly i.e. you are doing everything "by hand" the only difference is that instead of using physical chips as building blocks you're connecting symbols on a computer screen.

Exactly. We used 7400 series logic. I really wished it had been on FPGAs instead. It's good to be familiar with old school stuff, but it's not a modern job skill unless you end supporting legacy hardware.

And after some of Chris Gammel's tweets from the ECE convention, I have to applaud any prof who exposes their student to a modern job skill to learn classical logic. Well done.
« Last Edit: March 17, 2015, 07:32:24 pm by LabSpokane »
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Use of FPGAs to teach Digital Circuits I
« Reply #13 on: March 17, 2015, 07:43:53 pm »
Exactly. We used 7400 series logic. I really wished it had been on FPGAs instead. It's good to be familiar with old school stuff, but it's not a modern job skill unless you end supporting legacy hardware.
Sometimes this is all you need, for example if you develop a microcontroller circuit and need just some simple fast external logic, then it is cheaper to use 1 or 2 of these old 74xx chips than a CPLD or even FPGA.

I would suggest that scrlk buys at least some old DIP chips, like a 74LS14 to build an RC oscillator with it (and learn why R and C has to be within some limits), or a 4051 analog multiplexer to build an auto range voltage meter in combination with a microcontroller, or even some basic chips like a 7400 or a flip-flop like a 74LS74, or a classic 4017 decade counter (combine this to build a high frequency counter). They are all available in DIP and cheap at Digikey. Then buy a breadboard and have some fun.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline sacherjj

  • Frequent Contributor
  • **
  • Posts: 993
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #14 on: March 17, 2015, 07:49:05 pm »
I remember my 7400 logic project with 68HC11.  It was a wonderful elevator controller.  It worked awesome 8 hours before we turned it in.  7 hours before we turned it in, a cutoff resistor lead shorted 12V to 5V bus and blew all of the soldered in 7400 chips.  Oh, I wish I could have uploaded that to a different FPGA. 
 

Offline JoeN

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
Re: Use of FPGAs to teach Digital Circuits I
« Reply #15 on: March 17, 2015, 07:52:26 pm »
I will buy myself some or ask in the lab at free hours. I want to be able to use them and know when they are the best choice or necessary. I dont want to choose the overkill option. I will make myself time for this.

I am not a professional circuit designer but from what I see, small logic chips are used sparingly and when they are, you almost always see very simple ICs like flip-flops and simple logic gates on boards.  A lot of these chips are still produced and are very, very inexpensive in small quantities.  For example:

http://www.newark.com/on-semiconductor/mc74hc595adtr2g/8-bit-sipo-siso-shift-register/dp/42K0910
http://www.newark.com/texas-instruments/sn74lvc1g175dckr/d-type-flip-flop-signal-3-2ns/dp/10J9653
http://www.newark.com/nxp/74hc374d-652/d-type-flip-flop-octal-14ns-soic20/dp/71R2395
http://www.newark.com/fairchild-semiconductor/nc7sz58p6x/universal-configurable-logic-gate/dp/58K1987

Obviously these are harder to prototype with than old 74HC or 74LS chips in a DIP package, but you might actually see these on a current design.
« Last Edit: March 17, 2015, 07:54:25 pm by JoeN »
Have You Been Triggered Today?
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #16 on: March 17, 2015, 08:05:50 pm »
Exactly. We used 7400 series logic. I really wished it had been on FPGAs instead. It's good to be familiar with old school stuff, but it's not a modern job skill unless you end supporting legacy hardware.
Sometimes this is all you need, for example if you develop a microcontroller circuit and need just some simple fast external logic, then it is cheaper to use 1 or 2 of these old 74xx chips than a CPLD or even FPGA.

One or two, of course, agreed. But not an entire FSM like we had to do in the old days.  I'm just happy that this student won't be wasting precious class and lab time on the digital equivalent of relay logic.  Those days are over and done with.
 

Offline JoeN

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: us
  • We Buy Trannies By The Truckload
Re: Use of FPGAs to teach Digital Circuits I
« Reply #17 on: March 17, 2015, 08:08:05 pm »
If you want something to play with at home you can get yourself a DE0-Nano for $61 academic price from terasic, they do have other nice DE boards with academic price for around $100 and $150.
Or this:  http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=167&No=836&PartNo=2

85K LE, 174 multipliers, 6 PLLs, dual ARM 9 hard processor on the FPGA, lots of goodies on the board too.  $175 academic.   Probably a better value than the DE2-115 at $309.
Have You Been Triggered Today?
 

Online Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3338
  • Country: ca
  • Place text here.
Re: Use of FPGAs to teach Digital Circuits I
« Reply #18 on: March 17, 2015, 08:28:06 pm »
I will buy myself some or ask in the lab at free hours. I want to be able to use them and know when they are the best choice or necessary. I dont want to choose the overkill option. I will make myself time for this.

I am not a professional circuit designer but from what I see, small logic chips are used sparingly and when they are, you almost always see very simple ICs like flip-flops and simple logic gates on boards.  A lot of these chips are still produced and are very, very inexpensive in small quantities.  For example:

http://www.newark.com/on-semiconductor/mc74hc595adtr2g/8-bit-sipo-siso-shift-register/dp/42K0910
http://www.newark.com/texas-instruments/sn74lvc1g175dckr/d-type-flip-flop-signal-3-2ns/dp/10J9653
http://www.newark.com/nxp/74hc374d-652/d-type-flip-flop-octal-14ns-soic20/dp/71R2395
http://www.newark.com/fairchild-semiconductor/nc7sz58p6x/universal-configurable-logic-gate/dp/58K1987

Obviously these are harder to prototype with than old 74HC or 74LS chips in a DIP package, but you might actually see these on a current design.

Or very high-speed logic running at frequencies in the upper single-digit GHz.

Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #19 on: March 17, 2015, 10:09:16 pm »
If you want something to play with at home you can get yourself a DE0-Nano for $61 academic price from terasic, they do have other nice DE boards with academic price for around $100 and $150.
Or this:  http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=167&No=836&PartNo=2

85K LE, 174 multipliers, 6 PLLs, dual ARM 9 hard processor on the FPGA, lots of goodies on the board too.  $175 academic.   Probably a better value than the DE2-115 at $309.

I want one of those even if the price seems to have increased from last time I checked, I kind of recall two new SoC boards and one being around $100 academic price and $200 list.

But to start, the System on a chip interaction might be too distracting, but as long as he can ignore the SoC part of it until needed that will be a great board.

But I think a board with just the FPGA is more beneficial at least to begin with, but that's a great board for more advanced concepts
 

Offline Dongulus

  • Regular Contributor
  • *
  • Posts: 232
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #20 on: March 17, 2015, 10:17:09 pm »
My first reaction was  :rant:, but then I remembered frequently spending up to 6 hours in lab troubleshooting breadboarded circuits with 14 pin DIP packages and a mess of wires. Learning digital design using discrete 7400 series logic ICs can be a tedious exercise and is now mostly irrelevant. Using FPGAs should be a much more pleasant and rewarding experience for you.

The issue I have is that I think you will miss out on some finer details about how real gates work. For example, it will be hard to teach the analog characteristics of transistor constructed gates and how they may impact a design. You won't get the benefit of probing the digital waveforms as they propagate through the circuit using an oscilloscope because your circuit is totally confined within the FPGA (also FPGAs don't actually build circuits using logic gates).
 

Offline LaserSteve

  • Super Contributor
  • ***
  • Posts: 1285
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #21 on: March 18, 2015, 12:00:52 am »
I'm a university technician with many years of professional work before returning to work here.

One, solderless breadboards should be banned from all labs. 
Two, nothing teaches about logic pitfalls like a discrete chip and a fast scope.
Three, how are you going to get a FPGA to simulate a race condition or ringing?
Four:  There is something to be said about doing discrete transistor projects to make your own gate, which is a first lesson around here. You then get to overclock it and watch it fall apart.

To the OP, To do it the ANCIENT way I did it, Get a copy of Bugbooks I and II here:  http://www.bbookhistory.com/  Buy some discrete chips and enjoy. You wont get traditional TTL easily, so substitute HC or AC or HCT parts, or similar.

Tack Solder the connections and the grimace that occurs with traditional labs goes away.

But also relish the FPGA time. You need BOTH sets of skills in this modern world.


I'll also disagree with the practice of  using exclusively low end digital scopes. The the ones used in undergraduate labs are usually Tek or Keysight 1200-2000$ models sold on educational discounts. Most of them memory depth limitations. Believe it or not the DS1102E on my bench has much better memory depth then the equivalent DPO most universities buy for this task.

I know of what I speak. Before I returned to university service I was a FSE that traveled from university lab to university lab world wide. In the course of my duties I had to borrow a scope at each location. I got to use nearly everything out there.

Steve
« Last Edit: March 18, 2015, 12:34:54 am by LaserSteve »
"What the devil kind of Engineer are thou, that canst not slay a hedgehog with your naked arse?"
 

Offline scrlk_Topic starter

  • Newbie
  • Posts: 5
  • Country: pe
Re: Use of FPGAs to teach Digital Circuits I
« Reply #22 on: March 18, 2015, 04:29:16 am »
Thanks for the suggestions. It's very interesting (and important) to know the advantages and disadvantages(things/skills/experiences I be missing) of using such board for this course.

Thanks for all the ideas for a board for home, I've checked every link. I like reading so thanks for the books links too.

 
 

Offline LabSpokane

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #23 on: March 18, 2015, 04:40:57 am »
It is a great sign that you questioned skipping over discrete logic. That alone puts you up a notch in my book. Have fun and do us proud!
 

Offline LaurentR

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: us
Re: Use of FPGAs to teach Digital Circuits I
« Reply #24 on: March 18, 2015, 05:12:21 am »
Digital circuits span a whole gamut from discrete logic on a board to 100M gate ASICs. The general principles are the same but everything else changes as you go up in integration and complexity (description, optimization, verification, best practices...).

This forum is pretty heavily skewed toward board-level / discrete logic discussions, but digital logic is also used in much more complex circuits, FPGAs or ASICs.

I think FPGAs are a pretty happy medium for learning. They give you the best turnaround time and fairly good debuggability while allowing to build things as simple or as complex as you wish. They are also used extensively in the industry, from the lowly CPLDs (not exactly FPGAs but close) to do a simple function to $5000 FPGAs in CISCO routers. So they are very relevant by themselves while also giving a good idea of what lies below (discrete logic) and above (ASICs).

I have taught basic digital logic classes where the hands-on portion was using FPGAs and students could choose what they wanted to build. I regularly had students building basic microprocessors, a frame buffer to drive a VGA display, writing their own assembler and programming their hardware to run some basic game. You can only get to that level of complexity in the course of a trimester using FPGAs. At the same time, you cannot make something that complex work without very clearly understanding the principles of digital logic.

So I think FPGAs are a good choice. That doesn't mean that you shouldn't also play with discrete logic some...
« Last Edit: March 18, 2015, 05:16:55 am by LaurentR »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf