My FPGA Wiki site will be going away. - Page 1
Forum section: electronics / general

author: hamster_nz
author_rank: Super Contributor
timestamp: June 09, 2017, 05:44:01 am
content: Somewhat inspired by a recent post here about the value of Internet content, my rambling FPGA wiki (http://hamsterworks.co.nz) is going to soon go away, to hopefully be replaced by something more concise, useful and interesting athttp://hamsterworks.info(don't look - it is embarrassingly empty at the moment!).Along with it the old VHDL/FPGA ebook ("https://static.sparkfun.com/datasheets/Dev/FPGA/IntroToSpartanFPGABook.pdf") is getting retired. I'm thinking of making a new version, targeting current tools and boards.If you are the maker/hobbyist/FPGA dabbler type, does you have any suggestions on how I can rework it to make it more useful to you?- Is the Xilinx/Altera/Lattice thing still a thing? I'm sort of over it...- Are complete project archives in zip files more useful than code snippets in text?- What is the new "starter board"? I like Digilent Basys3 myself, but others could convince me otherwise.- Are seperate Verilog & VHDL editions worth my time? or a mixed edition? or just VHDL?- Is it better to aim low (assuming little relevant experience) or aim high (expect a Digital Logic Guru) with the level of content?- Are project ideas best (e.g. as well as blinking a LED, see what frequency you can see the blink, does colour matter in perception of blink)? Are fully worked solutions best (here is how I blink an LED)?- I tried to introduce the minimal subset of VHDL you need to implement anything, is this a good idea? Should I add the rest of the like functions, packages and so on?- What areas need to be focused on more, and what is now "old school" and can be forgotten about (e.g. schematic entry)?- What sort of projects interest people?- Should there be a more mixed add-on H/W content, vs using only the DevBoard onboard I/O?So many Qns... :-)Any suggestions would be gratefully received and taken on-board, even if I don't take them to heart!

author: mac.6
author_rank: Regular Contributor
timestamp: June 09, 2017, 07:42:47 am
content: I am a forever "I need to start really learning FPGA" type of guy. But now I work more and more on project that use fpga but on the software side (early sw dev on future socs that run on fpga), so it will be a nice addition to really be able to dig into them and not only know how to read a little bit of RTL code to known what can happens.So here are my 2cts- Is the Xilinx/Altera/Lattice thing still a thing? I'm sort of over it...I tend to prefer Xilinx because it's what is used at work and I got really nice boards with millions of lut on them. On the other side there is IceStorm toolchain which is completely opensource (but limited to ICE40)- Are complete project archives in zip files more useful than code snippets in text?Yes, definitely, especially if full projects are included as it help the beginner to quickly runs things first, then modify- What is the new "starter board"? I like Digilent Basys3 myself, but others could convince me otherwise.Digilent board are nice and easily available in US and EU, the Arty is quite nice, cheap and is well supported and use latest vivado tools- Are seperate Verilog & VHDL editions worth my time? or a mixed edition? or just VHDL?Definitely mixed as the industry is, and even more you can even intro to new HDL like Chisel or SpinalHDL- Is it better to aim low (assuming little relevant experience) or aim high (expect a Digital Logic Guru) with the level of content?Low, but with more emphasis on process than on tools. We don't need more beginner "load project and click here" tutorials but more on testbench, validation, simulation, debug...- Are project ideas best (e.g. as well as blinking a LED, see what frequency you can see the blink, does colour matter in perception of blink)? Are fully worked solutions best (here is how I blink an LED)?Maybe try to do something in steps, like SPI interface between FPGA and some microcontroller board, then you can add some registers and features (pwm) that in the end blink a led- I tried to introduce the minimal subset of VHDL you need to implement anything, is this a good idea? Should I add the rest of the like functions, packages and so on?- What areas need to be focused on more, and what is now "old school" and can be forgotten about (e.g. schematic entry)?- What sort of projects interest people?- Should there be a more mixed add-on H/W content, vs using only the DevBoard onboard I/O?I will just add some project with uC like arduino/stm32 interfaced to the fpga, or some pmod with I/O like sensor or motor drivers. Don't fall in the softcore trap, it's interesting but you need a good load of work on the SW side to have something usable

author: westfw
author_rank: Super Contributor
timestamp: June 09, 2017, 08:55:25 am
content: QuoteI'm starting to really appreciate that I can browse source code posted on github (and etc) without having to download and unzip it first...(Not only that, but you can then post links to particular lines of code if you have questions, and etc.)

author: kony
author_rank: Regular Contributor
timestamp: June 09, 2017, 09:18:02 am
content: Quote from: hamster_nz on June 09, 2017, 05:44:01 amThere are plenty of introductory books out in the wild, but I'm yet to find single decent one about more advanced topics. Things like timing constraints setup, or getting higspeed serdes interface with auto delay tuning running, moving data around with external DDR memory and so on. One is bound to vendor documentation and forums in such cases, which sometimes contains everything needed to get it running, sometimes not - in both cases guided tutorial with first hand expirience of the author thrown in is appreciated.

author: brucehoult
author_rank: Super Contributor
timestamp: June 09, 2017, 10:09:27 am
content: Oh! I didn't realise you had this! I'm also one of those who would like to get started with FPGAs, but doesn't know how.I'm not a hardware designer, or at least not past the "throwing a few basic TTL/CMOS chips on a breadboard (or veroboard) and interface it to an Arduino" stage. I understand digital logic and computer microarchitecture things such as buses, pipeline stages, latches, muxes, ALUs. I write compilers for a living, and am currently involved (for the first time) with the design and implementation phase of making a major commercial SoC. As we get the compiler to exercise more of the new ISA we're finding bugs in the functional simulator and/or the HDL. I can fix problems in the functional sim, but the HDL is as yet a mystery.On the non-work side, I'd like to experiment with soft CPUs such as small historical ones and current practical ones such as RISC-V.In the circles where I've been reading things, it seems the most popular FPGA boards are the Arty (Artix-7 35T) and Zybo/ZedBoard.I think I'm pretty close to wandering into a store and picking up thishttps://www.macrogroup.ru/catalog/partgroup/3542Is that everything I need? Will it work with Linux PC (preferred as it's a recent i7 6700K) or ancient 2011 i7 MacBook Pro? I don't have Windows. Is USB all you need to program/debug?I'd like to be able to load in something big enough to run linux (so MMU), but at the same time I want to be able to do dead simple blinky lights projects too. Do I need two different boards?

author: matseng
author_rank: Frequent Contributor
timestamp: June 09, 2017, 10:14:55 am
content: Since "schematics entry" is not a thing anymore (was it ever?) I personally would like to see a tutorial for someone decently well versed in digital electronics (I.E can throw together a few dozens of 74-series chips into a working CPU design). How would that person have to change his mindset and methodologies for coding this in HDL instead of wrapping it up in HW.

author: chickenHeadKnob
author_rank: Super Contributor
timestamp: June 09, 2017, 01:40:30 pm
content: I am in the perpetual cycle of starting and stopping my fpga studies. fpga's are hard, there is no two ways about it. I now figure it is like quitting smoking. I've never been a smoker but I watched my father through his attempts: 2 failures and then permanent success. I understand this is typical for smokers, somehow the failed attempts prepare the mind for eventual success. I feel each time I come back to reading fpga tutorials I am learning more.- Is the Xilinx/Altera/Lattice thing still a thing? I'm sort of over it...I don't understand this question, you mean fanboi evangilism for a brand? I don't do that, not interested in that.- Are complete project archives in zip files more useful than code snippets in text?code snippet is fine- What is the new "starter board"? I like Digilent Basys3 myself, but others could convince me otherwise.ice40, ice40, ice40, did I say ice40? Both lattice icestick and that bigger H8K board. I looked at them 2.5 yearsago and passed because the only desirable chip for me was the largest H8K and it only comes in BGA, a showstopper.My ultimate goal is to design in a part into my own board, not just rely on a dev board. I need a QFPThen I looked again after seeing all the recent gain in interest around the icestorm software and noticed the 4K partwas selling for about $6.50 in a QFP144 and had 2 pll's. That caused a change of opinion.I know you prefer all in one edu style boards with builtin dip switches leds, ect. I get that and I get why. Ihatethat style board!I figure if you can't wire up a dip switch you need to back away from the ee-bench. I am a software guy and the tactile physical experienceof building things with my hands is my favourite and most enjoyable part of the hobby. I suppose the best compromise betweenthe two extremes of dev board is the Papillo approach, an unadorned basic breakout board with attachable edu modules- Are seperate Verilog & VHDL editions worth my time? or a mixed edition? or just VHDL?Verilog seems easier to learn so that is what I am concentrating on but to see the same function implemented inVHDL side by side would be bonus- Is it better to aim low (assuming little relevant experience) or aim high (expect a Digital Logic Guru) with the level of content?I taught myself how to build working digital circuits with 74'series parts when I was a teenager. It was like falling off a log, aim high. If thestudent doesn't already have the motivation to self acquire the prerequisites their chance of completing is zero.- Are project ideas best (e.g. as well as blinking a LED, see what frequency you can see the blink, does colour matter in perception of blink)? Are fully worked solutions best (here is how I blink an LED)?Huh? I need you to walk me through this question, I suspect my answer is yes, see project ideas below.- I tried to introduce the minimal subset of VHDL you need to implement anything, is this a good idea? Should I add the rest of the like functions, packages and so on?minimal yes, very good. (see what I did there?)- What areas need to be focused on more, and what is now "old school" and can be forgotten about (e.g. schematic entry)?I need help with timing issues, and time domain crossing. Also I still think in schematic form, I see designs as images, one of my main barriersin learning the textual register transfer way so in a sense learning schematic entry is counter productive to learning Verilog/VHDL- What sort of projects interest people?In no particular order: long scale frequency counters. delta-sigma modulators for both ADC/DAC, High resolution PWM, Time to digital converters,all of the different basic interfaces to an external mcu: dual port RAM, FIFO, spi. I was particularly interested in that high speed link test betweenfpga's you did, but I couldn't fully grok the code. I did understand the essential design and it impressed me, I would like more of that kind of thing.- Should there be a more mixed add-on H/W content, vs using only the DevBoard onboard I/O?Well you already know how much I like those boards with permanently fixed IO, so add on circuits for the win!Thank you for seeking our input, I greatly appreciate any human who's efforts makes me a smarter numpty

author: rstofer
author_rank: Super Contributor
timestamp: June 09, 2017, 05:07:40 pm
content: Moving forward, I would think that Vivado/Arty would be the platform for some period of time. The Arduino form factor could be compelling.Any discussion of the Vivado XDC file would help!The utility of the 'blinking LED' shouldn't be overlooked. A lot of things have to go right to get that result. In my view, that is the biggest hurdle. After the LED blinks, the rest is just details.I look forward to seeing your new site!

author: brucehoult
author_rank: Super Contributor
timestamp: June 09, 2017, 08:01:25 pm
content: Quote from: rstofer on June 09, 2017, 05:07:40 pmAbsolutely!There is a reason even the best programmers try "hello world" before anything serious any time they get a new language or compiler or development environment. *Especially* the best programmers. No point banging your head over something complex not working, wondering what you did wrong, if helloworld doesn't work either.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 09, 2017, 08:45:59 pm
content: I would add theoretical parts - good description of RTL logic concept, the structure of FPGA fabric, relationship between HDL and the implementation ... etc. etc.

author: mubes
author_rank: Regular Contributor
timestamp: June 10, 2017, 07:33:43 am
content: One thing I'd really like someone to explain to me is the IP structure for these parts....I'm probably dumb, but it confuses me totally what are freely available IP blocks and what I have to pay licence fees for. Some kind of 'roadmap' through that minefield would be greatly appreciated.Its totally non-technical, and it's probable that it's one of those things that just clicks in your head and it all becomes obvious, but I'm in the pre-click state and really not sure which bits of the toolchains I can freely use and which I can only use while developing (or when I buy the various licences etc).

author: asgard20032
author_rank: Regular Contributor
timestamp: June 10, 2017, 01:32:57 pm
content: Your wiki was always one of my first resource. I don't have much difficulty to find a hello world led flasher. But finding real resource, showing real thing (ethernet, hdmi, sdram controller)... how those work, why which decision was taken during the implementation, further possible improvement idea...We don't need another tutorial for noob, what we need is your way of doing, what you always did : Take hard concept, like sdram controller, and try to make it accessible for everyone. I am sure even people new to the field would prefer hard stuff so well explained that even them can understand.New topic you should really cover : time analysis & constraint file, SoC (at least, an introduction to SoC). NIOS II, microblaze, or an opensource one. How to work with avalon bus or wishbone bus

author: marshallh
author_rank: Unknown
timestamp: June 11, 2017, 06:15:14 pm
content: The current state of FPGA coding books is abysmal. You basically have two categories with no middle ground:1. How to write a NAND gate in verilog and how to write a JK flip flop in verilog (most college texts are useless like this)2. How to write an enterprise Interlaken/100Gbe/MPEG-4 encoder core.There is no middle ground where you need to learn all sorts of things like how you deal with multiple clock domains, interlocking FSMs, message passing, dual ported FIFOs, timing closure for source synchronous interfaces, etc. I have gotten loads of "thank you" emails for the simple and short Verilog tips pdf in my signature. People are that desperate.The best book I've found is "Advanced Chip Design: Practical Examples in Verilog" which despite its "Advanced" moniker starts very humbly and builds up to explain practical and useful examples of all these building block techniques.If you decide to also do verilog, jump to SystemVerilog. Everything except ancient ISE supports it and you get some huge benefits. As long as you are targeting people with a small bit of experience, they should be able to read VHDL themselves though.Avoid being a reference book. Start first with applied examples and then generalize later if it's justified. For along time I planned on doing a blog post series explaining a tip/trick for FPGAs to explain some of the inside baseball. I still think this is one of the best ways to go. You get to cherry pick what you want to do, doesn't waste your time, and you get maximum impact for your time spent.I don't think its possible to match the massive, widespread acceptance that Arduino has. FPGAs are and will probably remain very niche, specialist devices to play a role where nothing else can. These days virtually all of what you need to do with electronics can be done by a microcontroller under 10 dollars containing every peripheral known to man.Many people look at FPGAs as a very cool, neat thing, but don't have a use case or project that needs them. I think to overcome the barrier to entry of FPGAs a person must "want" it enough. So many folks do not make the transition from "blinking LED" to even something simple like a 8bit CPU.It's just my opinion that if you focus all your effort here you will waste a lot of time, it's like writing a "How to lift weights and exercise" blog where everyone goes "Once I lose a bit of weight, I swear, I'll hit the gym and get in shape finally".Instead, maybe try focusing on slightly higher level stuff and leave the "driving a 7 segment display" tutorials to someone else. You have much more talent and knowledge to share than this.Anyway, just my opinions. If I read you wrong and you want to do more of a ground-up tutorial series, here are some answers:Quote from: hamster_nz on June 09, 2017, 05:44:01 amI used to exclusively recommend Altera because the ILA SignalTap II came free and makes the debugging/learning cycle hugely faster. But ever since Xilinx made their own ILA free to use that would be acceptable as well (It's a lot less polished than Altera's imo)Xilinx/Digilent boards typically have loads of those horrid Pmod connectors. Great for tiny IC interfaces but forget it for anything bigger like a HDMI tx, external ram, USB fifo, etc. I like terasic's two 40 pin headers more than this, and the HSMC on the more expensive boards is very powerful.Quote from: hamster_nz on June 09, 2017, 05:44:01 amAgain, do you want to make full tutorials, or do you want to hit the important points and let competent readers do the rest? I would say do whatever's easiest for you and keeps you interested in making them.Quote from: hamster_nz on June 09, 2017, 05:44:01 amDigilent ArtyTerasic DE0-Nano-SOCUnforunately both of these boards have DDR3 ram which is not practical for people learning. DE0-Nano is great because it has a vanilla SDRAM on there.Quote from: hamster_nz on June 09, 2017, 05:44:01 amPick one and target it, do whichever makes you more effective at writing.Quote from: hamster_nz on June 09, 2017, 05:44:01 amMaybe somewhere between them. See above rantQuote from: hamster_nz on June 09, 2017, 05:44:01 amMaybe for 10% of your articles/pages, you could provide a bit more exposition, background information, pictures, and nifty science tidbits. I guarantee these articles will get picked up by Hackaday and other blogs. Could be good entry points for gaining readership.Quote from: hamster_nz on June 09, 2017, 05:44:01 amOnly to the extent that you use them, unless you want to write a reference book.Quote from: hamster_nz on June 09, 2017, 05:44:01 amAn empty void that exists is good examples on interfacing with outside devices, and constraining those interfaces. Source synchronous, shared clock, quad SPI, asynchronous bus. Schematic entry is toast. Python-based HDL generators are nice but still seem to be toy pet projects.Quote from: hamster_nz on June 09, 2017, 05:44:01 amGraphics, fast interfaces, old games.Quote from: hamster_nz on June 09, 2017, 05:44:01 amDefinitely, rarely is there a devboard with the hardware you need already on it.For example, here's a situation that seems to happen a lot and friends run into:Grad student is running an experiment that requires data acquisition, and it can't be done with NI. So, he looks at FPGAs and buys a board. Literally no board comes with a useful ADC on it so he must not only learn enough about ADCs to pick one, he also must design a PCB with a dense connector to put it on. Then work with a fast interface that there are no guides on how to constrain so it works reliably. Next, again no dev boards come with a way to exfil captured data to a PC. So he has to design a USB2/3 fifo board as well, and write PC software for it.Another example of a larger project where if you create sort of a template for these people to follow, you'd get lots of traffic and thanks.

author: brucehoult
author_rank: Super Contributor
timestamp: June 11, 2017, 07:10:45 pm
content: Quote from: marshallh on June 11, 2017, 06:15:14 pmYou're probably going to have to define what you mean by "useful". That Arty board you mention, for example, has "Dual 12-Bit 1 MSPS Analog-to-Digital Converter". Certainly there are applications for which that is not high enough spec, but there are a lot of applications where it is.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 11, 2017, 07:47:50 pm
content: Quote from: brucehoult on June 11, 2017, 07:10:45 pmStrictly speaking, that's no the board. This is a built-in ADC in the Artix-7 FPGA. It is certainly very slow compared to what the FPGA could handle.

author: KE5FX
author_rank: Super Contributor
timestamp: June 11, 2017, 08:33:18 pm
content: Quote from: marshallh on June 11, 2017, 06:15:14 pmDon't forget:3. Valuable insights into ASIC design flows that were in vogue when the author learned how to use them 20 years agoQuoteAgreed, SV is the way to go for any new Verilog tutorials.There are tools that will do a half-decent job of translatingmost synthesizable VHDL to Verilog, and presumably vice versa, so the language schism isn't as big a deal as it seems at first.QuoteOne great way to present small code examples is through an interactive tool likeEDAPlayground. Refining a snippet of logic in EDAPlayground is a lot faster than waiting for a complete build cycle on your hardware platform. This site should be a lot better-known than it is. There are probably others like it you could mention as well.QuoteExactly. You use FPGAs when you need to either (a) move a lot of data around, or (b) do a lot of parallel data crunching in hard real time. Most people won't need to do either of these, and those who do generally won't need to be told what a flip-flop is, how to enter a schematic, or what the difference is between a Mealy and Moore FSM. Books and tutorials that acknowledge 20 years' worth of progress in synthesis tools are few and far between. I can't agree more with the suggestion to focus on high-level tasks with modern toolchains.ADC interfaces are a good example. App notes from Xilinx and Altera range from (occasionally) somewhat helpful to (usually) completely awful. A site that focuses onactionableapp notes and white papers would be very welcome.QuoteExactly. Once you get past the bare essentials, .XDC/.SDC constraints can be tough to apply in the real world, vis-a-vis the parameters found on typical ADC, DAC, and bus interface data sheets. A site that offers nothing but constraint examples and tutorials for connecting specific parts to FPGAs would be useful in itself.QuoteThese boards exist, but most people don't know to Google for "software defined radio," so they never find them.

author: jmelson
author_rank: Super Contributor
timestamp: June 12, 2017, 10:39:50 pm
content: I certainly still use FPGAs and CPLDs from Xilinx ! I tend to use older software, as I am using older lines of these parts (Spartan 3A and 3AN FPGAs) and 9500xl and CoolRunner II CPLDs.Always interested in what's new, how to use them better, etc.Jon

author: jmelson
author_rank: Super Contributor
timestamp: June 12, 2017, 10:42:52 pm
content: Oh, schematic entry for FPGAs ! UGH! I did a project a long time ago, and entered it all as schematics! Well, when it came time to change it, it was a real mess.Then, I learned VHDL, and saw the light.Jon

author: Boscoe
author_rank: Frequent Contributor
timestamp: June 14, 2017, 08:17:15 pm
content: Hi Mike,First off, I would like to thank you for your continued efforts to this work - it has helped me a lot in the past and is very admirable.- As regards to VHDL vs Verilog, I would say stick with VHDL. You can mix languages (at least for Altera and Xilinx tools) so I wouldn't worry.- My only criticism about your current work (I don't even think it's a criticism considering) is the lack of comments and documentation. For example I tried using your SPDIF code a while back but found the task confusing and ended giving up. I'm a Verilog guy with a small amount of VHDL knowledge so couldn't work out what was going on on my own.So in summary I would concentrate on producing solid, well documented projects which make them applicable to a very large audience (pro down to beginner).Thanks again and all the best!

author: ebastler
author_rank: Super Contributor
timestamp: May 31, 2021, 05:42:36 am
content: Hi Mike,Revisiting this old thread... I wanted to point a friend to your website who had asked about resources to get started with FPGAs -- and realized that it was no longer online. It looks like the new hamsterworks.info site is also not available (yet, or at the moment?). Is the old content still accessible somewhere, or do you have something new in the works?Thanks! Juergen/ebastler

author: hamster_nz
author_rank: Super Contributor
timestamp: May 31, 2021, 06:02:24 am
content: The Wayback Machine is where I have been pointing people who ask.https://web.archive.org/web/20181002031900/http://hamsterworks.co.nz/mediawiki/index.php/FPGA_Projects

author: brucehoult
author_rank: Super Contributor
timestamp: May 31, 2021, 09:51:19 am
content: Quote from: westfw on June 09, 2017, 08:55:25 amYes.github / gitlab etc, not zip files, puhleeze.Can easily browse online, can easily download.For small samples it can all be one repo, with either directories or branches for each project.Edit: gah, just realized this is an old thread that has popped up again. I even posted a couple of times in it, four years ago. I still haven't learned FPGA yet -- got too distracted by RISC-V.

author: rstofer
author_rank: Super Contributor
timestamp: June 01, 2021, 01:47:58 am
content: Off topic...A number of the older posts talk about tutorials - some being not all that useful.I have been playing around at VHDLwhiz.com and did both of the 'for-pay' courses plus several of the tutorials. They are excellent! Especially so if you have an interest in simulation.The projects tend to revolve around the Lattice IceStick so the cost of entry is low.

author: tmadness
author_rank: Regular Contributor
timestamp: June 01, 2021, 10:27:12 pm
content: A personal peev of mine is the lack of end to end zynq, Ultrascale+ content. there are tutorials on linux, generating bit-streams etc but nothing truly from start to finish. Maybe something on your radar here?

author: james_s
author_rank: Super Contributor
timestamp: June 01, 2021, 11:29:13 pm
content: Quote from: KE5FX on June 11, 2017, 08:33:18 pmThere is a third which is huge for me and the entire reason I got into FPGAs in the first place - recreating vintage hardware. There are a ton of projects out there for vintage arcade games, console games, early computers and other random stuff. Emulating something like the the original TTL based Pong or a DEC PDP is something no microcontroller is going to do perfectly but an FPGA is ideally suited for. None of this is what FPGA vendors had in mind for their products but it's something they do very well, and something that has broad hobbyist appeal.

author: AlfBaz
author_rank: Super Contributor
timestamp: June 02, 2021, 01:19:16 am
content: Quote from: brucehoult on May 31, 2021, 09:51:19 amMe too, I clicked on the link in the opening post and the site being about real hamsters prompted me check the post date