Slashdot Mirror


VHDL or Verilog For Learning FPGAs?

FlyByPC writes "We're in the first stages of designing a course in programmable devices at the university where I work. The course will most likely be centered around various small projects implemented on an FPGA dev board, using a Xilinx Spartan3-series FPGA. I have a bit of experience working with technologies from 7400-series chips (designing using schematics) to 8-bit microcontrollers to C/C++. FPGAs, though, are new to me (although they look very interesting.) If you were an undergraduate student studying programmable devices (specifically, FPGAs), would you prefer the course be centered on VHDL, Verilog, a little of both, or something else entirely? (...Or is this an eternal, undecidable holy-war question along the lines of ATI/nVidia, AMD/Intel, Coke/Pepsi, etc...?) At this point, I've only seen a little of both languages, so I have no real preference. Any input, especially if you're using one or both in the field, would be very helpful. Thanks, and may all of your K-maps be glitch-free."

301 comments

  1. Where are you located? by hpa · · Score: 5, Interesting

    Personally, I would say that Verilog is more C-like: weakly typed, compact, efficient notation, whereas VHDL is much more Ada-like: strongly typed, often verbose, but can catch errors that the other one can't.

    In industry, as far as I can tell, Verilog seems to be more used in North America and VHDL in Europe, so that might affect what you care about, too.

    Personally, I prefer Verilog.

    1. Re:Where are you located? by Anonymous Coward · · Score: 0

      In my courses the intro class used the schematic entry at first and then a brief exposure to both verilog and VHDL. The follow up course to it was done in VHDL. A lot of weird and 'unexpected behavior' will be seen and some students will spend hours trying to figure out what is wrong. My vote would be for VHDL because of this.

    2. Re:Where are you located? by Anonymous Coward · · Score: 0

      Military uses (and created) VHDL in America.

      Or, rather, the DoD created VHDL way back when, so all stuff done with the military/defense department/gubment is done in VHDL.

      But yes, the US private sector generally uses Verilog. (Other N. American countries, I can't say)

    3. Re:Where are you located? by phulshof · · Score: 5, Interesting

      I agree with the above post, though I personally prefer VHDL. That might however have something to do with me having designed ASIC/FPGAs for about 11 years now using VHDL though. :) Both are very powerful languages these days, and I see no problem in teaching a course using both languages, showing how to create the same hardware using different language constructs.

    4. Re:Where are you located? by Man+On+Pink+Corner · · Score: 5, Insightful

      Speaking as someone who just got his first Verilog-based design working on a Nexys2 board, I can confidently say that there are two serious mistakes a n00b can make:

      1) Thinking of Verilog (or any HDL) as anything like C. Yes, there are semicolons. Yes, you can write a "for" loop, if you want to synthesize a huge mess. That's about it.

      2) Thinking of Verilog as a programming language at all. HDL stands for "Hardware description language," and that's what they are.

      Verilog is fun stuff, but it's the hardest thing I've ever taught myself. For those who are trying, I've found the Bhasker books on synthesis to be quite useful, Pong Chu's FPGA Prototyping with Verilog Examples to be reasonably useful, and most of the others to be fairly worthless. Too many books focus on simulation at the expense of synthesis practices, IMO.

      Also have just received Richard Haskell's new books on basic and advanced Verilog using the Basys and Nexys2 platforms. They look very good at first glance but I haven't yet had a lot of time to spend with either of them.

    5. Re:Where are you located? by Mike1024 · · Score: 1

      In industry, as far as I can tell, Verilog seems to be more used in North America and VHDL in Europe, so that might affect what you care about, too.

      When I worked at (UK-based processor designers) ARM, Verilog was the language of choice. I've been told VHDL is popular in academia, while Verilog is more popular in industry.

      That said, the underlying concepts are pretty similar, and those are what you're teaching really, so either choice would be reasonable.

      --
      "Goodness me, how unlike the FBI to abuse the trust of the American public." -- The Onion
    6. Re:Where are you located? by linzeal · · Score: 1

      Agreed, too may people jump from C++ or Java directly to HDL without a good electronics or assembly course inbetween. I would suggest you take both before you jump in with HDL.

    7. Re:Where are you located? by arktemplar · · Score: 1

      Yes, essentially I'd agree with you.

      However the thing is this, it's easier to get synthesiseable code in verilog that will correspond to your code directly, if you have experience, that is. However, VHDL seems to be better in my opinion only because it is more structured.

      Ok - so the thing is, I've done significant work in both. I kind of liked the fact that VHDL was more structured and readable, however Verilog seems to have more support. Now, apart from this the differences, are mostly in getting synthesiseable results from your code, it's easier to get code match the RTL, like I've already said, if you're working in Verilog, plus synthesisers also have better support for Verilog. However, after getting started on verilog, VHDL is much more attractive in my opinion.

      --
      blog plug -> The Darker Side of Light
    8. Re:Where are you located? by kestasjk · · Score: 1

      I had a brief experience with Xilinx during a computer science course. It was (no exaggeration) the most buggy, error/crash-prone Windows 95 throwback nightmare piece of software I've ever used. Everyone in the labs were often unable to complete (simple hardware fundamentals 101) assignments, just because of software problems.

      YMMV of course, but if I never have to use Xilinx again I'll be glad.

      --
      // MD_Update(&m,buf,j);
    9. Re:Where are you located? by drmerope · · Score: 2, Interesting

      I agree about the industry part, although I find it ironic since VHDL arose from DARPA funded work whereas Verilog is a proprietary innovation turned international standard. At school I learned VHDL though. This wasn't a problem when it came time to use Verilog at work.

      My advice: cut against trend. If you're a North American school, use VHDL. If you're in Europe, use Verilog. It may be the only chance for your students to taste the other side.

      The insanity of VHDL is attaching two things that you know are 'just wires'. In my experience you spend quite a lot of time writing type-conversion adapters.

    10. Re:Where are you located? by SydShamino · · Score: 2, Interesting

      Verilog is more popular in the ASIC design industry, for certain. But I work at a large test instrument manufacturer whose products are based heavily on FGPA design, and we are exclusively a VHDL shop.

      It is my understanding that Verilog is moving towards stricter type definitions, so that it can get some of the benefits that entails. If you, the submitter, are looking to learn/teach a language least likely to change in the near term, go with VHDL.

      That said, a good engineer should be able to sit down with the unfamiliar language and read it, and after a week training course write in it with professional quality. So whichever you teach, your good students will do fine in their careers.

      --
      It doesn't hurt to be nice.
    11. Re:Where are you located? by SydShamino · · Score: 1

      The biggest problem with Xilinx' compilation software at the moment is their timing analysis. The industry is moving towards system models for timing analysis, based around Synopsys Design Constraints. Their use in ASICs is already pretty common, but for FPGA design their use is pretty new.

      Altera's TimeQuest analyzer in their Quartus II software is SDC-based, so learning that gets you the latest and greatest in terms of analysis capabilities. Xilinx still uses classical, chip-centric timing analysis software. I would expect an SDC-based model from them in the near future, but if you learn with what they currently offer, you'll need to learn again.

      That said, you'll have success with either company at this point. The Altera Max+Plus II software I was forced to use in college was some of the buggiest, least-intuitive, poorest quality software I've ever seen. But the latest versions of Quartus II are good enough to be better than most third-party tools for synthesis, and perfectly functional for place and route and analysis.

      --
      It doesn't hurt to be nice.
    12. Re:Where are you located? by jcasper · · Score: 1

      The quote I've always heard (not sure where it came from): "VHDL was created by hardware engineers who know nothing about programming languages. Verilog was created by computer scientists who know nothing about hardware."

      In practice I've had to deal with both on a regular basis, including single designs with both VHDL and Verilog modules. I'd say teach digital design and let them learn whatever language they want to implement what they learn in class; Xilinx tools can handle both seamlessly, why not let them choose? Show examples from both in the slides.

    13. Re:Where are you located? by KDR_11k · · Score: 1

      Dunno, I didn't have any trouble with learning Verilog despite never having seen Assembly language before and lacking understanding of electronics (I know some basic stuff but could never get the calculations right) though I did have experience with writing logic for videogames (especially the Total Annihilation COB format which often runs frame based and multithreaded). I found the massive parallelism easy to visualize.

      --
      Justice is the sheep getting arrested while an impartial judge declares the vote void.
    14. Re:Where are you located? by Anonymous Coward · · Score: 0

      In industry, as far as I can tell, Verilog seems to be more used in North America and VHDL in Europe, so that might affect what you care about, too.

      I'll second this. The courses I took in school (Georgia Tech) did everything in VHDL. Some of those I knew who went on to work in the field remarked that they wished we had learned Verilog instead, as it's much more common in industry. The impression I always got was that "Verilog vs. VHDL" is somewhat like "C vs. Pascal" used to be - the former is used a lot more in real applications, and allows more "bare metal" access, while the latter is a better teaching/modeling tool, and gets used more in academia. Which one you choose, then, should probably be based on whether your focus is mainly to train people for jobs in which they'll use a HDL, or teach them the concepts involved. Sort of like (to make another flawed analogy) IT vs. Computer Science.

    15. Re:Where are you located? by Austerity+Empowers · · Score: 1

      A lot of people compare Verilog to C, and VHDL to Pascal (ADA lite?). Either way I find that a) you will need to know both, if you are going to be in this business, b) Companies that enforce A language, in the US, enforce Verilog, companies that leave it to teams, use either VHDL or Verilog. So if you had to choose just one, and you live in the US, I say choose Verilog ;) That said, the first ASIC I did was in VHDL (which I learned in school). I continued that in single-person FPGAs which I wrote, without objection. In my present company I was forced to learn Verilog, and I can't say that I long to go back to VHDL or have "been converted".

      Both languages are designed to simulate, not synthesize. As such, the language ultimately is just the tool, "thinking hardware" in terms of the synthesizeable subsets of the languages and the realization of hardware the tools come up with is identical in both languages. The constructs that produce a given hardware are generally very parallel (in fact there's a book out there, I forget the name, that puts VHDL right next to Verilog for a given construct). Neither language is especially more compact or "R.A.D." than the other. VHDL expect to spend more time fighting your compiler and subjugating the strongly-typed aspect. Verilog expect to spend more time debugging subtle and unexpected results of improper use of the language (like C, it will do what you ask, but not always what you meant!).

      I've found that Icarus is a great free Verilog simulator for Linux, and I love it, so that's a good budget choice. In general though, consider your simulation tools as the driving force in your choices. Some professional tools are better at VHDL or better at Verilog (which has a number of "versions", adding very nice features that aren't always available in a given sim). Some run far faster with one language or another. In the long run this will all balance out, but we've been saying that for a decade and there are still (increasingly small) imbalances. Examine your simulation/verification model, identify which features you may want (things like "do I want to use a large randomly accessed text file for input vectors?") and see which language offers the most robust support with your tool, and if it requires proprietary language extensions to make that happen (very common with verilog).

      Most synthesizers take both and work pretty much equally with either language.

    16. Re:Where are you located? by SydShamino · · Score: 5, Insightful

      Having now read through the entirety of the comments on this story, the trend I see is that:
      A) students who learned with VHDL then went on to a career with Verilog think the transition was easy and either language is fine, while
      B) students who learned with Verilog then went on to a career with VHDL, while rarer, think VHDL is a harder language, and
      C) students who were forced to take VHDL when it wasn't in their career plan hated it, because it was so different than a programming language.

      Based on that review, I'd say teach your students VHDL. The students that learn it and do well in your course will have the easiest time in the industry, and those that hate it probably won't become good HDL designers regardless.

      --
      It doesn't hurt to be nice.
    17. Re:Where are you located? by Rufus211 · · Score: 1

      It's not only where you are, but what part of the industry. From my experience most of the industry (Intel, AMD/ATI, Nvidia, etc) are all Verilog houses. On the other hand anything that interacts with the government (research labs, IBM, defense contractors) are VHDL houses.

      But really, it doesn't matter in the long run since there are no fundamental differences between the two. The syntax will take you a month or so to get used to, but the hardware you're designing will be the same. The hard part of hardware design is not typing out the code, but creating a good micro-architectural design with good documentation and diagrams of how all the pieces connect together. Once you have a solid uarch, translating that into either Verilog or VHDL should be very straightforward.

    18. Re:Where are you located? by Anonymous Coward · · Score: 0

      after a week training course write in it with professional quality

      This is what suits actually believe.

    19. Re:Where are you located? by Anonymous Coward · · Score: 2, Insightful

      This person has programmed a single board and considers himself knowledgeable?

      1) The syntax is incredibly similar to C. Which is why it is always described as "C like" to people who have very little experience in HDL.

      2) HDL ARE programming languages. It compiles and then it runs when its placed in its environment just like EVERY program ever written is supposed to do.

      Thank you for telling us what your reading to better educate yourself.

      @ OP
      As someone who has spent A LOT of time using both in university, I would say Verilog is the easiest to learn because its syntax is very closely related to C. VHDL is better if you absolutely must have full control of the resulting performance on the FPGA. Even then its mostly affected by the performance of the compiler.

      I prefer Verilog but being able to add VHDL on the resume can't hurt your students. Spend a few weeks on VHDL first then switch to Verilog. Your students will curse you when they find out how much easier Verilog is, but its better the teach the hard way first before the student becomes dependent on the easy way.

    20. Re:Where are you located? by Anonymous Coward · · Score: 0

      Hrmpf. VHDL different than a programming language? It's a programming language. The kind that does its best to drive you into insanity by requiring to litter your code over and over with typecasts no matter if you know what you are doing.
      But for a software developer the biggest issue with both languages will be that the synthesis tools are simply all crap, correct code and an error free synthesis doesn't actually mean it will work on real hardware, not by far.
      You'll feel like using a compiler that incorporates all compiler bugs that ever existed in a simple version and having neither a debugger nor a disassembler.

    21. Re:Where are you located? by Space+cowboy · · Score: 1

      Snap.

      Agreed.

      I see a lot of these "Software programmers don't understand this" posts, on newsgroups etc. I found verilog easy to understand, and I was very much a software programmer. Perhaps in days of yore when C programmers had simple single-threaded code it was appropriate, but the application my team is currently working on frequently has 100 threads or so concurrently running. Constructing an 'always@' block around some signal *is* pretty similar to how we multithread programs these days...

      Once you've started coding parallel apps, it's hard to go back to serial ones - I liken it to when you wrote procedural code and then moved to object-orientated code. It's possible to revert, but not pleasant. When that's your mindset, picking up either of the two languages isn't that hard (VHDL is far too verbose for me, personally, though).

      The concepts are simple (if fundamental and sometimes subtle), the syntax is simple, conceptualising it is also pretty simple; given that most of my designs have been relatively tiny compared to the software projects I work on (the current project is some 900k LOC). My most-complex verilog project was a real-time HD JPEG-2k encoder. Lots of parallelism and pipelining to get the frame-rate :)

      Oh, and I'm hearing good things about SystemC - which seems to take some of the lower-level boring work out of HDL coding. Probably worth looking at too...

      Simon

      --
      Physicists get Hadrons!
    22. Re:Where are you located? by asicsolutions · · Score: 1

      The above poster is correct. Having worked as a design engineer for over 16 years, VHDL is more European, verilog is more US. I started out w/ VHDL for the first 3 years of my career and verilog/ Systemverilog ever since. (I still ocassionally have to deal with VHDL, but its painful) A couple of side notes: 1) Synopsys (ASIC design) has made verilog a higher priority than VHDL for years. 2) I strongly suggest SystemVerilog. The support from Altera is outstanding. It is coming for Xilinx and eventually the other FPGA vendors. It is 100% compatible with verilog and has many of the niceties of VHDL. See blog.asicsolutions.com. I'm a bit behind, but I intend to update soon.

    23. Re:Where are you located? by reverend+schmuley · · Score: 1

      You mentioned Pong Chu's book 'FPGA Prototyping by Verilog Examples'. He has another book with almost the same title that uses VHDL examples. It is very good for a quick cookbook type of book. He has examples of many basic circuits and modules. The foundation for making your own PONG is outlined, although the full implementation is left for an exercise. He also gets into running the PicoBlaze microcontroller module. I think the books are almost identical, just showing how to make common hardware with the language of your choice. Pong Chu also wrote 'RTL Hardware Design Using VHDL'. This book is very well written and covers general RTL design concepts that are applicable to any language. However, VHDL's RTL synthesis substandard (IEEE 1076.6) is used exclusively for implementation examples. Both languages have tradeoffs which are pretty well known. For FPGA based class, you aren't as concerned about behavioral modeling; you want synthesizable code. Just make sure you use books that focus (like Pong Chu's) on the synthesis aspect of whatever language you are using. The fact that VHDL has a synthesis standard seems like a plus in that department but, some people might say that doesn't matter so much.

    24. Re:Where are you located? by compgenius3 · · Score: 1

      I agree entirely, as a student who started with VHDL, I think that it's really easy to switch to Verilog. I find it pretty easy to understand, though the terminology is much harder to understand, as VHDL is more like a natural language. That's just my $0.02

      --
      Sexual intercourse is kicking death in the ass while singing. ~Charles Bukowski
    25. Re:Where are you located? by Zero__Kelvin · · Score: 1, Insightful

      "2) Thinking of Verilog as a programming language at all. HDL stands for "Hardware description language," and that's what they are.

      BZZZT You agree VHDL is a language. Do you plan on speaking it, or using it to program? It might be a huge mistake to compare it closely with C or C++, but is is absolutely a programming language.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    26. Re:Where are you located? by X0563511 · · Score: 2, Insightful

      That's the thing. You have an understanding, if not a working knowledge. Logic is probably one of the most important facets of digital circuitry, once you step back from the nitty-gritty.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    27. Re:Where are you located? by Darinbob · · Score: 2, Informative

      I've not programmed in HDLs but I've read some of their programming. All the companies I've been at has used VHDL, though very often the main developers will gripe that they'd rather be using Verilog...

      I'd agree with the assessment that if this is for students, then always teach the more rigorous language first. This goes for programming languages too. If you teach what is popular today, you end up with graduates who have difficulty adapting in the future. VHDL is the more rigorous and formal language, which is precisely what it needed with hardware design.

    28. Re:Where are you located? by cibyr · · Score: 2, Informative

      1) The syntax is incredibly similar to C. Which is why it is always described as "C like" to people who have very little experience in HDL.

      The operators are the same as C operators, the comment style is the same and there are semicolons. That is the full extent of the similarity with C. The are no braces (well, there are, but they don't mean what they do in C), macros are different, constants are different, assignment can be different, functions aren't functions, switch statements are case statements, etc, etc... saying that Verilog is "C like" is only going to confuse people who know C. Verilog has more in common with VHDL that with C really (begin and end statements, two difference types of variables, two different ways of doing assignment, both languages have constructs with no C equivalent) and yet people only say Verilog is "C like".

       

      VHDL is better if you absolutely must have full control of the resulting performance on the FPGA.

      Ok, I'll bite - what does VHDL give you control over that Verilog doesn't?

      --
      It's not exactly rocket surgery.
    29. Re:Where are you located? by cibyr · · Score: 1

      The insanity of VHDL is attaching two things that you know are 'just wires'. In my experience you spend quite a lot of time writing type-conversion adapters.

      OMFG, this annoys the hell out of me. VHDL makes it far too hard to treat numbers as bit-vectors and visa-versa. That and the two incompatible ways of doing maths make Verilog the better choice unless you're forced to use VHDL, IMHO.

      --
      It's not exactly rocket surgery.
    30. Re:Where are you located? by PSargent · · Score: 1

      Yep, this is the right attitude. Use the language that has the type checking and strict structure, and then when the shackles come off people have already formed good habits.

      I've done about 8 years of VHDL and so prefer it to Verilog, mainly because I'm more familiar with it, but I've had lots of conversations with Verilog engineers over the years saying "You can't do X with VHDL because it's too strict" and it's never true. Learning VHDL was tough, but doing it (and I've got a similar tale with Haskell for software) was what advanced my skills of RTL coding the most.

      The key is not to fight the restrictions, but to understand why they are there and to see what they allow you to forget about. It's sounds almost zen, but sometimes restrictions let you flow. ...but never forget. The aim is to describe hardware, so you need to have in mind what hardware you want to synth at the end of the day. As such the language is always second to good hardware design.

    31. Re:Where are you located? by dpilot · · Score: 2, Interesting

      Verilog is C-like in that it won't lift much of a finger to keep you from shooting yourself in the foot, and it leaves plenty of ammo lying around. With VHDL the language forces you to specify things much more clearly (and verbosely) up-front. If you're going to compare Verilog to C, then you can compare VHDL to Pascal and its ilk. (Or Ada, as someone else said.) Far from a perfect analogy, but also far from incorrect.

      I've used both. I first tried learning Verilog by using it for a few months. Then I learned VHDL by using, producing a fairly good-sized functional macro for an ASIC. Some years later I took a Verilog course. It struck me that on one of my class projects, I got caught by a typo, misspelling a variable name on one particular use of a signal. Verilog implicitely declared the variable for me, and I had an open circuit to debug. VHDL would have stopped with a compile error.

      But then again, decades ago I wrote fairly extensively in Modula-2. That included interrupt service routines and binary readers for legacy data. So I have a tolerance and preference for the more verbose, tight-laced languages.

      --
      The living have better things to do than to continue hating the dead.
    32. Re:Where are you located? by Anonymous Coward · · Score: 0

      All inclusive summary of comments. Close thread, mod up... and good night people!

    33. Re:Where are you located? by Anonymous Coward · · Score: 0

      I would not do neither VHDL or Verilog. Think of both of those as "assembly" language.

      Instead, I would do a higher level language such is "Handel-C" (http://en.wikipedia.org/wiki/Handel_C) or just use one of the other C to HDL compilers.

      It is much more expressive and allows you to do stuff much easier and quicker.

      So I would do it something like this:
      1) Do an intro to VHDL or Verilog
      2) Once students understand basics, switch over to Handel-C or something like that.

    34. Re:Where are you located? by Anonymous Coward · · Score: 0

      "program" means "sequence of steps," which accurately describes the behavior of common CPUs, but not FPGAs...

      consider: what makes html a "markup" language?

      disclaimer: i havent read this whole thread, but my kmaps have always been consistent, even the async ones ;P
      i've worked with atmel boards a bit but i'm not at all versed in hdls. just being a usage nazi ;-P

    35. Re:Where are you located? by Lucky75 · · Score: 1

      I'd have to say VHDL based solely on the fact that it's the one I'm more used to using. There's a reason why most university's teach VHDL...

      --
      DNA -- National Dyslexic Association
    36. Re:Where are you located? by k8to · · Score: 1

      um, no.

      When you author things in programming languages, you get... a program.

      What you are designing in HDL is hardware.

      There's some overlap. Stuff like algorithms may be used in both arenas, but the goal of HDL is to make hardware, not programs.

      --
      -josh
    37. Re:Where are you located? by Anonymous Coward · · Score: 0

      I don't believe teaching both languages is really practical. I've been in courses that attempted this (Java and C#) and they fail miserably for the fact that any programmer who understands the concepts behind the language can generally pick up a different syntax/language with a minimum of effort. If, however, they learn only the language and not the concepts behind it's use they'll be doomed to be explicitly taught how to do everything in that language.

      Teach a man to fish, and all that.

      I've used both Verilog and VHDL and largely agree with the top post. VHDL is much more verbose than Verilog and, consequently, is uniquely suited to environments where that is desirable. Verilog is more C-like in both it's "weakly typed" sense (in C you're dealing with taking void * and casting it to something else, in Verilog you're dealing with breaking a bus into bits, etc) as well as syntactically. Verilog will be easier for your students to pick up if your university/college/school's curriculum is C/C++/Java centered.

    38. Re:Where are you located? by Anonymous Coward · · Score: 0

      I agree. At my university we focus on Verilog. We have two courses, one a beginner and shows all the basics of digital design, and the other takes that knowledge and compounds it.

      Granted VHDL is used more in the industry, Verilog is used mainly for modeling. Hell, a lot of storage companies (Seagate, Western Digital to name a couple famous ones) use them in controller design.

      Verilog is C-based, and there's a few good books on it. VHDL doesn't have that many books, and most of the time you need specialized training on it.

    39. Re:Where are you located? by Anonymous Coward · · Score: 0

      I would agree with this. If your student end up using a cutting edge chip once they get out into the real world, I have found that most of the vendor example designs are written in VHDL.

      I found the transition from VHDL to Verilog pretty easy. Your students will probably learn quite a bit if you teach them VHDL first, throw some Verilog at them in the middle, and maybe a mixed design as extra credit.

    40. Re:Where are you located? by NP-Incomplete · · Score: 1
      Learn Verilog. It's been a while since I've used VHDL but the following is why I would not consider using it again.
      • VHDL's strong typing will cause you hours of lost work because of silly things like the differences between std_logic_vector and unsigned. Others claim this is a feature as it prevents bugs due to type conversions. This should be a non-issue when using Verilog as your test suite should test everything. Plus decent simulators/synthesis tools have lint functions.
      • VHDL is far too verbose. It requires replicating the entity definition before instancing it. Now when you change ports(and large designs will require MANY port changes) you get to change them in 3 places instead of 2. In ASIC applications, netlist brevity becomes very important when gate-level fixes need to be made.
      • Many tools do not like VHDL. At least two that I know of require compiling libraries first. With Verilog you can usually just throw a bunch of files at them and the tool can elaborate the design. In ASIC development, you very well may use 5-6 tools other than the simulator and synthesis tool.
      • SystemVerilog is a train wreck, but is advancing Verilog adoption.

      You may want to consider schematic entry if your design is simple enough. At the very least, look at the floorplan of your synthesized designs so you can how much logic it took for each module.

    41. Re:Where are you located? by Anonymous Coward · · Score: 0

      VHDL as it forces the programer to be more specific about their intent. I have had a few cases where I have ended up synthersising something very different to what I actualy wanted in verilog.

    42. Re:Where are you located? by Man+On+Pink+Corner · · Score: 1

      As someone who has spent A LOT of time using both in university, I would say Verilog is the easiest to learn because its syntax is very closely related to C.

      Doing FPGA or ASIC designs?

      1) The syntax is incredibly similar to C. Which is why it is always described as "C like" to people who have very little experience in HDL.

      Syntax doth not a language make.

    43. Re:Where are you located? by Zero__Kelvin · · Score: 1

      You haven't yet figured out that software is merely a special case of hardware. You create a Verilog or VHDL program and run it . The output of the run is a binary sequence that is burned to the device. That binary program output is used to determine which fuseable links to burn and which to leave in tact.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    44. Re:Where are you located? by Zero__Kelvin · · Score: 2, Insightful

      The FPGA doesn't run the Verilog or VHDL program, the FPGA programmer does. The Verilog or VHDL program runs on the FPGA programmer and the output of that program is an FPGA configured in a specific way as determined by the output of the Verilog or VHDL program .

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    45. Re:Where are you located? by petermgreen · · Score: 1

      Also you must learn your synthesis tool. While i'm sure there are cases where code synthisises without any hint as to things being done wrong there are also many cases were it is user error. You really do need to learn how to use timing constraints and the timing analyser that comes with your tool and which warnings are important.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    46. Re:Where are you located? by bwcbwc · · Score: 1

      Why not think of Verilog as a programming language? It has to be the right one though. For example, compare it to Prolog. When you describe the hardware in VHDL or Verilog you are essentially describing the logical rules embodied in the hardware, rather than the process that the logic actually represents. Prolog is a lot closer to this model than a procedural or OO language like C or C++. The key is to step away from a flow-control process model to a set-based logic model mapping inputs to outputs. That doesn't mean you aren't programming, just that you're modelling your program using a different paradigm.

      --
      We are the 198 proof..
    47. Re:Where are you located? by Anonymous Coward · · Score: 0

      When I first started with FPGAs I initially chose to go the VHDL route. I switched to Verilog though when I ran into an arcane error that neither I, my professors, or Xilinx could figure out. I would suggest starting with Verilog as you won't be fighting the syntax like you would VHDL (unless you happen to already know Ada). Like other people have been saying, you have to break the habits you have gotten into when programming sequential processors, they won't work in FPGA. Make sure you read EVERY warning the synthesizer spits out, as it will often quietly "optimize" away important parts of your code. I also like to check the schematic after synthesis to make sure everything looks ok. Good luck and have fun!

    48. Re:Where are you located? by imgod2u · · Score: 2, Interesting

      That's just mixing semantics. The reality is, from a computer architect's world, there is a clear separation between "programs" and "logic". Programs have the features:

      1. They are made up of a finite set of instructions.
      2. They can be arbitrarily as big depending on available storage.
      3. They control functionality.

      HDL's don't create this without some help. You can take an HDL description of hardware and emulate it in software, yes. And you'd have a program. But at the end of the day, synthesis turns it into gates; a mapping of logic cells and wires. That's not a program. FPGA tools will turn that mapping of gates into mappings of its native cells. In Xilinx -- and only Xilinx -- FPGA's, this turns into a bitstream of SRAM bits that might conceivable be called a program. In all other FPGA architectures, it's actually a description of which fuses (or anti-fuses) to burn.

    49. Re:Where are you located? by imgod2u · · Score: 2, Insightful

      Yes and no. The biggest thing people miss most often is that Verilog used in hardware design is really a subset of the language as a whole. The same is true of VHDL. It can be a programming language. It allows you to program procedurally. You can do your loops and conditionals and function calls, etc. There can be dynamic arrays and dynamic types and file IO.

      But none of that is synthesizable. If you want to use Verilog to describe hardware, you have to limit yourself to a fairly small subset. That description is very much not a programming language. The synthesis tool looks at the syntax and "guesses" based on familiar constructs what you're trying to describe. A primary example is a synchronous circuit with an asynchronous reset. You would declare a parallel process (always in Verilog) to trigger on an edge of a clock signal and an edge of a reset.

      In reality, an asynchronous reset is level-based but there is no way to describe such a thing in Verilog. The synthesis tool has to recognize the "always @(posedge clk, negedge reset)" construct and know "that's really a level-based asynchronous reset".

      It's not just a description of boolean logic. In hardware, one has to consider timing.

    50. Re:Where are you located? by Zero__Kelvin · · Score: 1

      I'm sick of trying to get people to understand something that is so simple. I'll just point you to the wiki. You will especially want to read this so you will poised to offer your apology. For those to lazy to follow the link:

      Program Language Interface provides a programmer with transferring control from Verilog to a program function written in C language. It is officially deprecated by IEEE Std 1364-2005 in favor of the newer Verilog Procedural Interface, which completely replaces the PLI.

      The PLI enables Verilog to cooperate with other programs written in the C language such as test harness, Instruction Set Simulator of microcontroller, debugger, and so on. For example, it provides C functions named tf_putlongp() and tf_getlongp() which are used to write and read the argument of the current Verilog task or function, respectively.


      So I can dynamically bind my Verilog program to functions written in another language , to wit C.

      It is a scripting language rather than compiled. It allows the implementation of algorithms, performs bitwise operations, has logic and control flow, and can be run time bound to routines written in another language. It doesn't get any more of a programming language than that ;-)

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    51. Re:Where are you located? by gwjgwj · · Score: 1

      VHDL is far too verbose. It requires replicating the entity definition before instancing it. Now when you change ports(and large designs will require MANY port changes) you get to change them in 3 places instead of 2. In ASIC applications, netlist brevity becomes very important when gate-level fixes need to be made.
      Not really. You can use the notation
      inst_name: entity entity_name port map ...
      without the need for using the component declaration. However, you have to be careful about the analysis order in that case.

    52. Re:Where are you located? by RunsWithMatches · · Score: 1

      I've been a designer of hardware using FPGAs since 1990, which is close to the beginning FPGAs. In that time, about nineteen years as I add it up, I've rarely done a board that didn't have several of both major varieties, Xilinx and Altera. I can say confidently and without fear of contradiction, that the worst software between the two is the one you're currently working with.

    53. Re:Where are you located? by imgod2u · · Score: 1

      Except the Verilog you use for actual hardware description involves none of that. When hardware designers say "Verilog" we mean "Verilog for synthesis". Verilog allows you a programming environment that you can do all of the fancy procedural things. But when you use it to describe hardware, you're limited to a fairly small subset of the language that is anything but programming.

    54. Re:Where are you located? by Zero__Kelvin · · Score: 1

      Who gives a shit. That is like saying that the subset of the C language you use to define data types isn't a language, so C isn't a language. Your point is absurd.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    55. Re:Where are you located? by Mister_Stoopid · · Score: 1

      Agreed Xilinx software is pretty quirky and buggy. All I want is support for spaces in filenames/paths! Is that so much to ask? IS IT?!? That said, things have come a long way since I was in school and it's not nearly as disorganized/crashy as it was back then.

    56. Re:Where are you located? by imgod2u · · Score: 1

      It is a scripting language rather than compiled.

      Verilog is very much compiled. Try writing a verilog module with a faulty assignment at the end and see if it'll run through even the simulation tool. It won't.

      Some of the more popular simulators (VCS, Modelsim) actually create binaries out of the Verilog, associated libraries and invokes GCC for the C-models.

      To ring my point home, take the following Verilog example:

      module counter(preset,set,areset_n,clk,en,dout,tcnt);
        parameter tcnt_val = 32'hFFFFFFFF;
        input areset_n, clk, en;
        input [31:0] preset;
        output [31:0] dout;
        output tcnt;
        reg [31:0] data;

        always @(posedge clk, negedge areset_n) begin
          if(areset == 1'b0) begin
            data = preset;
          end else begin
            if(preset == 1'b1) begin
              data = preset;
            end else begin
              data = data + 1;
            end

            if((data + 1) == tcnt_val) begin
              tcnt = 1'b1;
            end else begin
              tcnt = 1'b0;
            end
          end
        end

        assign dout = en & data;
      endmodule

      1. What is the subtle difference between how this will behave as Verilog (in a simulator) and the real circuit when areset_n is 0 from time 0? What would be a possible solution to this?
      2. What are the potential problems with setting "data" to "preset" under the condition "areset_n == 1'b0"?
      3. What will "data" be when "tcnt" is 1'b1?
      4. Is there anything bad about assigning dout to (en & data)? What would be a reason to do that? What would be a reason to do that assignment inside the "always" block?

      Lastly, if this is a program. Translate it into equivalently functional psuedo-assembly.

    57. Re:Where are you located? by Zero__Kelvin · · Score: 1

      If you cannot figure out that what you posted is a program, there really is no sense in trying to teach a pig to sing ...

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    58. Re:Where are you located? by imgod2u · · Score: 1

      Hardware designers give a shit. Because when designing hardware using Verilog, you don't approach it like it's a programming language. Because the programming parts of it don't work when the synthesis tool tries to map it to gates. Hence, Verilog, when designing hardware, is not programming.

    59. Re:Where are you located? by imgod2u · · Score: 1

      If you can't figure out how that's not a program (and my guess is you can't), then you're a lost cause. I'll give you a hint: it's not a program. The fact you don't understand this tells me you have absolutely no understanding of how hardware logic works and moreover are willfully ignorant and unwilling to learn.

      Can lead the horse to water, etc.

    60. Re:Where are you located? by Zero__Kelvin · · Score: 1

      "The fact you don't understand this tells me you have absolutely no understanding of how hardware logic works and moreover are willfully ignorant and unwilling to learn."

      25 Years of hardware and software engineering experience. I designed the hardware for, prototyped (wire-wrapped), and wrote a small OS and bootloader for a PC/104 compatible motherboard more than 15 years ago single handedly; ... but you're the guy with the clue ... ROTFLMAO

      I wish your moniker was correct and you were God to me. That way you wouldn't exist and there wouldn't be 15 minutes of my life spent dealing with some moron, that I'll never get back.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    61. Re:Where are you located? by Man+On+Pink+Corner · · Score: 1

      Personally I think the other fellow's point was a good one, and illustrative of my own: Because the programming parts of it don't work when the synthesis tool tries to map it to gates.

      When I write a C program, one of three things will happen: 1) The program will do what I told it to do, and work; 2) The program will do what I told it to do, and fail; or 3) The compiler will issue an error or warning message that calls attention to my mistake.

      I've never had to work on ASIC designs that take hours or days to synthesize, so I was no more interested in HDL simulation than I would be in running a board full of TTL chips through SPICE. I approached the Verilog learning process the way you and I both learned C -- write a program, run it on the target hardware, and fix any bugs.

      But at least when using XST with Verilog, I encountered cases where no error or warning is emitted, the logic looks fine to this "programmer"'s eye, yet the "code" does random crap or nothing at all.

      That's not a programming language in my book... or if it is, it's a really shitty one. Yes, you can draw comparisons to multithreaded programming and the need to manage your locks and/or transactions carefully to keep an otherwise-correct program from failing, but the nature of the failure is still quite different. The design I was trying to synthesize had nothing wrong with it, except that XST didn't like the way I was expressing it. A more experienced Verilog user would no doubt be able to tell me what I did wrong, but trust me... no C programmer would tolerate tools this crappy, or language features that could be misapplied in ways that are both syntactically and semantically correct. Perhaps other synthesis tools are vastly better in that respect, but that's not the impression I get from reading similar complaints about the rest of them.

      As far as the rest of the flamage is concerned, yeah, fine, good luck with that. Writing synthesizable Verilog is nothing like writing C. That's all I'm saying, and anyone who says differently is full of bull, regardless of how many PC-104 boards they prototyped with duct tape and a distributor cap or whatever.

    62. Re:Where are you located? by cibyr · · Score: 0, Troll

      I'll have Verilog's ability to own my own gun and point it wherever I like over VHDL's lead shoes (so you can't shoot yourself in the foot) any day.

      VHDL isn't "comparable to" Ada, it's based on Ada - which was designed to be hard to code in. While that link is a joke, it hits pretty close to home (kinda like that "C++ was invented to keep programmers employed" interview, but more believable IMHO).

      I guess Verilog really is C-like in the sense that both languages' type systems don't shy away from the fact that underneath it all bits are just bits, while VHDL/Ada do everything possible to deny it.

      --
      It's not exactly rocket surgery.
    63. Re:Where are you located? by Zero__Kelvin · · Score: 1
      Oh. I see. So what you're saying is that Hardware designers are qualified to determine if Verilog and VHDL are programming languages, because they are clearly experts in the software domain. ROTFLMAO. Here's a hint. I have been an embedded systems engineer for more than 20 years, and I have come to realize that you are gleefully clueless. Enjoy your glee, but there are many here who would actually like to walk away with enough knowledge that they don't blow the interview because they said something as idiotic as "Verilog and VHDL are not programming languages"

      .

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    64. Re:Where are you located? by yakovlev · · Score: 1

      I also agree with this completely.

      I went to a Verilog school and have since moved on to a career with VHDL. Coming from a mixed hardware/software background, I found it VERY tempting to build something in Verilog that looked pretty to my software design eyes but didn't translate to hardware well at all. When this happened, I at least understood what was going on and how I had messed up. For many of my classmates, they had very little concept of how the verilog procedures would be converted into hardware. There were a lot of class projects where I had to explain: "No, you can't have a procedure like that. I know it works in C, but in real hardware that is going to be something like 100 stages of logic because you don't have any latch stages in the middle."

      VHDL tends to be built in a way that is much more like real hardware, with the massive concurrency and limited cycle time characteristics being much more obvious. While it's definitely possible to mess things up, the restrictions of the language tend to make this more clear.

    65. Re:Where are you located? by Zero__Kelvin · · Score: 1

      "But at least when using XST with Verilog, I encountered cases where no error or warning is emitted, the logic looks fine to this "programmer"'s eye, yet the "code" does random crap or nothing at all."

      Yeah. Great point. That could never happen with C!

      "no C programmer would tolerate tools this crappy, or language features that could be misapplied in ways that are both syntactically and semantically correct."

      So what you are saying is that you have no idea what you are talking about, and have never tried to program in C. Trust me. It is very common for programmers - especially n00bs - to write a C program where no error or warning is emitted at compile/link time, the logic looks fine to many programmer's eyes, yet the "code" does random crap or nothing at all.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    66. Re:Where are you located? by Man+On+Pink+Corner · · Score: 1

      So what you are saying is that you have no idea what you are talking about, and have never tried to program in C. Trust me. It is very common for programmers - especially n00bs - to write a C program where no error or warning is emitted at compile/link time, the logic looks fine to many programmer's eyes, yet the "code" does random crap or nothing at all.

      Heh, I only wish I could be considered a n00b at C/C++. Remember, on Slashdot, everybody worked for Dennis Ritchie.

    67. Re:Where are you located? by Zero__Kelvin · · Score: 1

      "Heh, I only wish I could be considered a n00b at C/C++."

      Keep on pluggin' ... you'll get there some day ;-)

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    68. Re:Where are you located? by imgod2u · · Score: 1

      25 Years of hardware and software engineering experience.

      Who's never touched digital design from my guess. Look, code monkey, you're wrong. I've given you examples of how synthesizable Verilog does not behave like a programming language. You didn't get it. You don't want to get it. You probably saw "hey! there's an if statement! it's a program!"

      Kiddie scripting for 25 years means 1. you're out of date and 2. you know nothing about hardware.

      I wouldn't let you anywhere near one of my ASICs.

    69. Re:Where are you located? by imgod2u · · Score: 1

      "What you are designing in HDL is hardware.

      There's some overlap. Stuff like algorithms may be used in both arenas, but the goal of HDL is to make hardware, not programs."

      Sounds pretty straightforward to me. "HDL to design hardware is not a programming language, the HDL has some overlapping features that allow you to make programs".

      So let's add inability to read and comprehend a statement to your menagerie of tendencies. Don't talk about things you know nothing of just to try to boost your own ego and sound smart. You end up sounding like an idiot to anyone remotely familiar with the field.

    70. Re:Where are you located? by imgod2u · · Score: 1

      This is the biggest thing that people have to overcome. Don't worry about it :) The thing you have to realize is that HDL is simply a "hacked together" solution that has never been perfected. Synthesis tools aren't compiling like a programming language compiler, they're guessing. There is no deterministic solution (at least within computable time) for the synthesis process. It has to take shortcuts and fall on non-optimal solutions and (due to the incompleteness of Verilog or VHDL as a hardware description language) sometimes purposely translate circuits that don't have the same functionality as the actual code.

      Take:

      always @(posedge clk, negedge reset)

      for instance. The language is describing that events only happen at the edge of the clk or the edge of reset. But among hardware designers, this syntax has become "tribal knowledge". When synthesis sees this syntax and this exact syntax, it creates an edge sensitive flip-flop with an asynchronous reset. The reset is level-sensitive, not edge sensitive.

      People who aren't careful will have their circuit simulate one way (because the simulator obeys the description of the language) but synthesize into gates that behave differently.

      Why is such a glaring imperfection allows? Simply put, synthesis algorithms are good at recognizing and creating synchronous circuits from a language description. They're altogether rather poor at recognizing and creating asynchronous circuits. Because async resets are so common, this special provision was put inside all synthesis tools to recognize that construct. But try describing a level-sensitive latch, a delay circuit, an asynchronous feedback circuit, etc. The tool will not handle it very well.

      Those things are usually designed by hand.

      I would strongly recommend "HDL Chip Design" by Douglas Smith. It's out of print, still sells for $200+ and is about the best book on chip design you'll ever have.

    71. Re:Where are you located? by imgod2u · · Score: 1

      Ok, I'll bite - what does VHDL give you control over that Verilog doesn't?

      Most of it has to do with typing. There really isn't much in Verilog. An anecdotal problem is getting:

      data = array[addr+offset] to synthesize with "addr" being the bitsize you want. Even if offset and addr are both 16 bits, there's a good chance the integer result will be 32 bits and you'll find a lot of registers used for the address bus.

      VHDL strong types it. It doesn't allow this type of ambiguity. Granted that's not a limitation of Verilog. You can be anal and not use the shorthand for addition inside an array address. But most would :)

    72. Re:Where are you located? by Zero__Kelvin · · Score: 1

      You are one phenomenally stupid motherfucker. And by that I mean I have no doubt you are a retarded pseudo-human that beyond a shadow of doubt has had sexual intercourse with the pseudo-human from which you were born.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    73. Re:Where are you located? by SydShamino · · Score: 1

      after a week training course write in it with professional quality

      This is what suits actually believe.

      This is what I believe, and I'm a good engineer who codes professionally in VHDL, but has never coded in Verilog (although I have read and understood Verilog files as required).

      --
      It doesn't hurt to be nice.
    74. Re:Where are you located? by SydShamino · · Score: 1

      Hrmpf. VHDL different than a programming language? It's a programming language. The kind that does its best to drive you into insanity by requiring to litter your code over and over with typecasts no matter if you know what you are doing.

      VHDL is a hardware description language. It's not programming, and thinking of it as such is what makes programmers (like you, I assume) struggle with it.

      With regard to type casting, you know that with strict type definitions you can define your own overloaded functions, right? If you hate casting your enumerated type into std_logic_vector everywhere, for example, you can write functions in a package to define "=" and "=" and "and" and "or" as you wish, then write your code to be clear and readable.

      --
      It doesn't hurt to be nice.
    75. Re:Where are you located? by SydShamino · · Score: 1

      The first "=" was supposed to have a less-than sign in front of it, for signal assignment. Silly slashcode.

      --
      It doesn't hurt to be nice.
    76. Re:Where are you located? by Man+On+Pink+Corner · · Score: 1

      I would strongly recommend "HDL Chip Design" by Douglas Smith. It's out of print, still sells for $200+ and is about the best book on chip design you'll ever have.

      Thanks; I'll have a look for that one. That's the same Douglas Smith that wrote the popular DSP book, right?

  2. You forgot by OAB_X · · Score: 2, Funny

    You forgot a few:

    Linux vs. *BSD
    VI vs. EMACS
    Gnome vs KDE

    etc.

    1. Re:You forgot by Anonymous Coward · · Score: 0

      Nikon vs. Canon
      Republican vs. Democrat
      Ford vs. GM

    2. Re:You forgot by vrmlguy · · Score: 1

      You forgot a few:

      Linux vs. *BSD
      VI vs. EMACS
      Gnome vs KDE

      etc.

      It's emacs vs vi, you insensitive clod!

      --
      Nothing for 6-digit uids?
    3. Re:You forgot by XPeter · · Score: 2, Funny

      Ford vs. GM eh?

      No competition here, they'll both be going into bankruptcy soon.

      --
      "The difference between genius and stupidity is that genius has it's limits" - Albert Einstein
    4. Re:You forgot by tommituura · · Score: 3, Funny

      You forgot a few:

      [--]VI vs. EMACS [--]

      etc.

      No, he didn't forget that. You see, he wrote:

      (...Or is this an eternal, undecidable holy-war question along the lines of ATI/nVidia, AMD/Intel, Coke/Pepsi, etc...?)

      ... and it's quite clear that VI is the winner.

    5. Re:You forgot by RoFLKOPTr · · Score: 1

      You forgot a few:

      Linux vs. *BSD VI vs. EMACS Gnome vs KDE

      etc.

      Well Gnome and KDE both suck, so that argument is irrelevant.

    6. Re:You forgot by SydShamino · · Score: 1

      ?? What you state makes no sense. I use VI as my text editor and EMACS as my operating system.

      --
      It doesn't hurt to be nice.
    7. Re:You forgot by SydShamino · · Score: 1

      Ford is in pretty good shape, not because of their truck divisions but because they didn't abandon cars entirely and join their competition in a round of "Americans! Ugrg Ugrg big trucks low mileage screw quality!". While I have only briefly driven them, I understand that the Ford Focus is a rather popular, higher-quality vehicle for its price range. Cars like that saved them more than anything else.

      --
      It doesn't hurt to be nice.
    8. Re:You forgot by boiert · · Score: 1

      VI vs. EMACS ...

      ed

    9. Re:You forgot by tepples · · Score: 1

      and it's quite clear that VI is the winner.

      GNU Emacs can simulate vi (Viper-mode). Can Vim simulate Emacs?

    10. Re:You forgot by sdiz · · Score: 2

      GNU Emacs can simulate vi (Viper-mode). Can Vim simulate Emacs?

      sure. :!emacs

    11. Re:You forgot by FlyByPC · · Score: 1

      Yep. I left out the whole vi vs emacs question. emacs is Lisp, and therefore evil.

      ...but then again, I prefer DOS Edit to both of 'em, so take what I say with a large grain of salt!

      --
      Paleotechnologist and connoisseur of pretty shiny things.
    12. Re:You forgot by shutdown+-p+now · · Score: 1

      I write my VHDL in Emacs running in a Gnome terminal on BSD, and that's how God intended it!

  3. Schmatic layout? by Sillygates · · Score: 2, Interesting

    I'm in Computer Science, a somewhat related field, and I've had to take a few hardware courses during my time in school.

    I felt like Xilinx Schematic layout was a great first step, because it introduced the circuit theory in a visual way.

    --
    I fear the Y2038 bug
    1. Re:Schmatic layout? by samirbenabid · · Score: 1

      I second that.

    2. Re:Schmatic layout? by amigabill · · Score: 1

      That's a good point, but many students will have already been exposed to schematics in earlier prerequisite courses before being tossed into an FPGA class. In the real word today, people are using vhdl and/or verilog and or other languages isntead of schematics for FPGA work. Look at those FPGAs today, holding millions of gates to use, it'd be unreasonable to design for that using schematics. Look at available resources like opencores.org which have open-source projects/cores in vhdl and in verilog. In the real world, the simulators most in use today are verilog and/or vhdl and/or other languages.

      I think it'd be nice to have some exposure for your students in what is done in real life as well as whatever benefit there is to starting with schematic. Perhaps this FPGA course could be a follow up to a more basic digital logic design course showing schematics etc. as a prerequisite?

    3. Re:Schmatic layout? by Anonymous Coward · · Score: 0

      I agree with this. I started with VHDL, discovered the hard way that most of the language is aimed at modelling and simulation, not physical FPGA programming, and started again with schematic capture. Once I got up to speed with schematic capture, it became obvious which parts of VHDL were actually usable for FPGA programming, and which were only useful for generating simulated test inputs and responses. The problem with VHDL and Verilog is that they look like really general programming languages, and indeed they can be used that way for simulation and modelling, which is what they were originally designed for. However for FPGA programming, only a small subset of these languages can be used, and until you understand how the compiler converts that subset into gates, then using them is a very frustrating experience. Once you understand the limitations of VHDL in actually programming FPGAs, the combination of this and schematic capture with VHDL testing code in a simulator is very powerful. So VHDL or Verilog are essential tools, but I would recommend starting with schematic capture, and then go on to explaining how to implement that layout in VHDL/Verilog, and only describe the higher level parts of the languages when you come to writing simulated code to generate test inputs in a simulator.

    4. Re:Schmatic layout? by Anonymous Coward · · Score: 0

      I am a Computer Science student who took a similar course to what you are describing. We learned on the Xilinx program too and I have to say that learning how to use the Xilinx Schematic program before learning how to program in Verilog/VHDL was a great deal of help as it allowed us to understand how to read the diagnostics. That said, I learned VHDL and felt that it was almost identical to Verilog in the scope of the class that I am in, I imagine that there will be major differences in the future however, at the introductory phase, I would not worry about it.

    5. Re:Schmatic layout? by Anonymous Coward · · Score: 1, Insightful

      Absolutely not. If you want more than just sample logic circuits, schematics are a dead-end.

      In my second university year (Electronics Engineering), I chose a semester-long microprocessor design project. They showed us how to make it using schematic, and everybody did it like that. I found it to be a debugging nightmare. Up until one day before the deadline, I couldn't find the bug in the implementation of a particular opcode (It took me about 2 weeks to design & enter the schematic and 4 weeks debugging and fixing things).

      That's when I gave up, dumped the whole schematic, started learning Verilog from examples and capturing my design using Verilog instead of schematic. I finished it in more or less 8 hours (and I even slept that night).

      As about Verilog vs VHDL, all I can do is send in this link:
      http://www.see.ed.ac.uk/~gerard/Teach/Verilog/manual/Example/lrgeEx2/cooley.html

    6. Re:Schmatic layout? by SydShamino · · Score: 2, Insightful

      No one is doing schematic design for FPGAs any more. If you want to teach schematic design, get a schematic capture and layout package and teach PCB design. There are plenty of things to learn at the board-design level, too, and you can teach some of your circuit theory that way if you wish.

      --
      It doesn't hurt to be nice.
    7. Re:Schmatic layout? by negro_monolito · · Score: 1

      Xilinx schematic layout is okay for sophmore or beginning undergrad courses, however it is very frustrating to use for anything more complex. Specifically, the custom logic portion where you define your own logic and then "wire it up" to the predefined NAND or NOR gates is poorly thoughtout. Usually when you back and make changes to your custom logic, the schematic capture still uses the old logic (it lacks any real make file capabilities). That said, I have heard the Altera equivalent is much better (though I have never used it). This coming more from a CompE/EE side though.

    8. Re:Schmatic layout? by Smallpond · · Score: 1

      The one exception being in the final high-speed I/O stages: serializers, clock generators etc. are better done at the gate level because HDLs still don't give you enough control over time constraints.

    9. Re:Schmatic layout? by SydShamino · · Score: 1

      Have you looked at SDC-based time constraints? Altera has already moved there with TimeQuest. They bring the FPGA world up to the time-constraint-quality of ASICs. Xilinx I'm sure will move soon as well.

      --
      It doesn't hurt to be nice.
  4. don't focus on the language by downix · · Score: 3, Insightful

    First mistake I always find in these courses is to focus on the language, and not on the skills necesary to make full use of them. I would actually focus the course on your existing schematic and know-how, and bring in the languages used later on, preferably both presented alongside such as SystemC. But that know-how will be far more valuable than any single language possibly can be.

    --
    Karma Whoring for Fun and Profit.
    1. Re:don't focus on the language by vlm · · Score: 1

      Absolutely seconded. If you understand:

      Interfacing hardware (so the labs can control real world stuff, even if only a LED),
      Logic including all kinds of flipflops,
      race conditions (folks whom started programing on CPUs always have trouble adjusting to this),
      fork/join (and whatever the VHDL equivalent is),
      initial vs always (initial as a type of always that only runs once or whatever),
      parallel "programming" in general,
      computer or other system interfacing,

      then, and only then, you're all set to do both Verilog or VHDL. Even if you can only do one or the other in lab, try to at least gloss over both at lecture time.

      Designing a class by starting with the specific lab tool is kind of like designing a literature class beginning with word processor font selection.

      If you don't know the theory, you're lost lost lost no matter if you choose Verilog or VHDL.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  5. VHDL of course by wiredlogic · · Score: 4, Interesting

    Let's put it this way. I once implemented a subset of TCL in pure VHDL to implement feature rich scripting for simulation data. That can't be done in Verilog without dropping out to C.

    --
    I am becoming gerund, destroyer of verbs.
    1. Re:VHDL of course by Anonymous Coward · · Score: 0

      systemVerilog

    2. Re:VHDL of course by scatterbrained · · Score: 1

      Sounds like an argument against VHDL to me... Verilog PLI (programming language interface) was for years one of the things that made verilog better than VHDL. (And it's not just C, there are PLI bindings for scripting languages, too). Not to mention using a simulator like ModelSim you can write Tcl code to interact with the simulation without resorting to tricks like this.

      --
      -- All that's left of me, is slight insanity, whats on the right, I don't know. -- Bob Mould
    3. Re:VHDL of course by Anonymous Coward · · Score: 0

      Forget the PLI unless you really need the full power of a software language. SystemVerilog gives you classes with some basic inheritance, among other things. Companies using verilog are definitely going in that direction.

    4. Re:VHDL of course by pem · · Score: 1
      "That can't be done in Verilog without dropping out to C."

      I don't know that I'd want to do that in Verilog, because dropping to C is fine, but -- you do realize that Verilog is Turing-complete, right? IOW, you could write a TCL interpreter in Verilog if you were masochistic enough to do so. (Or if you were slightly brighter, you could say "Hey, I can interface C to Verilog, and I have this TCL interpreter C source code. Gee, I wonder if I could connect them?")

  6. Learn Both by cthulhuology · · Score: 2, Insightful

    Seriously, learn both. The languages aren't that far apart in reality. VHDL is simply a little more verbose. Both can be learned to an extent that you can make sense of most of the designs on OpenCodes.org in a day. (Yes I said a day! At least that is how long it took me.) There's really no good reason to avoid the little bit of work, that will make your life easier in the long run. If you really want to learn to program FPGAs you need to learn to read other people's designs. Many of the things you won't just figure out playing around with FPGAs have been solved by other people who have kindly placed designs under open licenses. However, since you have no idea which design language it will be, it is better to become familiar with both the popular ones. Eventually, you'll inevitably choose one for your own projects, and the only way to adequately assess them is to use both for a while and figure out which one meets your needs and you can tolerate.

    1. Re:Learn Both by JewFish · · Score: 1

      Did you mean OpenCores.org?

    2. Re:Learn Both by OeLeWaPpErKe · · Score: 0

      Opencodes ? You mean http://opencores.org ?

    3. Re:Learn Both by Anonymous Coward · · Score: 0

      OpenCores.org, you mean.

    4. Re:Learn Both by sandGorgons · · Score: 1

      I would say learn VHDL first - there is a reason for this. VHDL is more stricter in checking for constraints, which has a true basis in hardware. For example, you cannot read from an output in VHDL, while you can read from outputs in Verilog2K. Also, all the synthesizers (these are the compilers from say Xilinx , and if you move to ASIC design, from Synopsys, etc.) are much more lenient on Verilog - for example assigning to the same wire cannot happen twice (essentially meaning HDL is single static assignment) - in Verilog it is allowed and can generate a multiple driver netlist, leading to a "U" situation. If you are starting up - I would strongly suggest VHDL - if you are working on stuff, I would say Verilog is much easier. However, it depends on Europe vs USA as well (with a preference for VHDL vs Verilog)

  7. Verilog, at least where I work by amigabill · · Score: 3, Informative

    I work at a chip company doing ASIC and custom SOC microprocessor stuff. We mostly use verilog here for our stuff. Most of the VHDL I see comes from customers, which often gets blended into our verilog platforms. All our RTL IP cores are verilog that I know of, at least that I've used/seen, and our integration work to make platforms out of all the IP pieces is verilog. What we synthesize to gates is also a verilog gates netlist result that goes to place/route into silicon.

    In college the class I took that involved this sort of thing was in VHDL, and I hated that. had me really nto wanting to do this kind of work, I was really happy when I was exposed to verilog and I didn't hate it, and I've been a chip guy for over 10 years now.

    But as I understand, VHDL is far more popular in some locations, and verilog in others, so jobs in other locales may be completely opposite to my work environment. It would probably be nice to show some of each to be a little familiar with both such as comparing/contrasting = to = and == to ===, but focus on one or the other for people to really get experience fitting pieces together and learning the general stuff about RTL design, etc. that are not as dependent on what language you use.

    1. Re:Verilog, at least where I work by amigabill · · Score: 1

      I meant comparing = to <= up there. Sorry, html ate my less than char

    2. Re:Verilog, at least where I work by Anonymous Coward · · Score: 0

      VHDL is much more prominent in Defense and aerospace. I don't know if it's still that way, but the DoD contracts required VHDL usage and that has carried forward into most of those related fields. The main reason according to the gray beards I work with is the strong typing of VHDL. VHDL definitely will not let you shoot yourself in the foot as easily. However, the new VHDL spec is a little loose with some of the things they're doing.

      In practicality, the biggest differences between Verilog and VHDL for RTL design are in the constructs you don't typically use. Once you figure out how to do a 'process' in verilog and where to stick combinational blocks, the small quirks aren't too hard to get over. Because of the risk in letting the synthesis tool do the design for you, you aren't going to be using many of the higher language constructs (well I don't see it anyway, and our backend team would flog you if you used some things). Keep it simple, use it as a HDL and not a programming language and whatever you pick shouldn't be a big deal.

      As a side note and as others have mentioned, I think SystemVerilog will be the #1 going forward. SV2001 gave us all kinds of great verification tools and SV2008 looks to give us a few more but far more RTL and HDL tools. From a cost and speed point of view, being able to reduce tool costs as well as negating cross-language simulation speed should get most of the VHDL holdouts to switch. I know we're really pushing it anyway.

  8. Just pick one by 91degrees · · Score: 1

    Once you understand the concepts, switching to the other is relatively easy.

  9. Verilog in Silicon Valley by Bill+of+Death · · Score: 2, Informative

    I've worked at several top chip companies in Silicon Valley, in graphics and telecom industries, and they're 100% Verilog. I also suggest learning System Verilog as well, especially for testbench development.

    1. Re:Verilog in Silicon Valley by OutputLogic · · Score: 1

      I agree. I've been in Silicon Valley for the last 9 years working in different companies doing FPGAs. It's all Verilog. I think Verilog rules not only in Silicon Valley, but the entire west coast

      - outputlogic

      Visit outputlogic.com : tools that improve productivity

    2. Re:Verilog in Silicon Valley by eyal0 · · Score: 1

      Also agree. VHDL is the dinosaur. Verilog is the way to go. SystemVerilog is also a bonus. It's now a standard and while not as powerful as Vera or SpecMan, it's getting better and still much less expensive. Many companies are switching to SystemVerilog for cost. Recent graduates will probably write more SystemVerilog than Verilog in their first years at work.

  10. Learn Both, and add System Verilog to the list. by gwait · · Score: 2, Insightful

    Learn both, but start with Verilog. Many of VHDL's features are a bit academic, but once you know what is relevant from Verilog it makes it easier to find the "usable subset" of VHDL that's actually good for FPGA design.

    System Verilog is the new kid on the block - they ironed out some of Verilog's oddities and added in some of VHDL's very useful features.
    Altera already offer System Verilog support, Xilinx support is apparently on the way.

    Verilog is a lot easier to learn in general, but VHDL has a great feature ("Records") which are akin to "structures" in C that Verilog doesn't offer.
    System Verilog does, which is why it's on my list to learn next.

    One other poster made a good point - learn logic design first, then make the language describe the logic for you.

    If you don't have a clear idea in your mind how to map out a design in gates and flipflops, (block diagram on a whiteboard is always good) then you should not start coding in an HDL..
    Both languages can lead you down the path of unsynthesizable nonsense that seems to simulate ok..

    --
    Bavarian Purity Law of Rice Krispie Squares: Rice Krispies, Marshmallows, Butter, Vanilla.
  11. VHDL by Anonymous Coward · · Score: 1, Funny

    Very Hard Dumb Language

  12. VHDL by sharp3 · · Score: 2, Informative

    My university has been very successful using VHDL in our intro embedded programs. Check out this book on VHDL programming: http://www.amazon.com/VHDL-Digital-Design-Frank-Vahid/dp/0470052635

  13. Verilog all the way by Anonymous Coward · · Score: 0

    It's much quicker to get things done in Verilog than VHDL. You need to know Verilog if you want to deal with post-synthesis/layout netlists anyway.

    Also, SystemVerilog is where the future is, so much better to start with Verilog than VHDL.

  14. Clearly VHDL by HBSorensen · · Score: 1

    I hold a Bachelor of Science in Electronics Engineering and did quite a few projects on Xilinx FPGAs the last couple of which I did in VHDL. Love the language. Easy understandable and using the Xilinx Developer Software ( incl. Schematic tools ) development was a breeze. :-D Also did VHDL in the industry.

    --
    Never buy Sony CDs - they will open up your computer to anyone..
    1. Re:Clearly VHDL by negro_monolito · · Score: 1

      I also have a BS in CompE and an MS in EE, while VHDL is usually taught first not learning Verilog will only handicap you. Since you mention Xilinx FPGA you are no doubt aware that Digilent builds many boards for the academic environment. In many cases, Digilent provides reference examples in Verilog only, especially on their old XUVP2P (sp?) boards. In my lab, I had to teach the students a little bit of Verilog to be able to read the provided reference designs (they only had been taught VHDL in class).

      You (not you specifically, but engineers/students in general) soon learn that what is taught in class is not necessarily the most useful or directly applicable method for real-world designs. E.g. finite state machines are taught, but often a design can be done with a counter just as easily.

    2. Re:Clearly VHDL by Tacvek · · Score: 1

      The odd thing is that Digilent is a VHDL shop. The other product examples are almost exclusively VHDL. So my guess is that Xilinx wrote many of the examples for the XUPV2P (Xilinx University Program Virtex 2 Pro) boards. Xilinx is a mixed shop, with different teams apparently using different languages. (I own a XUPV2P board, but in coursework have only worked with the Nexys and Basys boards.)

      --
      Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
  15. Verilog - Hands down by Bearington · · Score: 1

    My University used VHDL for our FPGA class because that was what the professor was familiar with. However, I found that around 75% of the reference material that I was able to find on the internet was written in Verilog. It would have been much easier if I had been writing verilog.

    1. Re:Verilog - Hands down by Anonymous Coward · · Score: 1, Insightful

      My undergraduate also taught us VHDL on Xilinx FPGAs. I haven't written a line of VHDL in 5 years, whereas I've done 4 internships (AMD & ARM) which all required Verilog knowledge and TAed a senior-level FPGA course (in Verilog) for the last 2 years. As far as the majority of industry goes, teaching Verilog will be of more use to your students (in addition to being much less verbose - the scale of their projects likely does not require much of VHDLs additional functionality). Also in the last few years (Verilog-2001), Verilog has addressed many of the shortcomings it had against VHDL. Automatic sensitivity lists, named ports, generate statements, etc.

      In TAing this course, I've found Xilinx tends to prefer VHDL (some of their reference documentation and functionality of EDK requires some VHDL knowledge). I believe internally they are a VHDL house. Though this is a mild annoyance (one you many never encounter), I've found students do fine in using their toolchain with verilog.

    2. Re:Verilog - Hands down by Tacvek · · Score: 1

      I'm pretty sure Xilinx was once a VHDL house, and is now mostly a mixed house, with the major exception of the EDK team. As such some documentation is still skewed towards VHDL, but if you are not using the EDK, it is not that bad. Besides, VHDL is trivial to read and understand even if you are not familiar with it. (Assuming you are at least familiar with Verilog). (Writing it is definitely harder without being familiar with it).

      --
      Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
  16. Both Suck by shinsplints · · Score: 1

    Both languages are old and the tools you have to deal with are incredibly complicated. I really don't think it will matter which you pick (I personally see Verilog used more in universities, but that doesn't make it the right choice). What you do need to worry about is coding style. Most students learning an HDL for the first time will come in with programming experience. They're going to try to use programming constructs and loops that, while appropriate for normal code will not represent synthesizable hardware. With that in mind you need to pound style rules into their heads. Since one of primary functions of each language is simulation (as opposed to synthesis) using legal code may lead you into trouble. Get around this by enforcing strict style rules. Example set of Verilog rules: http://www.eecs.umich.edu/eecs/courses/eecs470/tools/verilog_guidelines.pdf [eecs.umich.edu copied from C. E. Cummings, âNonblocking Assignments in Verilog Synthesis, Coding Styles That Kill,â SNUG 2000. (http://www.sunburst-design.com/papers/CummingsSNUG2000SJ NBA.pdf)) Every time you code remind yourself "I am writing hardware".

  17. Neither are very productive languages by Anonymous Coward · · Score: 0

    Both are like using assembler. Useful for educational purposes, but someone using a higher-level language will have a productivy advantage. Look at CDL Cyclicity for a higher-level example (on source forge). It compiles down to verilog.

  18. Another thought by amigabill · · Score: 1

    Who's teaching the course, you? Have a look at them and see if you have a strong preference. Most people do one way or the other. I like Verilog and hate VHDL. I think the instructor should teach what he's more comfortable himself, so you're all more confident that he's teaching it correctly and not tossing out things that are confusing and may be somehow inaccurate in that language he's not as good with. I could help someone understand Verilog, but I would be a horrible teacher/mentor/tutor in VHDL trying to read and understand my answers to questions from the same (and/or other) books the students have. Other people are likely the reverse. Which way does this intructor for your course go? It'd be nice to find that out before you choose the wrong language for him.

    Of course a superb instructor would be fluent in both, and more, but it'd be nice to avoid focusing on a good but fluent in only one teacher's weaker language.

  19. VHDL by Anonymous Coward · · Score: 0

    I have taught both for use with Altera FPGAs. IMHO VHDL is better for teaching our students. The main problem we have here is that most of the students have already had lots of experience programming C++, java, pascal... One would think this is an advantage, however most of the students then program hardware like they would a software program. This just does not work. VHDL, is a strong typed language, and there are well defined sequential and current statements that fit well with hardware. Its not perfect, but I think it allows the students to differentiate a software and hardware program better. Lastly, from my experience, if you know one hardware language, it is not too difficult to pick up the other.

  20. We use Verilog, and I recommend it. by Shickdawg · · Score: 1

    At the university I teach at (Michigan Tech), we have selected Verilog design for our Altera FPGAs, and have been using it for 5+ years. I used Verilog in private industry before I started teaching and it *seemed* to be more common at that time. When I did some time at IBM back around 1998, they were using VHDL. One of the companies that hires a lot of our grads uses VHDL, and I keep having to tell students, "Look, if you know Verilog, all you need to get a handle on is the syntax of VHDL. Tell them that!"

    Knowing both, I find students struggle enough with the concepts of logic design and simulation when they have a familiar kind of syntax (the C-based syntax of Verilog), let alone adding the complexity of VHDL's strange ADA-based syntax. I suggest Verilog.

    1. Re:We use Verilog, and I recommend it. by SydShamino · · Score: 1

      I work for a company that might be the VHDL-user you mention. I think students who learned VHDL produce code closer to production quality sooner, but it's not very different as you state. Verilog students just need more time to get used to the increased structure requirements of VHDL. I don't ask questions that require either during interviews - the underlying logic of system design is far more important.

      If Verilog is moving towards stricter types as I've heard it to be, this difference will close up soon.

      (Note that I learned neither in college but was hired based on that underlying logic basis. My HDL education started with a course offered by my employer. It now represents some 80% of my daily work.)

      --
      It doesn't hurt to be nice.
  21. View from an undergrad by RabidTimmy · · Score: 2, Insightful

    I'd say I'm right about in the position you're talking about. I'm getting close to finishing my degree and a lot of the work I've done has been with FPGA's. My introductory class to the area used verilog (although no procedural, code for flip flops was given to us to instantiate). The next course we used VHDL and have used VHDL extensively since then. Both VHDL and Verilog have there strength and weaknesses but overall, for anything an undergrad will be doing, there are no significant difference in functionality. The only real difference I could see coming into play here is which would be easier to pickup. Verilog has a syntax similar to C. Operators are the same, variable declarations are similar. This is in stark opposition to VDHL that has a syntax that is distinct from anything other language I've ever seen. Then VHDL really contains 2 languages in itself, concurrent and procedural, which for whatever reason have completely different syntax. I still find myself on occasion referencing the syntax for some parts of procedural. So actually learning the syntax, I give it to Verilog. It is familiar looking (I'm assuming everyone taking said class will at least have some background in C) and easy to catch onto. The real kicker for me to advise VHDL over Verilog is that VHDL is strongly typed where Verilog isn't. Being a beginning class, you can expect the students to make a lot of mistakes. VHDL will complain at compile time and just crash throwing out a million error messages. Verilog will happily try to run it if at all possible meaning you may not find the bug until you've searched through the simulation results which can take a while. This is something that can get prevented(ie. 4 bit addition being stored to a 3 bit variable or comparing an unsigned value to a negative) by VHDL strongly typed nature. At least for me, and probably most students, it's nicer to get the complaint when I compile it than it is to go search for an error in the output. Lastly, this I'm not as familiar with, but I understand that Verilog is more heavily used in industry whereas most government contracted stuff is done in VHDL. I don't know if this factors into your decision or not. So my suggestion, if the students seem competent and can avoid simple mistakes, either language will do but Verilog might be slightly quicker to learn. But if it seems that they will be error prone, VHDL is probably the better choice.

  22. How about Haskell? by isd.bz · · Score: 1

    FPGAs, you say? How about prototyping in Haskell? Here is a link to some videos describing the process.

  23. VHDL, then Verilog by Anonymous Coward · · Score: 0

    VHDL has a lot harder learning curve than Verilog, so it would be better to learn VHDL in a classroom environment. Once you learn VHDL, Verilog is cake to learn. I can say this from experience.

    I've heard going from Verilog to VHDL is a painful process. Either way you learn them though, make sure you know them both.

    1. Re:VHDL, then Verilog by gwait · · Score: 1

      Agreed, I started in Verilog (7 + years in industry doing asic and fpga design) then had to learn VHDL.
      It was a bit of a steep learning curve (even though I had also used many of the pre Verilog/VHDL languages - palasm, abel, etc).

      I've worked with a number of people who started off in VHDL, then found verilog easy and a real treat.

      The thing with VHDL is it has far more academic baggage that is of little use in the real design world, but it takes a while to work out what the usable subset of VHDL is, also the whole library overloading scheme makes it tough to sort out - if you have old VHDL code with synopsys libraries, signed arithmetic and all the conversions are different than if you use the new IEEE libraries,
      I didn't expect the "core functionality" of VHDL to change so dramatically when linking in different libraries!

      System Verilog looks like a good answer for the future.

      --
      Bavarian Purity Law of Rice Krispie Squares: Rice Krispies, Marshmallows, Butter, Vanilla.
  24. Rocky's Boots! by Plumber,+Programmer, · · Score: 1

    I know it's a little "old school," but have you considered using Rocky's Boots?"
    It's been a few years since I used it, but I thought it was a great tool at the time.

  25. VHDHell? by s-orbital · · Score: 1

    As a computer Science major, I only had one class involving this sort of thing, and it used VHDL. We all hated VHDL, and though I've never even used Verilog, and have only seen if briefly, I've heard others say its much better to deal with the VHDL. But then again this is all from memories I have from 3 years ago, and like I said, I've never used Verilog, so take this with a grain of salt.

    --
    Patent: from Latin patere, to be open
  26. verilog is less of an obstacle by scatterbrained · · Score: 1

    I assume the intent is to teach about how to get your logic into an FPGA, what the internal structures look like, how synthesis maps from language into implementation, etc.

    Any good designer has a mental model of what logic is going to get synthesized by a particular snippet of code, I find verilog gets in the way of expressing that model a lot less than VHDL, so I would say verilog is a better choice, in that you can get to the subject you want to teach much faster. Way less time explaining all the VHDL verbosity just to get to a working example.

    --
    -- All that's left of me, is slight insanity, whats on the right, I don't know. -- Bob Mould
  27. Anonymous Coward by Anonymous Coward · · Score: 0

    Both. I'm an EE that has worked a little with both and frankly the subtle differences and blatant ones as well need to be covered to fully understand the concept of what an FPGA does. Yes certain markets have preferences, but it would be like teaching a computer scientist only one system. You can emphasize one, but dont screw the other over and forget it entirely. Plus the implementation of FPGA's is not simply a focus of the language. The use and design of FPGA based systems is more complicated than its language. You can make hardware do alot with different software ways. Not gonna lie, this is another holy war and everyone has their opinion. As a student the objective is to learn as much as possible and not simply "develop a preference" and teaching both puts the decision on the student as to which they prefer.

  28. It doesn't matter...just pick one by Anonymous Coward · · Score: 0

    Every camp has their proponents, so it doesn't matter. Just pick one, both work equally well.
    I personally use VHDL right now, but at some other company, it was Verilog. You probably don't have time to mess with both if the whole point is to do FPGA, not learn a hardware language.

  29. Handel-C by chetbox · · Score: 1

    I did a similar course about a year ago and we used Handel-C. Assuming your students have coded in C before they do not have to worry about picking up the syntax, but rather they can focus on the parallel aspects of embedded programming like parallel execution and channels. I found it adhered to ANSI C reasonably well and actually improved my knowledge of the hidden depths on data representation in C. It "feels" like using C but with a few Occam-inspired macros to help create parallel code. The similarity between C and Handel-C also helps to bring home concepts like recursion is not possible in hardware, but iteration is. Also the documentation is thorough and clear. The reason we were given for using Handel-C over VHDL was the difference in overhead of learning a new syntax and of lower-level programming. I guess the downside is that the resulting circuits are likely to be much less efficient than in VHDL.

    1. Re:Handel-C by ccvqc · · Score: 1

      I taught a lab course using Handel-C for a few years, and would recomment it highly; I was trying to get computer science students to be able to "think parallel" as one could do only in hardware -- but which is crucial for transitioning software developers into the multi/many core realities. Unfortunately, Celoxica has sold the Handel-C/DK development environment, and it is not clear whether it will actually stay around much longer. So I wouldn't adopt it now.

      Xilinx is great, but I now use a $150 prototyping board from Altera in another course, and they provide great academic support for their "Quartus" IDE, which lets the students combine modules developed as schematics, in Verilog, in SystemVerilog, in VHDL, as a state diagram, and/or in AHDL. It seemed easier to me to bring the students up to speed on Quartus compared to Xilinx' "ISE". (Xilinx was the backend for Handel-C, and I just never got used to using the front end, so I'm not really comparing the two, just saying that the toolchain from Altera is good and that there are good inexpensive protoyping boards from them too.)

  30. mixed mode all the way! by yaksha · · Score: 1

    As an undergraduate we studied both VHDL and verilog in our course. Actually students need to know both as there are options of writing VHDL code inside verilog code these days. Personally I prefer both.

  31. Schematic Capture or Icarus Verilog by OrangeTide · · Score: 2, Informative

    In many ways schematic capture is an easier first step. You can hold off on Verilog or VHDL until you have made every flavor of flip-flop yourself. If you can get logic that has a few to several dozen gates to work first, then you can consider an HDL. And it doesn't really matter too much. There are pros and cons to each, and different industries prefer different languages. Actually different regions of the world prefer different languages too. Verilog is extremely popular in Silicon Valley, but on the East Coast you will find a lot more people using VHDL.

    Many who prefer one over another do so because of features for doing verification. Until you know what verification is all about you probably won't be able to make an informed decision.

    This fact makes it easy for most people: Icarus Verilog is open source, free and multi-platform. And useful for doing verification work, and also is capable of generating netlists to use with your favorite Xilinx or Altera parts. I'm not saying it's amazing or anything, but it does have some advantages for a hobbyist doing small projects.

    --
    “Common sense is not so common.” — Voltaire
  32. systemVerilog by Anonymous Coward · · Score: 0

    I'll go out on a limb here: SystemVerilog . It is the obvious future of HDL for both RTL and verification

  33. Check the maker by thomasinx · · Score: 1

    I'm seeing a lot of people complaining about VHDL and praising verilog, but I've used both and I'd say that the difficulties encountered with one will be seen with both. A lot of these complaints are just people who did some programming in VHDL and hated it. Using an HDL is not like using a normal programming language, and getting over that hurdle is what will be difficult for most people.

    As far as what to teach in the class, identify what hardware you are going to use first, and then look at the tutorials supplied by the company supplying the boards. Most companies (Xilinx, Altera, to name a few) have tutorials they supply to use on their boards, that you can use as a first-step in designing coursework. I would make the language decision after checking what is supplied by the company.

    -T

  34. Neither by nurb432 · · Score: 1

    No really. There are tools for us old timers that let you design at the gate level, and then will create the code for you.

    --
    ---- Booth was a patriot ----
  35. Defense vs. Commercial by Anonymous Coward · · Score: 0

    I would argue that it also depends on what industry you eventually see the students going into. While a lot of people may like verilog better (myself included), almost ALL defense/military systems are written in VHDL. Their claim is that VHDL forces coders to be more careful and prevents some errors commonly made in Verilog from appearing.

  36. Verilog - larger market share and dangerous by xlr8_joe · · Score: 3, Insightful

    Having worked in Silicon Valley and in Europe I have lived through some great battles of Verilog vs VHDL. Even had an engineer reminding me just lack week why VHDL is better. The reason he though it better was because it would not have allowed a port size mismatch that lead to some strange waveforms when the Logic Analyzer was configured the way he imagined it should be. None the less, Verilog is used for more ASIC designs then VHDL. (Simply ask the tool vendors Synopsys, Cadence, Mentor.)

    For me Verilog is closer to describing HW and allows an engineer to do what they want. It is like a sports-bike. It will get you there very fast and you can cut a lot of corners. But, watch out or you will be in a ditch pretty quick.

    For students, it is most important that they learn HW design before learning Verilog or VHDL. They need to understand the parallel nature of HW, and should be familiar with state machines and Karnaugh map reductions. In general they should not be writing shifters with for loops. Both languages allow you to describe HW that looks OK in simulation and has a whole host of problems after synthesis. I would teach Verilog because the language will not force good design and the students will be forced to learn when their FPGAs have problems. VHDL, on the other hand, will provided training wheels that allows the user to not truly understand what they are doing and still pass the class.

    1. Re:Verilog - larger market share and dangerous by nerdbert · · Score: 1

      I've done both languages, but I come at them from an analog perspective.

      I do ADCs, so there's quite a bit of analog and digital interaction and the digital is fairly good sized but not enormous. From that standpoint, I prefer Verilog since what you get out more closely matches what someone who doesn't do digital 100% of the time expects. There are fewer chances for derived states and things like that.

      But back when I first started I got pulled into a digital design group to "save a project" and they taught us VHDL. I can see why VHDL is popular in that for large groups (as ours was) since it has structures that help integrate larger design teams together without the need for as many stylistic rules.

      Personally, I'd teach Verilog first. In my experience it's more friendly to a variety of disciplines and better for small groups and projects.

      That's not to say that VHDL isn't without its good points, with its stronger typing and other requirements.

      Both are good languages and you really shouldn't go too far wrong with either.

  37. VHDL == history by whoever57 · · Score: 4, Informative

    There were very good reasons why people used VHDL in the past. Because VHDL was an open language before Verilog, the cost of VHDL tools was historically lower than Verilog tools. Since this cost was much more important to FPGA designers, VHDL tended to dominate the FPGA market.

    On ASIC side, the first mainstream commercial synthesis tool was Synopsys and Synopsys chose to support Verilog before supporting VHDL. Amongst all the other NRE costs in designing an ASIC, the added cost of using Verilog tools (instead of VHDL) was not really significant. Also, tools to support large designs advanced initially as Verilog tools.

    Fast forward few years and Verilog is now open, the cost differential has now disappeared. However, VHDL had a lot of features related to design validation that were not in Verilog. In VHDL you can read and write files. Such things as configurations are supported, etc.. This type of capability makes it easier to write a testbench in VHDL, while on the Verilog side, additional tools and languages are commonly used.

    Fast forwards a few more years to today and now we have System Verilog. This gives Verilog the capabilities that it lacked in comparison to VHDL and probably more. The price of VHDL tools is the same as Verilog tools.

    Summary: it's clear that the future does not belong to VHDL. It looks like System Verilog is the future, although there are other contenders. So, if the choice is between VHDL and Verilog -- pick Verilog.

    --
    The real "Libtards" are the Libertarians!
    1. Re:VHDL == history by gwait · · Score: 4, Insightful

      When I got into verilog, there was no standard method to support Silicon Asic libraries in VHDL, so verilog owned the Asic market.

      I've done both, currenly VHDL, but found Verilog easier to use, both for design description and for testbenches. Verilog (or at least Cadence-XL) has always had file read/write access, and a linking setup very reminiscent of the way a C compiler works, that and the fact that it offers an "include" mechanism like C makes it very easy to compile and link in various test "programs" into the whole testbench.
      I found it very surprising how difficult this is to do in VHDL actually.
      Some designers I know glue TCL scripts in to handle testbench functions instead of doing so natively in VHDL..

      --
      Bavarian Purity Law of Rice Krispie Squares: Rice Krispies, Marshmallows, Butter, Vanilla.
    2. Re:VHDL == history by stevew · · Score: 4, Insightful

      I've been in the industry as a chip designer since 1995 (board designer for 15 years before that..) I learned Verilog in about 2 days because I knew C thoroughly. My experience applies to someone who is already a designer - which isn't the case here.

      I also know that there are some limitations of the original definition of VHDL that make it a pain to use. The strong typing gets in the way of getting the logic described. VHDL natively can't do things like signed arithmetic. That's why you have all those IEEE packages! In other words - the language is extensible - but you pay a price in lack of brevity to describe the hardware you're after.

      There are features of 1995 Verilog that also are a curse and a god-send. The assumption that any undefined term is automatically a wire can save you lots of trouble in the creation of the design or bite you in the posterior (where a strongly typed language would save you from yourself.) So Verilog takes on the original K&R attitude of the programmer being smarter than the compiler and knowing what he/she is doing.

      No come into the current century and we have System Verilog. System Verilog = Verilog + Vera + the best parts of VHDL (things like generate).

      Where VHDL and Verilog were lacking for strong verification methodologies (that in truth were developed years after either language came into being...) System Verilog has been updated to handle this job adequately along with the task of describing the hardware.

      The real answer is that you have asked one of those religious war questions - just like VI vs Emacs (Obviously VI is better ;-) Let me give you a URL that you can read about a contest that was held at DAC some years ago - http://www.angelfire.com/in/rajesh52/contest.html

      I worked for both Yatin and Larry (two of the conspirators in this story) You be the judge of the Verilog/VHDL war.

      I also believe there is a very definite geocentric component to these arguments as has been claimed in earlier posts - In the US Verilog is dominant - while in Europe it's VHDL. I can't speak to other continents. ;-)

      In my time as a consultant in the field - I've had two projects out of roughly 20 that were VHDL. Now-a-days these tend to be multi-language affairs where we have both VHDL and Verilog mixed together. Modelsim, and the Cadence offerings handle this pretty transparently (can't speak to the Synopsys tools - haven't used them in better than a decade at this point.)

      As another data point - the vast majority of reusable IP that I've seen was done in Verilog. (This may be due to the geographic component - mostly US companies.. ARM being the exception - but everything I see from them is primarily in Verilog... ;-)

      Okay - that's lots of data as to what you should do - I would think you should concentrate on teaching about the synthesis subset, proper digital design AND how to write verification environments before they ever even WORRY about FPGAs. What I've seen are a lot of non-designers getting into FPGA design - and they are clueless about things like clock domain crossing and testing the design in simulation BEFORE they go to the FPGA. The old 90/10 rule applies equally here. Do the homework on the design FIRST with simulation before you try to debug every little problem when it's been realized in hardware as an FPGA. I would imagine that students who are trying to become designers are going to suffer the same pitfalls if not shown the RIGHT way to do things.

      Hope this gives you some data. In the long run - whether you use Verilog, VHDL or better yet - System Verilog doesn't matter so much as teaching the proper design and verification methodologies!

      --
      Have you compiled your kernel today??
    3. Re:VHDL == history by KnightElite · · Score: 1

      My workplace is primarily a Verilog shop (FPGA design only, no ASICs), though we're forced to use VHDL on occasion when a piece of IP is written in it, or to interface with Xilinx's EDK toolchain, which is mostly written in VHDL. We haven't switched to using System Verilog, but we do attempt to stick to the Verilog 2001 style coding, instead of the Verilog 95 standard. Verilog 95 makes the same code significantly longer and more annoying to change. Things like generate statements and parameter passing have been in place in Verilog since that standard, and all the toolchains that we've used (Xilinx, Altera, Synplicity) support it, albeit only fully since the latest ISE 11 software release in Xilinx's case. Having only done a minimal amount of VHDL, I can tell you that I can't stand it due to the excessive verbosity that is required to do anything in the language, though one of my wishes is that Verilog removed implicit variable declaration, as occasionally a typo will cause a design not to function correctly, which as mentioned will not happen in VHDL. A compiler option for that one would be nice ;). To answer your question as to which you should teach, I would go with Verilog as I find it's easier to use (which may be bias on my part, having used it far more than VHDL), but make sure that you teach "clean" ways of writing the HDL. I've seen a fair bit of excessively verbose, hard to read Verilog code (a lot of the code Xilinx provides for their parts is like this) which could be a lot cleaner if it was written differently. Another thing that I think would be a useful thing to go over is each step of the FPGA build and what it's actual purpose is. What is the output of the synthesizer? What is the output of the mapper?

  38. How about Simulink from The Mathworks by Anonymous Coward · · Score: 0

    we have been using Simulink with DSP builder (from Altera) and we are very happy with this framework. We've used both Verilog and VHDL and we fell that Simulink is the fastest way to get a project up and running on a FPGA. Only problem, it is not cheap...

  39. Something completely different... by Anne+Thwacks · · Score: 0, Troll
    Schematic capture is the answer

    A picture is worth a thousand words, and a schematic is worth 1,000 lines of VHDL Disclaimer:

    I have been using Xilinx since the 1800 (approx 1980).

    --
    Sent from my ASR33 using ASCII
    1. Re:Something completely different... by Anonymous Coward · · Score: 0

      I think that the best solution is not to code in either VHDL or Verilog. Code in C!! You can use the open source solution http://www.c-to-verilog.com They give an on-line compiler from C to Verilog which allows you to code in C and synthesize verilog code.

    2. Re:Something completely different... by Anonymous Coward · · Score: 1, Insightful

      But 1000 lines of VHDL makes for a really, really tiny design, far smaller than anything implemented in a modern FPGA in a modern product. If you're still using schematic capture, you must still be developing for CPLD-sized devices.

    3. Re:Something completely different... by Anne+Thwacks · · Score: 0, Troll
      But 1000 lines of VHDL makes for a really, really tiny design

      My point exactly. You dont place your whole design in a single schematics, andy more than your entire application is in a single subroutine/procedure/function/why. 1,000 lines is possibly 10 pages. 10 pages of schematics will give you an entire 8-bit MCU. Schematics are heriarchical in any sensible design.

      Plenty of people have designed entire computers as schematics (can you say VAX?). You can get PHP8 schematics off the internet, and Sparc/Sparc64 if you want. I have done designs that fill Vertex parts using schematics - with perhaps some minor modules coded in VHDL. (About 25 pages of A2) I have designed 16-bit log/antilog hardware as schematics, although that might not be to everyone's taste :-)

      Schematics give you "The big picture", and poor design can be spotted a mile off. Written language can very easily give you a can of worms concealed in a maze of twisted passages of text, all of which look alike, but you dont know till you are at your Witt's End.

      --
      Sent from my ASR33 using ASCII
  40. It doesn't matter by Anonymous Coward · · Score: 0

    If you understand how to design hardware, either will get the job done. If you don't, both will give you crap.

    1. Re:It doesn't matter by Anne+Thwacks · · Score: 1

      Mod parent +5 "The Bee's Kneez"

      --
      Sent from my ASR33 using ASCII
  41. Either by rosasaul · · Score: 1

    To be honest for a college level program I don't think it matters. I learned VHDL in school, but only use Verilog at work. Hasn't much impeded me. There's a mild learning curve but if you know one you know the concepts necessary to easily learn the other.

  42. Once Verilog supported signed arithmetic... by chrispitude · · Score: 1

    ...it was game over. I was a staunch believer in VHDL and its many features (generics, records, operator overloading, strong type checking). But once Verilog implemented proper signed arithmetic which didn't require tedious manual sign extension in the code, then I never looked back. SystemVerilog continues to push Verilog forward. gwait (179005) had the right idea - start with Verilog, and if you ever need to work with VHDL, you will have a much better idea of what aspects of the VHDL language you do and don't need to learn.

    1. Re:Once Verilog supported signed arithmetic... by imgod2u · · Score: 1

      IEEE std_logic_arith for VHDL supports signed arithmetic...

  43. how about this approach by Dolphinzilla · · Score: 1

    Personally we usually look for VHDL programmers instead of verilog - I would recommend focusing primarily on VHDL, touch on Verilog AND maybe expose the students to LabVIEW for FPGA's, or possibly Annapolis Micro's Corefire software just to show them that there are other approaches besides VHDL and Verilog

  44. C-to-Verilog dot com by Anonymous Coward · · Score: 0

    Hi,

    Another possible solution is to use automated translation between C to VHDL or Verilog. The website http://www.c-to-verilog.com is an open source project which gives you a compiler and an on-line service for compiling C to Verilog.

  45. Either or Neither by kj_cmpe · · Score: 2, Insightful

    As other people have pointed out, the important thing is that neither Verilog or VHDL are sequential programming languages... They are hardware description languages, or could be thought of as parallel programming languages or simulation languages. In any case, students will make the biggest mistakes by: 1. Thinking that it's just like C/C++/Java/whatever, and 2.Using features of either language (which are both quite powerful), but that are unsynthesizeable.

    Thus, an important part of any course on HDL should have a heavy focus on synthesizeable code, with many iterations of seeing not just the "right" way to do things, but why that is the right way and the alternatives wouldn't produce the same (presumably good) hardware as the alternative ways that look or seem similar.

    There are many other languages to consider as well that may or may not end up being used widely in industry.. a sampling is...
    SystemC
    HandelC
    BluSpec

    Plus, there are many C-to-Verilog, C-to-VHDL or C-to-HW compilers out there that try to jump from sequential code with pragmas etc. to the HW....

    In general, I would suggest thinking of this not as a language course, but as a hardware design course where the tools used happen to include a new language (for the students). It would be easy to concentrate on language syntax and end up with students that know syntax, but not how to make good HW descriptions....

  46. Why use Handel-C when you can use the open source by Anonymous Coward · · Score: 0

    When you can use the open source http://www.c-to-verilog.com. Its much better from my experience.

    Again, Open source gives a better solution.

  47. For what its worth by 427_ci_505 · · Score: 1

    I've only ever used VHDL, but it is fairly clean and easy to get started with.

    I suppose I should have given Verilog more of a chance, but I just ran away screaming whenever I opened up a *.v file.

  48. learn digital design, then learn syntax by rsw · · Score: 2, Insightful

    I work at a mixed signal IC company that is, on the digital side, principally a Verilog shop. We do have one or two projects that use VHDL, and maybe even one or two that use both. From a practical applicability point of view, Verilog is a bit more popular as far as I know, but this should not be taken to imply that you will do your students a disservice teaching them VHDL. When we interview digital designers, we don't ask them "do you know Verilog?" we ask them "do you know digital design?" The language is far far less important than the underlying concepts.

    The biggest mistake you can make is concentrating on the language and expecting the programming skills will apply to digital design just because the syntax of Verilog looks like the syntax of C (or VHDL looks like Pascal, if you squint a lot). First, learn how to do digital design, then learn how to describe those designs in an HDL. Things might go slightly faster if you are familiar with the syntactic structures (i.e., C coders will feel more comfortable using Verilog), but trying to take the "do-while--if-then-else--for" mentality of a procedural coder and trying to jam it into an FPGA is going to be a painful road to failure.

    It's time for a bad analogy! "Hey guys, I have a bunch of novelists whom I want to teach to write medical textbooks. Should I teach them to do it in English, or Spanish?" The answer is "whichever they're more familiar with already... but first teach them medicine."

    -=rsw

    1. Re:learn digital design, then learn syntax by OutputLogic · · Score: 1

      Totally agree.
      VHDL and Verilog differences are insubstantial as far as synthesizable code is concerned. As far as code readability I prefer Verilog because it's more concise.

      - outputlogic

      Visit outputlogic.com : tools that improve productivity

    2. Re:learn digital design, then learn syntax by Anonymous Coward · · Score: 0

      I totally agree. I'm a student and I like VHDL a lot ;)...

      What I discovered is that I needed to understand all the underlying concepts before writing one line of VHDL.

      Schematics is horrible, unmaintainable (...). VHDL is strongly typed and helps you to avoid a lot of stupid mistakes...

  49. System Verilog by alain94040 · · Score: 2, Interesting

    If your goal is to prevent the students from ever completing their project and running on real hardware, then pick VHDL. Its ADA-like compiler will reject every possible attempt at coding until you master the language.

    At least with Verilog you'll compile some gates, which may or may not work functionally, but at least you'll have fun discovering what your code does in hardware.

    I was part of the IEEE committee which standardized the VHDL subset for synthesis (a fiasco, but that's another story).

    10 years ago, the debate between Verilog and VHDL was that the US was using Verilog and academia and Europe were using VHDL. That's over: pretty much everyone switched to some form of SystemVerilog.

    In the end, what really matters is that students can go back and forth between any given language construct (blocking assignment, missing assignment, for loop, etc.) and its hardware equivalent (flip-fop, latch, mux, etc.).

    Very few people are good at this. The ones that do make $150,000+ in Silicon Valley. So it is definitely a good career path.

    1. Re:System Verilog by PSargent · · Score: 4, Interesting

      I disagree with the statement that everybody has switched to System Verilog. I've worked with a few companies introducing it, and System Verilog is exactly the reason I want to go back to working with VHDL. It's horrible.

      My take on it it is that a load of C++ engineers looked at Verilog and thought "What this needs is object orientation!" completely ignoring the fact that hardware description languages are OO by nature. After all, what is a module if not a method of encapsulating design leaving just a public interface.

      The result is a horrible mess of a bi-polar language that can't decide if it's a software language or a hardware one, and the two sides don't really want to talk to each other. Add to that the fact that all of the design patterns that are being used with it are software patterns that don't map well to hardware, that most hardware engineers don't know, and you just get a big steaming pile when you try to introduce it to a company.

      The EDA vendors love it because it's giving them a new set of tick boxes they can sell their wares on, but I've yet to see it do anything that I couldn't do in straight verilog / VHDL + a little PLI/FLI, and I've been working as a system verilog application engineer for one of the EDA companies. ...oh and it's really slow (as in orders of magnitude).

    2. Re:System Verilog by imgod2u · · Score: 1

      SystemVerilog was largely added for Verification, not design. There are a few constructs that make designing hardware easier than Verilog (enumerations, interface abstracts) but the primary focus of SV is that it allows powerful testbenches.

      Before SV, people tested their chips by programming a model in C/C++ and then using a simulator's programming language interface to tie the C model to a Verilog testbench that instantiated their design.

      SV makes this rather clunky method go away by introducing C++ like OO programming along with hardware-specific testing constructs (timing-based assertions, constrained random rules, logic coverage).

      If your designers are using it primarily for designing hardware, then they are doing it wrong. It's meant for Verification Engineers.

    3. Re:System Verilog by imgod2u · · Score: 2, Insightful

      That is a very dangerous idea. "Let them be sloppy and still make their thing work" may work for software -- where you can just release a patch to fix problems that pop up -- but the primary and most important thing about ASIC design is you only get one shot at it.

      That's the first lesson hardware design courses should be teaching. Not making them feel good about how their non-functioning Verilog "program" actually compiles. By the time they actually program it into the FPGA, they should've understood fully how it would translate into gates by the synthesis tool and how it would translate into device-specific macros by the place and route tool.

      They should've simulated it at all points of translation as well. VHDL forces you to do this to an extent and that's a good thing.

    4. Re:System Verilog by Anonymous Coward · · Score: 0

      I've been learning SystemVerilog and I think it's really great, but perhaps I'm coming from a different perspective. I was interested in using it only for creating testbenches for verification of existing designs. I found the combination of object oriented software aspects and hardware description language extremely powerful while not being too difficult to use. I was able to create a fairly complex testbench (with object oriented software constructs) and easily interface with and control the hardware design. I never would have been able to create such a testbench with Verilog or VHDL.

      But then I wasn't designing any hardware so perhaps there are complications using it for design. But for verification I think it's fantastic, which I thought was one of the primary motivations for creating the language.

    5. Re:System Verilog by systemverilog · · Score: 1

      See my response at http://verificationguild.com/modules.php?name=Forums&file=viewtopic&p=15517#15517 or at http://tinyurl.com/oamkc4 Ben Cohen http://www.systemverilog.us/ * A Pragmatic Approach to VMM Adoption 0-9705394-9-5 * SystemVerilog Assertions Handbook * Using PSL/SUGAR * Real Chip Design & verification * VHDL Coding Styles & Methodologies * Cmpts desig

  50. Verilog 100% No Question by Murdoch5 · · Score: 1, Insightful

    Verilog, I've had to program FPGA's and CPLD's and the one thing I can say for sure is VHDL is the worst programming lanugange of all time. It's syntax is horrible, it's keywords are non sense, it's declerations are crap, all in all it's horrible.

    Vhdl solves 0 problems with helping a student learn hardware design. From a personal note I don't think anyone should use FPGA's / CPLD's. They don't solve a single problem that can't be done in pure software. Future more what use is it to say make a Train program on a FPGA / CPLD. There is real use for these hardware device.

    My prof made it sound like they were the most important devices in the world and I have to disagree with him completely. I would understand 5 - 10 years ago when we simply didn't have the hardware preformance we have now, then a FPGA / CPLD could be useful.

    Well VHDL might have a ton of existing libs for it and it might be reconized widely, it's still a horrible and hidious method of hardware design period. We had to do many labs this year using it and really there was no time saved, NONE, and from what we were taught it would make the job easiler!

    After spending 4 months with VHDL and then 1 week with Verilog, there's no completion. Verilog is a much much better method of programming FPGA's / CPLD's. Hands down it wins, it's like asking which is better for programming a airport system , Hand Assembling the software using ATT&T syntax in Windows Debug (VHDL) or using C (Verilog). All the labs the entire class did were preformed 1000x faster in Verilog with a much higher level of understanding.

    If you have to pick, it's not a question just and answer it's Verilog all the way. VHDL has to retire, it's of no use, it's horrible to work with, it's horrible to use and forget trying to understand it to a decent level. Verilog is very nice to work with and it omits many of the down falls of VHDL.

    I would also like to add that doing FPGA / CPLD design is also becoming rather pointless, with the advances in modern computer programming languages and compiler, it's no longer a case of not having a fast software solution. The hardware and the software are no longer seperated by such a huge amount, well there might be a slight and I mean maybe 1 - 5% increase in preformance using a FPGA / CPLD I don't think that becomes enough of a reason for using them anymore. At least not in college and university programs, doing labs where you have to program a game like Tetris or Space Invaders, what does that teach you. What it does is waste hours and hours of dealing with problems and bugs and crappy syntax do get something that doesn't satify any need.

    All in all I think the FPGA and the CPLD,except in special cases, have served there purpose and are no longer a good solution to computer and electronic design. Unless someone can make a hardware desciption language that can actually make sense and flow, the FPGA and CPLD's are done.

    Thanks
    Murdoch

    1. Re:Verilog 100% No Question by Anonymous Coward · · Score: 0

      Vhdl solves 0 problems with helping a student learn hardware design. From a personal note I don't think anyone should use FPGA's / CPLD's. They don't solve a single problem that can't be done in pure software.

      Synthesising parts of your ASIC without requiring a cluster and 24 hours worth of runtime?

    2. Re:Verilog 100% No Question by negro_monolito · · Score: 1

      Before going any further, I will admit my bias and say that I did teach a class (lab actually) where the final project was to write a two player pong game on an FPGA. I am sorry if you felt that was a waste of your time when you did it (I am assuming that is where your anger is coming from).

      That said, saying that no one should ever use FPGAs/CPLDs is pure non-sense. Every engineering problem can be solved multiple ways, and outright excluding FPGAs as a valid method is unwise at best. It's like saying that no one should ever use microcontrollers because full blown desktops have more power anyways.

      Do you know how microprocessors are designed? Have you made a MIPS or (gasp) even your own processor? I'll give you a hint, they're not made with a bag of NAND TTLs and wire-wrap. They are designed in VHDL, Verilog, or some other proprietary HDL language, simulated, verified, etc. and fabricated. Sure the first microprocessor was built with individual gates, but that's not how it is done now. Similarly, they aren't made with Java on a JVM.

      And yes, I have used both VHDL and Verilog. VHDL is cumbersome with its long admittedly convoluted syntax when you come from a software perspective, and Verilog seems easier because superficially it is "C-like". But they both "make sense and flow" just fine from the perspective of an EE. The reason for-loops and whiles don't exist (*) in because at the hardware level, they don't exist. When someone writes a for-loop in C/Java/(other high level language) it is compiled/assembled into machine code for a microprocessor. The microprocessor itself executes this code with flip/flops and logic gates, that's it. No loops or even logic statements because there is no such equivalent in the hardware world.

      Also, as for FPGA/CPLDs not providing a competitive performance to investment ratio (the execution speed up to engineer implementation time), that is also not true. As soon as you take a problem from a procedural domain to a concurrent domain, it is often possible to do more work in a given amount of time. It's partly the same reason why we are seeing Intel/AMD move from increased clock frequencies to increased processing cores (power issues aside). And when you concede that using a concurrent domain is sometimes more useful and decide to create an ASIC in your product, well guess what? If you already designed it on an FPGA you are 90% there (or 99% if you believe the Xilinx/Altera kool-aid).

      So to conclude, I wouldn't design a GUI with HDL and I wouldn't design an H.264 cellphone decoder chip in C/Java. I would use the best tool for the job.

      * Yes, I know that VHDL for loops are similar to C-macros, and wait statements will work in simulation like a while loop, but neither will work how a C programmer expects them to.

    3. Re:Verilog 100% No Question by Murdoch5 · · Score: 0

      Here's my problem with FPGA's / CPLD's and yes I have negitive Bias towards them so I'm willing to come out and say it. Our prof was the kind of guy who would print from the text book and then not teach us. So i understand that HDL is not C and i can respect that but i also said that in special cases FPGAs and CPLDs are fine.

      so for CPU design a FPGA / CPLD is the right tool but theres alot of stuff profs have us do that there is no reason for like pong.

      I just never saw the use of them for every day work but that is just me i guess.

  51. A University Student's perspective on VHDL... by file_reaper · · Score: 2, Informative

    We were introduced to VHDL in our University's Digital Circuits course.

    Most of the above commenter's have mentioned that Verilog is C like, I personally have never used or programmed in Verilog so I can't comment on that.

    I did however like VHDL very much, particularly because it was *different* from C, I'm kinda growing tired of C like languages and VHDL was a breath of fresh air. It made FPGA's and the entire course in general a whole lot of fun.

    It's strong typed nature was a bit cumbersome at first especially with converting std_logic to std_logic vectors and such because we weren't really shown how to do this or given a syntax/library reference like MSDN or Java's Documentation site.

    So I'd say make a good introduction to Entities, Ports and Architectures, explain Process, Signal and Constant statements very well, also particularly highlight the strong typed nature of VHDL.

    I think most of your students (such as myself) will not have done any programming in a true strongly typed language before, so this will be bit of a shock, and getting those conversions will be frustrating. (I have been there, Googling really does not help all that much)

    I hope your students get as much fun out of that course as I did.

    Cheers,
    filereaper.

    1. Re:A University Student's perspective on VHDL... by bavid · · Score: 1

      I back VHDL for similar, but more cynical reasons.

      As a TA for my school's digital design class, we used VHDL exclusively, but I also learned a little bit of Verilog for another class. Most (all?) of the students in an intro digital design class will have used C before, and when they see Verilog they will think "oh it's just like C." But it's not, and no matter how hard you beat them over the head, half of them will never quite learn. Teach them VHDL. Half of them will hate it and curse you for years to come, but at least they have a chance of learning some hardware from it.

  52. Probably Verilog by davebaum · · Score: 2, Informative

    VHDL and Verilog each have their strengths, which is why neither has been able to supplant the other. Perhaps in the long run System Verilog will change this (bringing much of the power of VHDL to the Verilog world), but that day hasn't arrived yet.

     

    Verilog code tends to be very concise, with the language making some implicit conversions and assumptions that turn out to be correct most of the time.

     

    VHDL is bigger, bulkier and more rigid. The rigidity can be annoying, but it also is good at catching errors. The language has features that allow for very elaborate testbench construction, and some powerful means for abstraction (the generate statement, multiple architectures for an entity, etc). But this power comes at a cost. The spec for the language is several times larger than for VHDL. At one point I had a Verilog quick reference that fit nicely on a single page. My equivalent quick reference for VHDL covered four pages.

     

    I've gone through the "choose an HDL" process twice, and both times selected VHDL. But that was within the context of at least half the team already being fluent in VHDL, and working on a large enough (and long lived enough) codebase that we could take advantage of some of VHDL's power. I wish VHDL wasn't so cumbersome and verbose, but it was still a win overall.

     

    You are in a very different situation. I'm assuming you have minimal experience with either language, and it will be new to your students as well. You're going to have plenty of other things to be worrying about (digital design, synthesis, debugging, etc). I think Verilog is a better choice for your situation. It's going to do everything you need, and not really get in your way.

     

    Also, don't worry about which tool is more popular in industry. Tools change many times over a career. University classes should be about providing good theory and foundation, so pick whatever tool enables you teach those concepts most effectively.

  53. Verilog is the future by Anonymous Coward · · Score: 0

    VHDL is the best bet if you are doing professional FPGA design, especially in the gov't/mil/aero/space industries. There is a lot of legacy code in VHDL and you're more likely to buy IP cores in VHDL. It is quite wordy, but the strong typing saves debugging time.

    But for hobby or commercial use, Verilog is the clear winner. Verilog has much better FOSS tools (I never could get isim or freehdl to work right, and I do this for a living). The openHPSDR firmware is all in Verilog. The weak typing makes Verilog easier to learn, and it's more compact. System Verilog is a fantastic advancement and offers much that VHDL doesn't. I suspect everyone will be writing their testbenches in system verilog (or perhaps SystemC), even if the synthesizable code is in VHDL. Might as well learn just one language and do everything in Verilog.

    Schematic capture will limit you; it's fine for small-time hacking but if you really want to learn this stuff you can't beat an HDL. Also be careful about graphical tools like LabView, CoreFire, Simulink, etc for FPGA design. You'll end up only understanding that one proprietary design entry language and won't be able to share designs and knowledge with the broader world.

  54. go verilog by Khashishi · · Score: 1

    VHDL is powerful but is too general. Basically, you can make the language do whatever you want, (not just limited to gate code, but any sort of modeling or computation, period), but it's a pain in the ass to do it. Pretty much all the operators and symbols (even '1', '0', 'h', etc) need to be defined before you can do anything, making it a feat to actually get work done. Well, there are standard libraries for stuff, but there are issues with multiply defined symbols and stuff in different libraries.

    VHDL is very verbose and requires a lot of boilerplate code to do the simplest tasks. That said, it does scale reasonably well.

    I think Verilog is more specifically geared toward FPGA gate code, and so it's a lot simpler to use. You don't have to fight the language like in VHDL. Go Verilog.

  55. (Structural) Verilog by Roguelazer · · Score: 1

    I've found that Verilog is much easier to learn and teach (at least, for an undergraduate engineering-type class). But, as others have mentioned, do NOT think of it as a programming language. Think of it as a convenient way to draw schematics, a very sophisticated keyboard layout for Xilinx. You should ALWAYS write synthesizable code for everything except your testbench, and you shouldn't have to synthesize it to know what it looks like. As to why not VHDL, well, VHDL is the COBOL of HDLs. Way too verbose for me.

  56. Personally I'd go for verilog by petermgreen · · Score: 1

    VHDL has an incrediablly anal-retentive type system and has some silly ideas like the splitting of entities and architectures. It's also old meaning you need a lot of boilerplate to manually import STD_LOGIC stuff (which is what the synthisis tool vendors tell you to use for everything)

    Whichever you use be aware that both VHDL and Verilog weredesigned as hardware simulation languages not hardware synthisis languages. This means it is vital to get to know the synthisis tool you will be using. It is vital to know what warnings matter and what can be safely ignored and which are important, what parts of the language must be avoided, how to assign clocks to clock nets, how to use the timing analyser (without timing alalysis you don't know if your code will actually work) and so on if you are going to use the languages for FPGA programming.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  57. Test Benches by Anonymous Coward · · Score: 2, Interesting

    I strongly disagree with the idea that these aren't programming languages and that all you need to know about is the synthesizable subset of each language.

        I've worked for several years using VHDL for ASIC/FPGA work. Invariably, I spent 2-3 times as long working on the simulation / test-bench as I did on the VHDL that was actually synthesized into the product. There are a lot of very interesting language features that you can exploit to make the testing more flexible and easy. If you tried to make a simulation test-bench out of the synthesizable subset, you're being a lot less efficient than you could be.

      Also, I have a strong preference for VHDL's strong typing and pseudo-object oriented features over the wild-west down-in-the-bits Verilog style. I think it's easier to manage complexity and reuse code in VHDL.

    That said, Verilog is definitely more popular in the US, which is important to consider if you're looking for marketable skills. If, on the other hand, you find yourself in a position to choose the language once you already have a job, I'd strongly recommend VHDL

    1. Re:Test Benches by imgod2u · · Score: 1

      Agreed. Although for anything beyond directed tests, most have moved to either C models with VPI (or PLI) or straight up SystemVerilog by now. The behavioral and procedural aspects of vanilla Verilog and VHDL are largely outdated.

  58. Quartus - VDHL / Verilog by Murdoch5 · · Score: 0
    I have to mention this because I think it's important, well you can find programs for helping with HDL there is one I have to point out Quartus, it's probley the most broken program for doing HDL. It seems fitting that if your going to ask the question Verilog or Vhdl you need to also look at what your going to use to program these. In college we had to use a program called Quartus from

    http://www.altera.com/products/software/quartus-ii/subscription-edition/qts-se-index.html

    Everything we ever tried to do using Quartus was overly hard. Every time we needed to assign pins or select a device Quartus would either fail or it's servers JTAG would crash or we'd have to reboot Windows. I don't want to rip this appear but as a moral and ethical person I had to inform you of this.

    Quartus can help with Vhdl and Verilog for sure. I'm not saying it can't but everything you'll ever do with it is made 10 x harder and more complex then it ever has to be. If you going to teach students make sure to say away from this software!

    1. Re:Quartus - VDHL / Verilog by ccvqc · · Score: 1

      As I just posted in reply to a Handel-C comment above, I've been using Quartus for several semesters now, currently with an inexpensive prototyping board from them. Altera has given great academic support, and we've had none of the problems the parent poster mentions. I do a mix of schematics and Verilog. For example, I'll do the Verlog version of a module, and have the students implement the schematic to replace it in a bigger design. I don't doubt the parent's experience, but as a moral and ethical person, I had to reply ...

    2. Re:Quartus - VDHL / Verilog by Murdoch5 · · Score: 0

      To be fair, I've only used it on the school computers that we were given. It could be completely probable that the computers are crap and they were, totally horrible computers, P4's with 1 GB Ram and Windows. We had 6 people in our class and all 6 computers had problems with Quartus. So I don't know if it was the computers but I have had nothing good to say about Quartus.

  59. If you know what you are doing ... by BitZtream · · Score: 1

    Then the language is almost irrelevant. A good developer, software or hardware, can use just about anything thrown at them to accomplish the task, given a reference manual for the language. FPGAs are just another form of programming and should be treated as such. (Or you could say that software is just an extension of hardware and should be treated as such, doesn't really matter which way it goes).

    So, to answer your question. At this point in time, for you, which one you use depends more on non-technical issues such as what hardware you're going to be using to do the initial development. If you can find a Verilog compiler but not a VHDL for the hardware you're going to start with then the question answers itself. For instance if you were going to use an ATmel FPGA, you're most likely going to be using their workbench and the language it uses (Cant remember off the top of my head which it actually is) as it contains the best integration with the hardware for development and testing purposes. It would be silly to try to use the other language with an ATmel FPGA unless you already have a large base of components built in that language to port, which if you already had that base set of components, you would already know the answer to the question you ask.

    When you get to the point that which language use you actually matters, you'll be fully aware of it and at that point you'll actually be able to make a decision. This is true for just about every programming language on the planet, hardware or software. The language matters a lot less than most programmers think. The reality of it is, most programmers suck ass, and the reason they are so loudly voiced about 'their' language and all its 'greatness' is because they don't really know how to program, they just know enough to make their preferred language do something useful. At the extremes of programming its a little different. If you're talking about writing software for a micro controller with no memory management support and/or tiny amounts ( or no) ram, then using Java would be dumb (even if you had a VM already). C makes more sense, but with little ram, it may waste too many resources there as well, so you're going to be using assembly in most cases anyway. When you're working on a Mac, Linux or Windows desktop PC however, those sort of limitations simply don't matter to most apps, so any language will do until you come up with a reason the language won't work. Since you know very little about the languages involved at this point, you probably can not make a educated choice at this time. Even when you do start running into limitations, its likely going to be the same for both languages or a compiler issue. For instance, there is no 'reason' a C# app can not be as fast as an app doing the same thing in assembly though it does happen. It happens because the compilers used to turn C# into actual executable code that the processor understands in not nearly as effecient at generating machine language as an assembly programmer doing only EXACTLY what it has to do and taking advantages of the way the machine itself works.

    With Verilog and VHDL its all just gates in the end. At this stage its practically impossible to determine which one will be more effecient for you to use. You're coding style, your abilities, the quirks of the compilers, the ease of use and understanding of the tools all matter far more than anything else. You'll see plenty of slashdot posts exclaiming which one is better, but the reality of it is, you won't know which one is better for YOU and YOUR PROJECT until you get some experience. Unless you plane on laying out your entire game plan, what you are building, how you intend to go about it, what hardware you're using and EVERY other specification about your project, than any advice is just a guess and not even an educated one. Someone may say 'Use VHDL, it does X, Z, Y, and really is easy to use thanks to feature B'. Feature B sounds important, so you use VHDL. Turns out that you never use feature B, and becau

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  60. FPGA SDK's for Student's to work on... by file_reaper · · Score: 1

    This might be offtopic, but while we're on the topic here, does anyone know of any *afforable* FPGA kits for students?

    Our university used the Altera DE2 boards, found here http://users.ece.gatech.edu/~hamblen/DE2/

    I really liked the DE2 because it has a whole lot of peripherals and can be used with Quartus II. I wanted to get one so I could tinker with it in my own time for fun.

    Any recommendations for one less than $500~ ?

    1. Re:FPGA SDK's for Student's to work on... by OutputLogic · · Score: 1

      It all depends on the FPGA size you need. Check this out:
      http://www.xilinx.com/products/devkits/HW-SPAR3A-SK-UNI-G.htm

      - outputlogic

      Visit outputlogic.com : tools that improve productivity

    2. Re:FPGA SDK's for Student's to work on... by brendank310 · · Score: 1

      Digilent Basys Board

    3. Re:FPGA SDK's for Student's to work on... by Man+On+Pink+Corner · · Score: 1

      I'd pony up the extra few bucks for the Nexys2 instead of the Basys. The USB implementation is better documented, and there's a nice Hirose connector.

  61. You could try something easier by Anonymous Coward · · Score: 0

    Like http://www.myhdl.org/doku.php. It's basically Python and can be translated to either VHDL or Verilog.

  62. Simulink by giampy · · Score: 1

    The industry seem to be leaning toward higher-level languages like MATLAB/Simulink, which let you generate automatically VHDL code for your FPGAs from an higher level functional schematic diagram. So you might want to include them perhaps towards the second part the course.

    --
    We learn from history that we learn nothing from history - Tom Veneziano
    1. Re:Simulink by gwait · · Score: 1

      For signal processing work certainly.
      Not for general logic, bus interfacing, state machines etc...

      Usually you would end up gluing a Matlab generated core into the middle of a Verilog or VHDL framework, so you need to be able to play in that sandbox..

      --
      Bavarian Purity Law of Rice Krispie Squares: Rice Krispies, Marshmallows, Butter, Vanilla.
  63. Verilog is more concise by OutputLogic · · Score: 1

    Verilog is more concise. Example: 16-bit LFSR counter in Verilog has 24 lines of code. The same in VHDL is 41. (I generated the LFSR counter using OutputLogic.com online tools)

  64. VHDL=ADA, Verilog=C by RKBA · · Score: 1

    If you like the ADA programming language (Yuk!), then choose VHDL. If you prefer the C programming language, then choose Verilog.

  65. Ugly by Anonymous Coward · · Score: 0

    I learned VHDL at the University of Texas. It has got to be the ugliest language I've ever seen.

  66. Verilog by bear24rw · · Score: 1

    Last quarter i took digital design at university of cincinnati and we used verilog, i found it much easier to understand than VHDL. I would say go with verilog if you are just starting out.

  67. Dont assume previous knowledge by Anonymous Coward · · Score: 0

    I have already taken a Digital Systems Design class and we used the exact same Spartan FPGA board. I am a freshman at the University of Cincinnati, and they made one very large mistake when scheduling this course. We were required to take this course before taking our introductory to C++ course. This made learning Verilog extremely difficult having had no programming background and the teacher was assuming that we all knew C pretty well. The book we used was Digital Design by Mano and Ciletti. It was a rough course for my classmates and I but I'd be interested in hearing your ideas to teach the course. Of course the only other downside is now that I am past the course I'm stuck with a $70 FPGA board that I'm sick of looking at. Overall I would suggest focusing more on Verilog instead of VHDL.

  68. Xilinx software by OutputLogic · · Score: 2, Insightful

    How is this info relevant in 2009 ? I've been working with Xilinx in the last 9 years and can attest that their software has a decent quality. By "decent" I mean no better or worse that its competitor Altera. There are occasional bugs which are quickly fixed or tech support offers a work-around.

    Thanks
    Visit http://outputlogic.com/ : tools that improve productivity

    1. Re:Xilinx software by kestasjk · · Score: 1

      How is this info relevant in 2009 ?

      Because I'm still taking the course, and the Xilinx unit was only 2-3 years ago.

      --
      // MD_Update(&m,buf,j);
  69. What holy war? by loufoque · · Score: 1

    Or is this an eternal, undecidable holy-war question along the lines of ATI/nVidia, AMD/Intel, Coke/Pepsi, etc...?)

    I don't see any holy war here.
    Nvidia (only one that cares about OpenGL), Intel (Core 2 basically killed AMD), and Coke (has 15% more market share).

  70. Verilog has some Pascal elements by OutputLogic · · Score: 1

    For those who remember Pascal programming language, Verilog has some Pascal elements.
    For example "begin-end" blocks

    - outputlogic

    Visit outputlogic.com : tools that improve productivity

  71. Preferences by StormReaver · · Score: 1

    My first preference would be to have the course taught by someone with real experience with the subject. If it's going to be the blind leading the blind, it's better to not have the course at all.

  72. Verilog is a programming language by OutputLogic · · Score: 1

    Verilog is a programming language that describes hardware. You can program complex algorithms, protocol stacks, even simple operating systems. I've done it during my 9 years working with Verilog.

    - outputlogic

    Visit outputlogic.com : tools that improve productivity

    1. Re:Verilog is a programming language by NP-Incomplete · · Score: 1

      Synthesizable Verilog is no more a programming language than a SPICE netlist or a GDS file is.

    2. Re:Verilog is a programming language by norton_I · · Score: 2, Insightful

      Why would you say something as silly as that spice netlist format is not a programming language?

    3. Re:Verilog is a programming language by imgod2u · · Score: 1

      Because it's not. It's not a list of instructions. It doesn't describe what to do. It simply describes structure. A program, by its most basic definition, is a set of instructions. It's a procedure of what to do:

      add this to this.
      copy this to that.
      turn these bits to 0's.

      etc. SPICE doesn't do this.

  73. Depends on the product and industry. by asm2750 · · Score: 1

    VHDL is used by defense contractors still. Although its ADA based, it requires strong typing, making it less prone to error. Although its hard to learn at first, you eventually notice its a lot like working with a virtual breadboard of sorts. Verilog is used in mostly consumer devices, and ASIC design. Intel, AMD, and other chip companies use verilog to design their newer architectures, although it can be more prone to bugs than VHDL, neither language is absolutely perfect. This is why we have verification and test engineers write test benches for the code to find any errors in the design.

    In this day and age, its best to know both languages. They are pretty much alike, just that some of the keywords and syntax is different. Most FPGA design tools come with soft processors made in VHDL or verilog, and the user will typically use C to create the for the processor to run your task, this alone also makes knowing C a requirement. VHDL and verilog in such projects would be then used to special tasks, like fast image or audio processing, since the VHDL or verilog module would be tuned for that task and be able to complete it in a very short order of time compared to a general purpose processor. If I can make any recommendations, the sites http://www.asic-world.com/ and http://www.fpga4fun.com/ are two places I would look to first when start learning about verilog and VHDL.

  74. VIM by nog_lorp · · Score: 1

    VIM

  75. VHDL by Mister+Fright · · Score: 1

    I see VHDL mostly used. I only ever see Verilog in third party libraries or autogenerated code.

    I think language is an individual choice, but whatever you choose, make sure the students actually synthesize something on a chip and try to meet some timing requirements. Everything works in simulation.

    Also, have them take at least one programming course. Firmware engineers try to write software as if it were firmware. Think variables and function names in all caps and absolutely no code reuse. I'm still fixing this guys terrible code.

  76. Try Handel C by Anonymous Coward · · Score: 0

    Handel C is the best language if you can find it...

    1. Re:Try Handel C by ccvqc · · Score: 1

      Celoxica (the company that developed Handel-C) was taken over by Agility (Mentor) half a year ago. Handel-C is great (except for some crufty syntax around the I/O parts), and the DK development environment is good. But I'd be wary of getting involved with it until its future is more certain.

  77. Personal experience by AlecC · · Score: 1

    As a pure software geek working in a hardware environment, VHDL is prerferred. But equally - of it works, go with it. Verilog is accepted as valid as VHDL.

    --
    Consciousness is an illusion caused by an excess of self consciousness.
  78. I just did such a course.. by Goseph · · Score: 1

    I'm an undergraduate student and just finished a course in VHDL implemented on the Xilinx Spartan3-series FPGA and found it highly enjoyable. Definitely don't attempt to cram both in one module as I have no doubt that would confuse the kids no end. Instead get them comfortable with one and take that a bit further. I found Verilog a bit less intuitive but I did spend less time studying it.

  79. That's 100% backwards by pem · · Score: 1
    "VHDL was created by hardware engineers who know nothing about programming languages. Verilog was created by computer scientists who know nothing about hardware."

    Ummm, no.

    VHDL is a subset of Ada.

    Verilog was created by a company actually doing chip verification.

    Ada, as any good student of languages should know, is a clusterf**k. Why Modula-2 (one of the contenters) wasn't chosen for Ada is a complete mystery to me.

    As an aside, I used to program a lot in Modula-2. It was great. But then, ANSI C came along, and between the C standard maturing, and the compilers getting smart enough to ask if you REALLY wanted to do "if (x=0)", C became "good enough" and Modula-2's popularity waned.

    These days I mostly program in Python and Verilog. I would have even less hair if I had to do my logic in VHDL.

    1. Re:That's 100% backwards by jcasper · · Score: 2, Informative

      "VHDL was created by hardware engineers who know nothing about programming languages. Verilog was created by computer scientists who know nothing about hardware."

      Ummm, no.

      Oops, I got the quote backwards (duh), you're right (obviously).

  80. First ever slashdot contribution by TwoWheelGeek · · Score: 2, Insightful

    Finally a topic I care enough to go register in order to put in my opinion... Let's see how bad I get slammed :) I work in FPGA's and have done a couple of relatively small projects in them. I have exclusively used VHDL. But after I taught myself VHDL, reading Verilog is pretty easy. It is a Coke / Pepsi thing because you are asking for a "better" decision. Most jobs can be done by either language. VHDL is preferred in some circles, especially military / DOD / Aerospace (where I work). Verilog has a shallower learning curve for those used to sequential programming languages like C. VHDL is more powerful if you can think in terms of the underlying digital hardware (propagation delays, clock hold times, clock domains, etc). And not to be too pedantic, but VHDL is NOT a programming language. A programming language is something that ultimately is translated into a series of instructions for a processor. VHDL is a hardware description language. You are actually describing a piece of hardware that will be implemented as a set of gates on a piece of silicon. VHDL code will never result in instructions and will never be "ran". It will be implemented in hardware and will respond to inputs and produce outputs per your design. My answer, it depends on your goal. If you want to produce a more rounded CS major capable of understanding this aspect of technology, focus on teaching Verilog with some VHDL examples to highlight the differences. If you want someone that could go produce useful work after graduation, focus on VHDL. I know I will probably be unpopular because Verilog is more prevalent among the "traditional" programmers because it is an easier leap from C.

    1. Re:First ever slashdot contribution by insane_membrane · · Score: 1

      Well, I found when I learned them both that verilog it was clearer as to what the underlying hardware was going to be....

  81. I like VHDL... Here are some cool reasons why. by Xilinx_guy · · Score: 2, Informative
    Disclaimer #1: I work for Xilinx. Disclaimer #2: I used to teach VHDL, back in the late 90's. I too, voted on the IEEE effort for standardization on the synthesizable subset for VHDL, and boy what a waste of time that was. But I digress. Here are some cool reasons why VHDL is better than Verilog. 1. Recursion. You can write recursive hardware components that instantiate smaller versions of themselves. Recursion is cool, but tools hate it. The Xilinx tools complain about it, but will still produce the right hardware. Recursion can be used for Multipliers, adder trees, priority encoders, muxes, and just about anything where divide and conquer actually works. 2. Attributes. VHDL attributes translate straight to EDIF properties, and let you do cool stuff like physical design in an FPGA, EDIF properties in the netlist let you do anything from selecting the power-on state of a flop, to setting the logic function of a lookup table (LUT), or setting the initial value of a RAM. Even better, you can pass LOC (Location) or RLOC (relative location) properties, allowing you to physically place the location of a component in the target device. You can even specify directed routing constraints that lock down the signal path to a specific defined route. Verilog will sort of let you do this, but only in a pragma (code comment). Hence creating relatively placed soft macros controlled by top level generic parameters is possible in VHDL, but not in Verilog. 3. Compile time elaboration of constants. This sounds incredibly obscure, but is actually very powerful. During elaboration, constants are evaluated. Constants can be defined by an arbitrarily complex function call. These functions can perform arbitrary computation, as well as read and write files. A standard trick is to read a hex file from the design directory containing data to load into a RAM or a ROM. I use compile time function calls to do precomputation on stuff where I don't know the generic parameters in advance. An example of this would be a state machine to detect a serial unique word, with the states branches computed at compile time by function calls that calculate the state branches based on a unique word specified in a generic parameter. Or how about CRC's? You see people writing C programs to generate Verilog designs to calculate a CRC, but in VHDL, you can compute the parity matrices directly at compile time given a static CRC as a generic parameter. Once the parity matrix is generated, it's easy to generate the hardware to calculate it. It's a bit trickier to do error correction with a CRC, but also possible. These calculations are hideously difficult in Verilog. 4. Type REAL. VHDL has a floating data type REAL, and even a IEEE library REALMATH to use it with (Sine, Cosine, Tangent, etc). You can do very nice geometry calculations during elaboration with this library. Or, for the EE's, you can do stuff like generate coefficents for a raised root cosine filter in VHDL. Now REAL types can't be synthesized directly, since they have no direct hardware representation.. but REAL can be converted to INTEGERs, and integers can be turned in to real hardware with a precision of up to 32 bits. That's plenty in most cases in an FPGA.

    Now having said all that... System Verilog has a LOT going for it, and when the tools catch up to the Language Reference Manual, then it could be an extremely powerful design language. This presentation from DATE 2004 shows why. http://www.systemverilog.org/techpapers/date04_systemverilog.pdf

  82. THUD by 10am-bedtime · · Score: 1

    Time to shamelessly (neither VHDL nor Verilog) plug THUD. If you are a fan of parentheses (there is an "emacs" tag, above, after all), just imagine your LFSR components nicely bolded and stuff....

  83. What I've seen in NA by CertGen · · Score: 1

    I work for an FPGA company. Both languages are going strong. You'd do well to learn both. My experience says if you want to work in government, especially military, it's pretty much dominated by VHDL. And Verilog is the prevalent language in telco and video design.

  84. Verilog for industry by Anonymous Coward · · Score: 0

    As a Computer Enginnering Graduate, with experience in VHDL (coded 32-bit RISC based microprocessor), I would say go for Verilog.
    For one, the industry for which students need to be prepared, is using Verilog( I interviewed for Nvidia and they asked for Verilog, though they would "let" you code in VHDL).
    For another, since you say you're aware of C/C++, the syntax is somewhat similar, easing the learning curve,
    Hope, this helps,
    Shubham Harnal.

  85. Verilog.... by emh203 · · Score: 1

    If your target is synthesis for an FPGA I would go with Verilog. Here is the bottom line: Any synthesis function you could do in VHDL could always be done in Verilog with fewer lines of code and will look alot simpler. VHDL is very verbose. If you search the internet there was a neat article about a Verilog vs. VHDL "competition" where one had to synthesize a logic function (targeting real hardware) in a fixed period of time. Of the people that finished, those using verilog were able to yield results that could run at higher clock speeds with fewer lines of code.

  86. A vote for VHDL by Anonymous Coward · · Score: 1, Informative

    Disclaimer: I've been using VHDL design & verification for ~10 years (but also Verilog, and Specman E, PSL, etc.) & I'm a bit of language geek

    VHDL is more verbose, but more capable than Verilog. There are several points that in my opinion make VHDL a better language for teaching (and for design and simulation):
    1. It's *MUCH* harder to shoot yourself in the foot than with Verilog. VHDL is strongly typed (which is partly why it's more verbose) and generally when you write code you're not going to run into weird problems. Verilog is a minefield by comparison. Even very simple code can have race conditions & may synthesize differently from how it simulates. When I took a Verilog course many years ago, the first thing they handed us was fridge magnet with 7 rules (do/do not). If you don't follow those you risk shooting yourself in the foot. Nothing like that is required of VHDL.
    2. VHDL is a lot better for simulation than Verilog. Partly because of Verilog's problems, once you step away from the RTL design subset you run the risk of spending hours debugging stupid things that a VHDL compiler would've caught, or that wouldn't happen in VHDL. With VHDL you can write very sophisticated testbenches(1). As an example I've written some constrained random + coverage testbenches in the style of Specman (or SystemVerilog). Try doing that with plain Verilog.
    3. Verilog is a very simple language. It's harder to write reusable code. It's much easier to create parameterized, scalable, reusable blocks in VHDL through the use of generics and generate statements, multi-dimensional arrays, etc.. In fact this is my default style in VHDL. If it can be parameterized it should be. This applies especially to FPGA designs where the design requirements are typically more fluid than in ASIC designs. Also making designs parametric forces you to think more deeply about what you're implementing and to get to the core of an idea which in my opinion leads to cleaner, more maintainable code (again IMO a big deal for FPGA designs)

    Having said all that:
    1) VHDL seems to be on the wane a bit and the bastard child of Verilog, a.k.a System Verilog seems to be everyone's favorite language. There are definitely benefits to System Verilog. It's a much better language than Verilog. The problem is that it is based _on_ Verilog and shares many of the problems.
    2) As has been mentioned above a good designer should be able to pick up a new language quickly, especially the design subset and a seasoned designer should at least be able to read both languages. You _will_ run into both of them in your work even if your shop primarily uses one.
    3) It's true that ASIC designers tend to use Verilog, while FPGA designers seem to favor VHDL

    (1) BTW the reality is that if you're doing your job as a designer right, you spend *way* more time writing testbenches than writing synthesizable RTL

  87. EDA tools by dmesg0 · · Score: 1

    It isn't a secret in the EDA industry that VHDL gets much less developers attention than Verilog and SystemVerilog. In some products VHDL gets probably 1/5th time of Verilog and 1/20 of SystemVerilog (into which most resources are invested). Although the differences might be less striking in other fields, e.g. FPGA-related, it is still there. This leads to lower performance, bugs going unfixed for quite long time, few new features etc. So my recommendation would be to go with the market leader - Verilog.

  88. VHDL by Anonymous Coward · · Score: 0

    I like VHDL better. Sure the learning curve is steeper in terms of syntax but due to its different syntax students won't be as easily tricked into thinking that things are going to execute sequentially.

  89. Consider Xilinx System Generator by OutaControl · · Score: 2, Interesting

    I've found that I can substantially reduce VHDL development time using Xilinx System Generator and its toolbox for Matlab's Simulink . Writing VHDL graphically makes understanding and testing substantially easier (for me, at least).

    It has hand-coded VHDL equivalents for each Simulink function. Generate testbenches, hardware in the loop, etc. You can merge it directly with your own code by writing a simple high level wrapper. It interfaces easily with Chipscope as well (generates files to label each of your inputs).

  90. Give your students the choice by Anonymous Coward · · Score: 0

    Disclaimer: I haven't gone through all the comments but quite a few to get the gist of suggestions

    In school I worked my way on schematics in the first half of the course and was given a choice of learning either of Verilog or VHDL. I learned Verilog more because it was the language of choice in US. But, to tell the truth, people who learnt VHDL were able to translate ideas from schematics to code in a much more efficient way than Verilog.

    I struggled with Verilog for the first couple of months despite having a very strong background in OOPS.. While I did end up making a career in Verilog designs, I still think VHDL is more structured as a language and a far easier transition from schematics to code..

    Verilog though easy to learn will give you a far tougher time if you have a tendency of being a bit less systematic (VHDL forces you to be systematic) - probably more suited for testbench design rather than IC design.... That said Verilog is extremely flexible when implementing multiple threads / pipelines.

    In the end however it boils down to what the students want to learn and different students will have different background in programming. I would probably make VHDL as the suggested choice but keep it open to students to choose Verilog if they are comfortable.

  91. Probably Verilog by uarch · · Score: 1

    Much of the industry appears to be shifting towards Verilog but VHDL is still very common and is not going to disappear any time soon. If I had to make that decision I'd most likely choose Verilog because of this but it's not a simple, clear-cut choice.

    When I used to teach Verilog to college seniors & grad students I saw the syntax similarity to C as a problem for many students. Every one of them had a strong programming background and were used to the sequential nature of software. When you let them loose with some of the Verilog constructs it will take a while for most of them to understand the parallel nature of what the language is describing - I can't begin to count the number of times I saw someone try to 'call' a piece of hardware as a process or part of a for-loop as if it magically appeared to calculate a single result and then vanished into never-never land. Blocking & non-blocking assignments will also cause countless headaches. So will the ease at which you can throw down massive amounts of hardware with a few simple lines of Verilog. You can and will see students make similar mistakes with VHDL but I believe the syntax differences can help limit the problems.

    Ultimately, if the students need to use one in their career they will also need to use the other. No matter which one you choose they will easily be able to pick up the other as long as they understand what the HDL is truly describing.

  92. Advice from a former instructor of VHDL and FPGAs by StandardCell · · Score: 5, Informative

    It's been about ten years since my TAs and I taught the lab section of the advanced digital logic design at my university. I agree that, generally speaking, VHDL is a better teaching language than Verilog. Part of the reason is that Verilog, being much like C, is inherently procedural. You don't want to think procedurally with digital logic except for the specific case of state machine design, and even then you have to take into account concurrency. It is this fundamental aspect of concurrency in HDLs that is key to being able to design effectively. I can define twenty clocks going into counters, just like I can wear twenty watches on my arm and have them all tell time independently and/or at different speeds. You can't really do that with procedural languages unless you're talking about thread scheduling, and then this becomes a thread scheduling exercise when you have multiple threads. Even then, you will never be able to get the speed of digital logic because you have instruction fetch, instruction decode, etc. that introduce latency that cannot be reduced even in a multi-core CPU. Not thinking procedurally will help, and the strong typing of VHDL over Verilog will help greatly in my opinion. Those Karnaugh maps you talk about are fine to learn, but HDLs use case statements in VHDL that make state machine design trivial especially when you have >8 states.

    Beyond HDLs, however, are FPGAs and ASICs (and I've designed using both). Putting the differences between FPGA and ASIC aside, FPGA has some very specific ties to the vendor because of the way the FPGA is architected. Assignment of I/O, synthesis, and most of all timing constraints for guiding the "map place and route" tools for FPGAs are something you won't learn from VHDL alone (e.g. clock domain frequencies, max/min delays, input/output delays, false/multicycle paths, setup and hold times or worst-case timing paths in the design). These are essential to digital design, but not part of the HDL at all (see Synopsys SDC format for more info). In fact, shell scripts, sed/awk, Perl, TCL, Scheme and Python are also essential to know because they glue the various different tools together through scripting, processing of text files, tailing log files, and batching can be critical to being efficient. So is being thorough in understanding log file warnings and errors, timing reports. Electronic Design Automation or EDA tools also have their own idiosyncrasies, and you'll need to develop a stable "reference front-end and back-end design flow" if you haven't already. Do you use an Altera or Xilinx reference board, or an add-on PCI-based FPGA card? And how do you analyze what's coming and going at the interface? All of these questions need to be answered before you really get going on FPGAs. ASICs have an order of magnitude more complications for reasons I won't even discuss, but it just gets harder. So those state machines that you created without K maps will have synthesis pragmas that direct the compiler to create the appropriate state machine (e.g. One-hot for performance, Gray code for lower power, etc.).

    Finally, there's the work world. As other posters have mentioned, North America is primarily focused on Verilog while the rest of the world is VHDL. Most synthesizable IP cores for various functions come as Verilog. So, the truth is, you should know both major HDLs, but you would be better off being proficient in Verilog in the real world for the simple reason that it is the present and future (or at least its successors, such as System Verilog, are the future) are for many reasons. Also, in the work world, it's critical to know the major EDA vendor software and to put it on your resume (i.e. Mentor Graphics, Synplicity (for FPGA), Synopsys, in roughly that order, and Cadence and Magma for ASIC) as well as all those scripting and other languages like Perl and TCL that I mentioned. Don't completely ignore VHDL, however.

    As an ironic point, there are SystemC compilers for hardware that are becoming more and m

  93. Missing option: AHDL by tippe · · Score: 1

    I kid, I kid. Does anyone still use that language? FYI: AHDL was (is?) a proprietary HDL language designed by Altera for use with their FPGA. I had to modify a design that used it once. It was aweful. I'm glad I've never had to use it again...

    Anyway, I don't think it really matters what language you use to teach. According to the summary, this is a university (i.e. higher education) course, not some college training course. Teaching the proper hardware (ASIC, FPGA, whatever) design concepts should be your real challenge; what language you use to convey those concepts, to illustrate examples with, and require students to use in their assignments, projects and exams is (I would say) incidental. Maybe you should teach both, or hell, maybe you should teach only in AHDL and then require that your students use only VHDL or verilog for their assignments and projects (just kidding; that would be really evil).

    In university, my work-terms, and for the first 4 years of my career, I only worked only in VHDL (and very briefly in AHDL), as that was the language my school and employers used (I'm in Waterloo ON, which appears to have sided with the US east coast, which traditionally has been VHDL). 6 yrs ago I started work at another company that used only verilog. Becoming proficient at writing verilog from scratch took a little while (a week or two, tops), but understanding (the gist of) designs written in verilog took no time at all. In the grand scheme of things, learning a new language if you already have a solid understanding of underlying design concepts is practically zero cost. All you need to make a quick transition is a decent reference book (or the internet) to look up syntax and concepts, a deliverable, and a looming deadline to get you motivated. That's all I needed, anyway; I certainly didn't need to take any verilog courses. I would almost say that it's a much bigger conceptual jump to move from coding for FPGAs to coding for ASICs then it is to jump from VHDL to verilog or vice versa.

    So, personally, I would say that you shouldn't worry too much about the language, as that shouldn't be the primary focus of your course. It's definitely a required component to your course, but not the primary one. Concepts such as concurrent vs. sequential (processes), component inference vs instantiation, blocking vs non-blocking assignments, sequential vs combinatorial logic, zero-delay vs timing annotated simulation, synthesizable vs non-synthesizable logic, and a crap load of other digital design, simulation, synthesis, etc concepts are relevant in both languages and must be well understood before you can really be successful at designing with either of them.

  94. Re:I like VHDL... Here are some cool reasons why. by epine · · Score: 1

    That's a great post. Even if everything you say is wrong or outdated, it's still a great post. By the time I get all the right answers to the points you raised, I'll know a great deal about the subject that distinguishes experts from dilettantes.

    This entire thread is better than average, yet I'm nevertheless somewhat stunned at the number of people equating accessible with good, bloated with bad.

    A C program filled with assert() statements is more bloated than a C program without them. I guess it's partly a matter of whose dime is funding the learning process. If you're a student, shooting yourself in the foot with Verilog's fast and loose approach is a good learning experience (according to some posters here). They might be right.

    In my case, as an experienced developer shipping products to customers on a tight schedule without dedicated test resources, I'd rather not discover what Verilog allowed me to get away with after the product has already shipped. I know a lot about hardware, yet I have little formal experience with either VHDL or Verilog. Ultimately the customer doesn't care if my language of choice was bloated or not. I didn't write the VHDL component of this project myself, but I will end up maintaining it.

    Not sure what to make of the convenient C-like Verilog syntax. I guess engineers get away with uniglot more than the average programmer these days. Does the VHDL formalism occupy so much mental bandwidth that it impedes critical thinking and design? I tend to think that on a hardware project, critical thinking is close to the critical path. Am I naive? Are there aspects of hardware design akin to writing a throw-away app in Visual Basic?

    The last time I regarded syntax as a serious impediment was wrestling with a DSSSL style sheet. I wouldn't program in a language for eight hours a day with a syntax I actively disliked. These days this isn't much of a practical constraint, since I rarely program in a single language for more than a day or two at a go. It's been 15 years since I would eat, sleep, breathe a single programming language.

    I'm also a bit shocked at the number of people who prefer playing fast and loose with integer sign conversions. I tend to want to shoot C programmers who think that way. It's bad enough that addition of two unsigned quantities is not monotonic (without size extension). And that's *before* confusion about sign type creeps in.

    The surprise for me is that up until now, I had heard more about SystemC than System Verilog, which seems to be about 100 times more important. Hey, I learned something today on slashdot. Not quite sure where to file that.

  95. Old Notes on VHDL vs Verilog by Anonymous Coward · · Score: 0

    Perspective of Chip Design Industry:
    http://www.deepchip.com/items/dvcon07-02.html

    The War:
    http://www.cl.cam.ac.uk/~mjcg/Verilog/Cooley-VHDL-Verilog.html

    The competition:
    http://www.see.ed.ac.uk/~gerard/Teach/Verilog/manual/Example/lrgeEx2/cooley.html

    I used to design using VHDL. But, the moment I started Verilog, I did not look back again. VHDL is just verbose and counter intuitive.

  96. VHDL by Anonymous Coward · · Score: 0

    *) THIS is a "holy war"

    *) this means that my opinion is biased. But I live with it and even get things done !

    *) VHDL is a dog, is prone to syntax nazism and looks bloated.

    *) However VHDL is incredibly powerful, like PERL gone syntax nazy. You can do one thing 3 or 4 ways, as you like (when you know the several ways). This means that VHDL can do /anything/. Even a web server ;-D

    *) Now, Verilog (in my perspective) is nice to get "things done" like in C. But like C it trades compactness and writing speed for clarity and stability.

  97. Icarus Verilog - Open Source Simulator by Anonymous Coward · · Score: 0

    For many years, I was heavy VHDL proponent. Then I changed jobs and switched to Verilog. I now prefer the latter, but not a much I prefered VHDL in its days.

    When it comes to designing an FPGA course, I would now go for Verilog, for 1 reason only: the open source Icarus Verilog simulator. It's very slow, but feature complete for what you're trying to do. There are no usable free VHDL compilers...

  98. What about Labview? by Anonymous Coward · · Score: 0

    Labview has extensive graphical programming capabilities for their data acquisition boards; however, I don't know how easy it is to use their software for FPGA programming.

  99. Re:Advice from a former instructor of VHDL and FPG by daniel_newby · · Score: 1

    Part of the reason is that Verilog, being much like C, is inherently procedural.

    Huh? Verilog directly provides declarative and event-triggered logic.

  100. We did study this... by Anonymous Coward · · Score: 0

    In my second and third years of undergrad, we studied VHDL (one class each year). If I remember correctly VHDL is more based in the DoD attempts at standardization from the days when FPGAs were very first being developed. The professor told us that once we've got VHDL down, Verilog is supposedly very similar. Since that time, I've studied FPGAs independently on and off since they're really interesting. It seems that any tool capable of building systems off one can also build off the other. Honestly, I haven't even really seen any Verilog code...ever.

  101. Not in the context of FPGA/HDL synthesis it's not by StandardCell · · Score: 2, Interesting

    You're right that Verilog has those constructs, but they're strictly used for modeling. You either won't make synthesizable code out of them, or if it handles them it's done in an implicit way that you absolutely have to know what the implications are. Again, HDLs are not programming languages in the get-to-the-chip sense, they're concurrent systems description languages. Even more reason to leave Verilog alone at the outset and learn with VHDL.

  102. Re:Advice from a former instructor of VHDL and FPG by Jake73 · · Score: 2, Insightful

    Strongly disagree here.

    You can do about 99% of what most HDL folks do for FPGAs using Verilog and VHDL. Verilog does it in a more familiar syntax. VHDL requires considerably more pomp and fluff to accomplish the same goals.

    It's true that VHDL *may* be more appropriate for bigger, careful projects. But students need to learn principles without tools and other things getting in the way.

    Teach principles of HDL with the least roadblocks, then allow more in-depth study to accomplish more. The relatively few students that go on to use what they learn in a class in depth will learn as necessary. If you can get through to ALL of the students using simple tools and languages, then you can teach the fundamentals of HDL and that will stick with them for a long time to come.

  103. Verilog but don't use Xilinx ISE⦠by Anonymous Coward · · Score: 1, Interesting

    This post is remarkably well timed: I'm currently procrastinating over doing an assignment in Verilog for an undergrad course in FPGAs.

    I'd definitely pick Verilog. The main problem will be what you choose for compiling. If you use ISE 9.2 (the immediately obvious choice for a Spartan board), make sure you check your brake lines every time you get in the carâ"your students will hate you.

    I think Verilog offers the best combination of usability and actually learning about hardware.

  104. Verilog Of course... by tanveer1979 · · Score: 1

    I work in the EDA field now, and first 4 years of my career were spent in Design Verification.

    Based on what I see, VHDL is mostly on its way out. Most new innovations in design tools center around verilog. Due it its being more "free" as opposed to the super strict VHDL, its gaining popularity in the last bastions of VHDL, the european universities.
    Nowadays all big design companies use Verilog almost exclusively, with only legacy blocks in VHDL.

    So Verilog is the way to go, and also easier to learn. However beware, if you come from a software background, you will have difficulty adjusting to the "time" concept of logic programming languages. So brush up the design basics first, how to blocking/non-blocking statements work, and how does an "event" driven language work.

    --
    My Aurora : http://www.youtube.com/watch?v=o91ZsGwJYyg
    FB : https://www.facebook.com/TanveersPhotography
  105. verilog (from former designer and instructor) by Anonymous Coward · · Score: 0

    I used to do asic/fpga design in verilog and vhdl for a number of years as a consultant, then I taught digital design at university for 5 years, using both languages. As a number of the previous posts mentioned, it's vital to teach your students to think of hardware while writing the code. The language doesn't really matter, since you can easily learn the other if you need to. But I found that the students were able to do more sophisticated designs when taught verilog, as opposed to vhdl. I think that's because vhdl has a steeper learning curve - it's verbose and very picky. Verilog has a hidden learning curve because your compiler won't complain about some vital errors, as other posters have pointed out. Just stick with one language so that the students don't get confused.

    It's really important that you master your hdl, do lots of practice designs, because you'll helping your students do lots of debugging in the lab. In the lab, I tell my students that they have to show me a working simulation (i.e. testbench) and a successful synthesis check, before I will look at their hardware for evaluation or debugging. I tell them that they should have a correctly working simulation before trying to download to the board. Unfortunately, they usually don't listen and have trouble debugging their designs. Sadly, I've seem this practice too often in industry as well. I give zero marks for simulation, they have to show me working hardware. FYI, my students spend about 20-30 hours per week working on their designs, outside of scheduled lab/class time.

    Be sure to teach them about synchronous design, we get lots of strange attempts at funny clocking schemes (e.g. capturing input data) and inappropriate uses of resets. Keep changing your design projects every year, or else they'll just copy. Good luck with the course, it'll be a lot of work, but fun.

  106. Just Remember... Simulation /= Sythesis by TooManyNames · · Score: 1

    It doesn't really matter whether you choose VHDL or Verilog as long as you know what your synthesis tools are doing. Both languages are very different from C or other compiled languages in that C allows you to assume that statements will occur sequentially (and yes I know that statements may be re-ordered behind the scenes such that they don't break dependencies) whereas neither HDL will give you that guarantee. In fact, unless explicitly stated, HDL statements will all execute concurrently (and certainly won't wait for something like a clock edge).

    Now here comes the important part. You can write VHDL or Verilog such that your design will simulate perfectly (even without using simulation-only constraints like after statements in VHDL) but fail miserably when synthesized for an FPGA. In my experiences, this has almost always resulted from latches being inferred by the synthesis tools. This is where you need to know a little information specific to FPGAs; namely, code using latches offers no benefits over code using flip-flops when dealing with FPGAs. Much of the time, synthesis tools will just set up a combinational loop in the hopes that such latches will act as a they should (they usually won't) because most of the basic blocks that comprise an FPGA utilize flip-flops, not latches.

    If you're interested in a good source describing how to write VHDL for FPGAs, I'd suggest looking at Jiri Gaisler's method: http://www.gaisler.com/doc/vhdl2proc.pdf

    Also, avoid statements like: if clk'event and clk = '1' then .... end if; when statements like: if rising_edge(clk) then .... end if; work just fine (and are more readable).

    --
    "Is not a sentence" is not a sentence. Well damn.
  107. As a current undergrad I choose Verilog by Anonymous Coward · · Score: 0

    I am an undergraduate student at the University of Colorado and I can tell you that we use Verilog here. Verilog was easy to pick up while I find VHDL more difficult.

  108. Proper spelling of "holy war" by Anonymous Coward · · Score: 0

    "undecidable holy-war question along the lines of ATI/nVidia, AMD/Intel, Coke/Pepsi, etc...?"

    The first step for an undergrad student, before even attempting to learn anything complex like VHDL/Verilog would be to learn proper spelling of "holy war" in IT-related domains.
    Read my lips, it is spelled : "Vi vs. Emacs".
    Now insigthful people can understand you :-)

  109. VHDL IDE by Anonymous Coward · · Score: 0

    This is indeed an eternal, undecidable holy-war question...

    I vote for VHDL. Recently Sigasi released an Intelligent Development Environment for VHDL which relieves VHDL's verbosity and heavy syntax. This IDE is very similar to Eclipse and Visual Studio. It even has hardware refactoring support.

  110. LabVIEW by Anonymous Coward · · Score: 0

    If you don't care too much about syntax or learning a new programming language then there's an FPGA-module for LabVIEW which let's you program the FPGA using graphical programming. Then there's a xilinx compiler in the background which creates the bit-file for you.

    This being /., I'm probably going to be flamed for this... :)

  111. Re:Advice from a former instructor of VHDL and FPG by SlashWombat · · Score: 1

    VHDL is easier to use than Verilog (for me, at least). Verilog only appears C like on the surface, and it is exactly this which will catch you out in the long run.

    I would also disagree with Jake73's assertion that Verilogs syntax is more familiar. VHDL would be familiar to any who have used Pascal. (And, more to the point, VHDL is obviously a subset of ADA)

  112. Depends by Anonymous Coward · · Score: 0

    If you're planning to work in Europe, learn VHDL. If in USA, Verilog. Of course it's not bad to know both of them.

  113. I vote Verilog by happy_place · · Score: 1

    Fwiw, I vote verilog. There's a lot of legacy work done in VHDL, especially in government projects, but pretty much all new development is/has been/etc moving to Verilog, and with System Verilog being open source a lot of your verification tasks are even easier now. If you get a chance to use VCS, you can use C code and verilog together flawlessly. Verilog's rtl level grammar is easier to understand if you're at all familiar with programming concepts, and reads very much like C. Xilinx support for Verilog used to be pretty weak, but nowadays is on par with vhdl. I've worked with both, and find verilog easier to read because of the way that modules and interfaces can all be in a single file, where vhdl always had pieces more spread out, less contained modularly (though that might've been an implementation choice by vendors, dunno).

    --
    http://www.beanleafpress.com
  114. Some data by Anonymous Coward · · Score: 0

    For some empirical data that may be useful:
    http://www.deepchip.com/items/dvcon07-02.html
    The results, although two years old, show that Verilog is a bit more widely used.

    I've used both, and I prefer Verilog. Good luck with your course preparation.

  115. Re:Why use Handel-C when you can use the open sour by Anonymous Coward · · Score: 0

    It's not open source, it's a free (as in beer) online service that does not allow you to download any source code.

  116. Re:Advice from a former instructor of VHDL and FPG by tuxicle · · Score: 1

    I fully agree about VHDL making more explicit the fact that you're designing hardware, not writing code that gets executed sequentially.

    I'd think that it would be best for beginners to not bother with timing tools while they're still beginners. It tends to develop the tendency to "over optimize" right at the start. For the most part, simple (ie, low-speed) designs will work well even without timing constraints.

  117. The answer is both by imgod2u · · Score: 1

    It's like asking "C++ or Java?". It's not important. What is important is to understand the digital design concepts. Once you've gotten that down, the syntax you need to know in order to design synthesizable circuits in either language is actually quite trivial to learn.

    I think Verilog is a cleaner language myself. ASIC designers generally use Verilog whereas VHDL seems to be more dominant in Defense and government designs.

    Most good design books will provide both VHDL and Verilog examples. I would highly recommend "HDL Chip Design" by Douglas Smith. It's no longer in print -- and the used ones still sell for ~$200 -- but it is probably the best book on the topic you'll find.

  118. Your students will always need the other one. by stephen70edwards · · Score: 1

    Both are awful languages from a theoretical standpoint. Practically, the synthesis subset accepted by RTL tools renders them almost identical, although their spirits are actually quite different. VHDL is more verbose but has the more rigorous type system. I chose to teach it based more-or-less on a coin flip. Whatever you choose, your students' first employers will be using the other one, so it doesn't really matter. My class at Columbia can be found at http://www1.cs.columbia.edu/~sedwards/classes/2009/4840/

  119. Re:Advice from a former instructor of VHDL and FPG by imgod2u · · Score: 1

    Except that those "tools and stuff that gets in the way" is exactly what they should be learning. Every single VHDL compile error isn't just a "we're being anal" message. It's a disconnect between what the syntax is describing vs the logic that it will translate to. Hardware design is anal; it has to be accurate down to every bit. There is no room for ambiguity and "trusting the compiler".

    You can learn more about digital design concepts from VHDL compile errors than a week's worth of trial-and-error debugging of mistranslated Verilog.

  120. Re:Advice from a former instructor of VHDL and FPG by imgod2u · · Score: 1

    You can't avoid timing in hardware. It won't work without a clock. Synthesis won't run without specifications on how fast the thing will run.

  121. I recommend teaching both VHDL and Verilog by kojot350 · · Score: 0

    Consider teaching both. I'm a student and I've used VHDL in first semester and Verilog in second (a project). I've found very good book for students/beginners and it was fun to learn it with it, the book was Digital design and computer architecture By David Money Harris, Sarah L. Harris. http://books.google.com/books?id=5X7JV5-n0FIC&dq=digital+design+and+computer+architecture+solutions&printsec=frontcover&source=bn&hl=en&ei=T-EjSqP3NoWNjAe53b2rBg&sa=X&oi=book_result&ct=result&resnum=4

    --
    [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
  122. Start with verilog and graduate to VHDL by coolNsunny · · Score: 1

    First the quick answer - for what you need to do/achieve, Verilog sounds like the right choice. Focussing on digital design basics and synthesis is, IMO, far more important and crucial for beginners than worrying about language constructs. Although I wouldn't take that arguement too far and advocate that schematic entry is an acceptable choice instead of RTL. VHDL or Verolog will not teach you digital design. Just like C/C++ will not teach you computer architecture. VHDL vs Verilog choice becomes more important when the project's size (people) and complexity grows. For large and complex projects VHDL offers far more powerful constructs like generic programming (unconstrained ports) and abstraction (multiple entity-architecture, configuration etc) and the verbosity/cumbersomeness of the language is easily offset by the benefits. I have been an avid VHDL user for over 10 years. For sufficiently complex projects I have been able to convince and convert verilog users to adopt VHDL except for my current project where some people still use schematic entry - SIGH.

  123. Sun SPARC anyone? by kojot350 · · Score: 0
    --
    [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
  124. Re:Advice from a former instructor of VHDL and FPG by tuxicle · · Score: 1

    Yes sir, I'm fully aware that a synchronous design won't run without a clock. All I said was that you will get decent results even if you don't include timing constraints in your design for 80% of simple designs.

    Synthesis, in particular, doesn't need to know about clock speed. You only need timing constraints for place-and-route (and translate/map if you enable timing driven map). Then again, there's all this fancy stuff from Synopsis, but the OP is a beginner, and very unlikely to be using the fancy tools.

  125. MyHDL by jandecaluwe · · Score: 1

    Why not consider a HDL for the google generation :-)

            http://www.myhdl.org/doku.php

    This is Python used as a HDL - conversion to Verilog and VHDL included!

    Jan

  126. Re:Advice from a former instructor of VHDL and FPG by imgod2u · · Score: 1

    I don't think there's a single synthesis tool out there that will let you synthesize a design without at least a clock. Other timing constraints aside, without a clock specification, there's ambiguities as to how to synthesize it to synchronous logic.

  127. VHDL for teaching by ReplicantSD1 · · Score: 1

    Verilog gives you enough rope to easily hang yourself. VHDL gives you so little rope you'll want to hang yourself. As a vehicle for teaching H/W design though, I think VHDL would be better. It's much more explicit and rules oriented, and looks like you're describing H/W. Once you've learned VHDL, picking up Verilog is fairly trivial. I would think going in the other direction would be a bit harder. Language Bias Disclaimer: I've been using VHDL for 10 years, and Verilog for 2...

  128. Re:Advice from a former instructor of VHDL and FPG by tuxicle · · Score: 1

    *sigh* OK, you win the internetz. I guess I've been doing it wrong all these years.

  129. Re:Advice from a former instructor of VHDL and FPG by Jake73 · · Score: 1

    Well, if I have to spell it out for you, "more familiar" is meant to mean "statistically more familiar" since the vast majority of people learning HDL come from a C/Java/C# background in some manner. VERY few people have familiarity with Pascal and even fewer with ADA.

    If taught right, the "appears like C" doesn't involve a catch at all. (and by your argument, the fact that VHDL appears like Pascal would involve the same catch) HDLs are hardware description languages. It is extremely important to make that distinction early on. The appearance of an HDL like a procedural language is not a catch if taught in proper context. But this is the task of the instructor and is not associated with the particular HDL chosen.

  130. Tier 1 Universities teach VHDL. by Zoson · · Score: 1

    Quick searches of their course listings show that they all teach Verilog as an after thought. Many classes that mention Verilog in their course descriptions are actually listed as VHDL classes and don't mention Verilog at all in the course title. The most apt description of the mentality is: 'this is the good way to do it, but there are others that do it this way.'

    Personally, at Columbia we were taught VHDL as a virtue of our professors being from IBM and having written the actual spice software.

  131. Re:Advice from a former instructor of VHDL and FPG by Jake73 · · Score: 1

    Nonsense. Teaching the tool is the job of a vocational program. The theory of HDL will long out-last any particular errors or syntax that come about.

    Any course that targets a specific tool moves from being a life-long asset to being an educational experience that lasts only as long as those tools or languages are in-style.

    An HDL course should focus on the theory and practice of HDL. The choice of which HDL to use should be made based on which tool allows you to accomplish that goal as well as possible. The widespread use of both Verilog and VHDL make them good choices. But (I feel) that for most fundamental classes, VHDL involves too much unnecessary verbosity.

    In more advanced HDL work, VHDL begins to offer more. But with Verilog-2001, still not quite enough.

  132. Re:I like VHDL... Here are some cool reasons why. by Anonymous Coward · · Score: 0

    Disclaimer #1: I work for Xilinx. Disclaimer #2: I used to teach VHDL, back in the late 90's. I too, voted on the IEEE effort for standardization on the synthesizable subset for VHDL, and boy what a waste of time that was. But I digress. Here are some cool reasons why VHDL is better than Verilog.

    1. Recursion. You can write recursive hardware components that instantiate smaller versions of themselves. Recursion is cool, but tools hate it. The Xilinx tools complain about it, but will still produce the right hardware. Recursion can be used for Multipliers, adder trees, priority encoders, muxes, and just about anything where divide and conquer actually works.

    Exactly why you should not use it. With FPGAs you may be able to get way with relaying on the synthesis tool to understand your intent but ASIC tools have a MUCH harder job. They cannot be optimized for the target library and have other things to worry about like clock-gating. An ASIC designer should assume the worst from the tool. There are also FV issues.

    2. Attributes. VHDL attributes translate straight to EDIF properties, and let you do cool stuff like physical design in an FPGA, EDIF properties in the netlist let you do anything from selecting the power-on state of a flop, to setting the logic function of a lookup table (LUT), or setting the initial value of a RAM. Even better, you can pass LOC (Location) or RLOC (relative location) properties, allowing you to physically place the location of a component in the target device. You can even specify directed routing constraints that lock down the signal path to a specific defined route. Verilog will sort of let you do this, but only in a pragma (code comment). Hence creating relatively placed soft macros controlled by top level generic parameters is possible in VHDL, but not in Verilog.

    Physical constraints should not be in the RTL. This coding style is endemic in FPGA designs I've noticed. In ASIC flows a separate engineer is usually responsible for layout and he/she will greatly frown upon these.

    3. Compile time elaboration of constants. This sounds incredibly obscure, but is actually very powerful. During elaboration, constants are evaluated. Constants can be defined by an arbitrarily complex function call. These functions can perform arbitrary computation, as well as read and write files. A standard trick is to read a hex file from the design directory containing data to load into a RAM or a ROM. I use compile time function calls to do precomputation on stuff where I don't know the generic parameters in advance. An example of this would be a state machine to detect a serial unique word, with the states branches computed at compile time by function calls that calculate the state branches based on a unique word specified in a generic parameter. Or how about CRC's? You see people writing C programs to generate Verilog designs to calculate a CRC, but in VHDL, you can compute the parity matrices directly at compile time given a static CRC as a generic parameter. Once the parity matrix is generated, it's easy to generate the hardware to calculate it. It's a bit trickier to do error correction with a CRC, but also possible. These calculations are hideously difficult in Verilog.

    Things like compile-time constant calculations will drive validation engineers nuts. Why would you not calculate the constants once with an external script, then set it in your design? I find your statement interesting because ISE has many code generators which do exactly that.

    Verilog can very easily initialize memory from a file. However most ASICs do not support this so it is usually done to support validation.

    Again the right tool for the job. Verilog/VHDL should model the logic, not support the calculation of any arbitrary function. This just makes things harder for the synthesis

  133. LabVIEW FPGA module by Anonymous Coward · · Score: 0

    I've used LabVIEW FPGA module to develop FPGAs before. I found it to be rather intuitive, but compile times were very slow. I've never used Verilog or VHDL though so I can't compare.

    LabVIEW's FPGA module uses a graphical programming language named G, so you see what goes on visually.

  134. Oops...one critical mistake I should point out... by StandardCell · · Score: 1

    I meant to say that in my first paragraph that Verilog has both procedural and concurrent structures, and that its C-like syntax tends to push people to use more procedural constructs rather than concurrent which lead to gross compiler assumptions and/or non-synthesizability. In order to avoid confusion, I would therefore suggest that the strong typing in VHDL makes it easier to understand digital design in the context of an HDL. Sorry about the confusion.

  135. Re:Advice from a former instructor of VHDL and FPG by imgod2u · · Score: 2, Informative

    Nonsense. Teaching the tool is the job of a vocational program. The theory of HDL will long out-last any particular errors or syntax that come about.

    Except in this case the tool is intricately related to the "theory of HDL". This isn't some "sorry, you used \r\n instead of \n" issue. VHDL compile errors are real design issues. Basic issues that every designer needs to understand.

    Example:

    integer count;
    bit [8:0] bus;

    always @(posedge clk, negedge reset) begin
        if(reset == 0) begin
            count = 0;
        end else begin
            count = count + 1;
        end
    end

    assign bus = count;

    This is all legal in Verilog. Its equivalent VHDL would throw a huge fit. Does the student who uses Verilog for this understand how it will be translated? Design Compiler will do the following things "behind the student's back" with a list of warnings inside the log that most undergrads won't bother looking at:

    1. It will assign "bus" to the first 8 bits of count. This may or may not be the desired behavior.
    2. It will treat count as a signed integer, it's probable that it is meant to be an unsigned counter.
    3. It will optimize by encoding the counter in something other than BCD. The ambiguities of how the bits of "count" are assigned to "bus" with the encoding scheme of choice are non-obvious.

    VHDL makes you explicitly describe all of these things. It may seem a "pain in the ass" but these concepts are ones that any designer should understand *before* they commit something to silicon (or SRAM in the case of Xilinx).

    After you understand all of this, moving to Verilog will save you time (as long as you're careful) by letting the compiler do more of the manual translations for you.

  136. Misleading familiarity. by pavon · · Score: 1

    From the point of view of a student I strongly agree with StandardCell. In my CS program I learned both VHDL (in our Digital Electronics class) and Verilog (in CPU Architecture). The familiarity of Verilog created more problems than it solved (especially for folks who didn't learn VHDL in their digital class), because people tried to think about it like it was C, and use it like C, it isn't C. Frankly, learning a new syntax is a piece of cake, compared to getting students with a background in programming to wrap their head around the concept of designing circuits. VHDL is structured in a way that forces you to think about the design from a hardware point of view. Verilog may be good for larger projects, that need the higher level of abstraction that it provides, but that abstraction is a stumbling block for beginners.

  137. Re:Advice from a former instructor of VHDL and FPG by Jake73 · · Score: 1

    Yes, this is legal in Verilog and not in VHDL.

    But is it the compiler's job to teach the student?

    The two frameworks have equivalent issues here. Verilog just doesn't warn you about the type issues. But VHDL requires that you go through hoops to solve them. They BOTH require some level of understanding to solve the problem. That's where the instructor comes into it.

  138. Re:Advice from a former instructor of VHDL and FPG by imgod2u · · Score: 1

    An instructor is good but honestly, I've learned more from the compiler than I have from my instructors. That's why I said it's good for an introductory language. After you've learned VHDL, picking up Verilog is easy because you're already aware of all the gotcha's even if your instructor forgot them.

    And frankly, for most undergrad students, if they can be sloppy and get it to work (and then go drinking), they will. No matter how much the instructor emphasizes "this may or may not work, do it the other way and it's guaranteed to work", the students won't listen. It's great to have the compiler put a stop to that and actually force them to learn the design concepts.

    As for time spent, I'll use an anecdote. For my advanced digital design course as an undergrad, we designed a 32-bit MIPS processor. I did it in Verilog and put it on an FPGA. Our school didn't spend money on top-of-the-line FPGA's so we didn't have fancy features like ChipScope or JTAG debugging. Instead we had to use logic analyzers (running embedded windows and crashing a lot) and spare pins on the FPGA (there were only 12 to spare) as a test mux.

    We spent weeks sleeping in the lab debugging that thing. Couldn't figure out why bits 0-8 (or so we thought) of the instruction register didn't look right even though it was executing that instruction. Turns out that because we added an integer count (in the RTL) as an offset to the address of the counter to sequence through the testmux, the address became a 32-bit value instead of the 16 we specified. And because we didn't specify which bits were to be assigned to which of the testmux select lines, synthesis just randomly did it.

    That was one of many many many things that would've taken 3 seconds to correct when a VHDL compiler told you to "stop". Instead it took 14 hours. I almost destroyed that thing out of frustration.

  139. Both. And SystemC by thoglette · · Score: 1

    You must teach in VHDL. You need to teach Verilog.

    While Verilog is slowly adding features from VHDL, it's like comparing basic to e-lisp. The semantic possibilities in VHDL are significantly larger.

    However the most important thing to teach is good practice: solving the seven or eight basic fifo problems; async vs sync reset; various counter and adder types

    Just as programmers need to grok how their code gets turned into ASM, HDL coders need to grok the underlying hardware items that their compiler will spit out.

    And verification - where you can test and were you must review.

    And why coding style matters for test (eg. a parameterised loop can be verified by induction - a case statement cannot).

    Particularily for chips (vs fpgas) it's got to be right first time, every time. So you need "Code Compete" next to "Microprocessor architectures"

    ps - I designed chips from the mid eighties to the early noughties.

    --
    -- Butlerian Jihad NOW!
  140. Re:Advice from a former instructor of VHDL and FPG by Jake73 · · Score: 1

    What this should have taught you was to use simulation.

  141. Re:Advice from a former instructor of VHDL and FPG by imgod2u · · Score: 1

    Simulation was fine. RTL simulation produces the code behavior exactly.

  142. BASIC?!?!?!?!?! by mitologus · · Score: 1

    what about basic... without the "v i s u a l"... that would be a very interesting way to to program FPGAs... hey, tell you what? go ahead... GOTO not considered harmful anymore... I, GOD, give you permission and my blessing

    1. Re:BASIC?!?!?!?!?! by Anonymous Coward · · Score: 0

      what about basic... without the "v i s u a l"... that would be a very interesting way to to program FPGAs...
      hey, tell you what? go ahead... GOTO not considered harmful anymore... I, GOD, give you permission and my blessing

      wtf? what's wrong with you? just get Bill gates to rip off the codes from someone else, then get steve jobs to wrap it up in a in flashy minimalist design. There, problem solved.
      -real god

  143. Re:Advice from a former instructor of VHDL and FPG by Anonymous Coward · · Score: 0

    The syntax of a good subset of synthesizable vhdl for beginners is no harder to learn than verilog and will encourage them to give things the right type like signed and unsigned from the outset. So I personally feel VHDL is a better language because it is stricter and holds your hand a little bit more than verilog. And yes I do and have used both languages in the real world.

    Also pick up shell, tcl(a lot of tools use it), and python (for general text manipulation and powerful scripting).

  144. Re:Advice from a former instructor of VHDL and FPG by SlashWombat · · Score: 1

    Bet you have never done any hardware design. Combinatorial logic can easily be described in any HDL. The fact that the synthesis tool can extract clock events from the description is a plus! (And very desirable.) As far as requiring timing constraints ... most designs do not need them. But, this has as much to do with the design of modern FPGA's as much (probably MORE) as the synth tool. (Please do not forget that the PLACEMENT tool is actually the tool that attempts to match the timespecs in a design). Early FPGA's suffered in routing delay, every PIP (periperal interconnect point) added as much as a few nanoseconds delay. ...
    Anyway, there are often tricks for getting your design to run at the required speed. Pipelining is one such trick, but it does tend to make your head spin as you try to verify the design and keep all processes synchronised!

  145. dfdl.vhdl by happyjack27 · · Score: 1

    I would much rather program in dfdl.vhdl. Unfortunately, it's doesn't exist. It's a language that I designed only because Verilog and VHDL both suck so much. I felt compelled to show how to make a hardware description language that doesn't suck. So I did. And here's a sample of what the code looks like: circuit parallel_multiply( bit in1, bit in2; bit out) { in1*in2 | partial_products; partial_products | reduce(wallace_stage,3) | reduce(wallace_leaf,2) | ripple_adder | out; } circuit reduce( bit in; bit out; circuit reducer, int reduce_to) { bit stage; in | stage; while( max(stage.count)) > reduce_to) stage | reducer | stage'; stage | out; } circuit wallace_stage( bit in; bit out) { bit vertical, carry, sum; in,vertical | compressorn_nm2 | carry,sum,vertical; sum | out; carry | out; } circuit compressorn_nm2( bit in, bit down; bit carry, bit out, bit up) { while( a.count > 3) in-,in-,in-,in-,down-('0') | compressor4_2 | carry+,out+,up+; in | out; down | out; } That could be difficult to read, esp. if you don't know the syntax. But one could just as easily write clearer (if longer) code than this -- this was just to show the power and flexibility of the language. The equivalent in either VHDL or Verilog would be at least twice as long. I would LOVE to be able to program hardware in this language, instead of having to choose between two languages that were written back in the stone age.

  146. Maybe I can help by AltiumMan · · Score: 1

    I used to lecture in all this sort of stuff and I now work for Altium creating training videos. If your course is on _using_ FPGAs then I'd encourage you to not stop at the VHDL/Verilog languages. You're going to have to ask yourself if you are creating a HDL programming language course or a 'Designing with FPGAs' course. There are a number of higher level FPGA design systems out there that can raise abstraction above the HDL and will allow you to build FPGA systems much faster than you could with an HDL alone. Take a look at what Altium (www.altium.com) offers in terms of software AND hardware - they have a vendor neutral FPGA development platform that allows you to plug in different FPGAs (from different vendors) along with a whole heap of peripheral boards. I'm happy to talk you through it all if you have any questions. Marty