General > General Technical Chat

Let's clarify this whole fpga / vhdl / and all that

(1/4) > >>

A-sic Enginerd:
So Dave made a comment in his HW vs. SW blog that got me thinking. (Don't worry Dave, this isn't a 'let's bag on Dave session', you just got me thinking was all). ;)
I'm tossing this out there to maybe clear some of the mud for the newbies that are asking questions about what's what and how to get started, etc. I'd like to de-mystify at least this small corner of the world.

I've seen and heard multiple references from some of the EE's present here, that their view of what FPGA design is all about, what is it to write VHDL, and what not.

In one aspect, there's the need to understand the electrical interface to an FPGA so one can design a proper circuit around it, do a proper PCB, etc. However, the inner workings of the FPGA itself is a different realm. It's actually not VHDL design or even Verilog design, it's digital design. Now before anyone starts bagging on us poor digital pukes, let me mention for the newbies there's actually a whole lot more to digital design than just tossing down a few AND and OR gates with some flops in between. Is it any easier or harder than what an analog EE deals with? Neither. It's just different. Depends on the complexity of the problem at hand. Don't believe me it can get ugly? Pick up a book on DSP (digital signal processing) and prepare to dust off every math book you can lay your hands on. And yes there's a whole range in between.

So where does this VHDL or Verilog fit in? It's just a tool. This is where much of the confusion lies. Writing VHDL (shudder) or Verilog, or even System Verilog is not writing software. It may look a lot like software in syntax, but in terms of what becomes actual logic (the term is "synthesized") it's really digital design and the language is just the means to the implementation. Now if a team truly has software engineers that are not experienced digital designers, I cringe at the outcome of what that design will look like. What makes things even more muddled is when you start getting into the verification realm, then yes it does or can quickly become software design. Most of today's top notch ASIC verification engineers actually have their roots in software engineering. They generate the virtual testbenches and stimulus to wring out the RTL design before it's put to actual hardware.

One last comment for the newbies - the tools and skills used for FPGA design are largely the same for doing chip design. The backend tools get specialized (tools for place and route, floorplanning, etc) and will be different for FPGA vs. chip design, but all the same front end tools and methods are the same.

So if you managed to actually read through all that, I'm curious to hear from the analog EE's in the house.


EEVblog:

--- Quote from: A-sic Enginerd on May 04, 2010, 05:35:35 am ---In one aspect, there's the need to understand the electrical interface to an FPGA so one can design a proper circuit around it, do a proper PCB, etc. However, the inner workings of the FPGA itself is a different realm. It's actually not VHDL design or even Verilog design, it's digital design.

--- End quote ---

Correct. I was (and am) usually very liberal with my term "software" when referring to VHDL and other Hardware Description Languages (HDL's).

As for physical/electrical implementation of the FGPA, usually you also need a fairly intimate knowledge of how the part is going to be used in the "soft" realm as well. As FPGA's are in practice not the ideal "universal" "sea of gates".
Feed your clock into the wrong quadrant for example and oops, better re-spin that board!

And then when you start talking FPGA's with "hard" processor cores, the whole game shifts again.
The same can be said of microcontrollers too, and there are many people who consider microcontroller firmware as part of "digital design". At least at the lower interface levels.

For most hardware people, FPGA design in traditional schematic form is pretty easy and natural, but HDL is a different ballgame going from a very visual form to a coded form, and it usually takes some getting used to.


--- Quote ---Now before anyone starts bagging on us poor digital pukes, let me mention for the newbies there's actually a whole lot more to digital design than just tossing down a few AND and OR gates with some flops in between. Is it any easier or harder than what an analog EE deals with? Neither. It's just different. Depends on the complexity of the problem at hand.

--- End quote ---

True.
And digital is essentially just analog with hysteresis levels ;D


--- Quote ---Don't believe me it can get ugly? Pick up a book on DSP (digital signal processing) and prepare to dust off every math book you can lay your hands on. And yes there's a whole range in between.

--- End quote ---

DSP gets ugly because now you really are talking all about software algorithms and math.
Personally I'd put regular micro firmware in the "digital design" camp before I'd put DSP, but the point is pretty moot!


--- Quote ---So where does this VHDL or Verilog fit in? It's just a tool. This is where much of the confusion lies. Writing VHDL (shudder) or Verilog, or even System Verilog is not writing software. It may look a lot like software in syntax, but in terms of what becomes actual logic (the term is "synthesized") it's really digital design and the language is just the means to the implementation. Now if a team truly has software engineers that are not experienced digital designers, I cringe at the outcome of what that design will look like. What makes things even more muddled is when you start getting into the verification realm, then yes it does or can quickly become software design. Most of today's top notch ASIC verification engineers actually have their roots in software engineering. They generate the virtual testbenches and stimulus to wring out the RTL design before it's put to actual hardware.

--- End quote ---

Yep. By "FPGA software guys" I almost always mean hardware people who have a knack for the "soft side" of VHDL/Verilog.
It would be really hard for a pure software geek with no hardware experience to be any good at HDL's.

Dave.

DJPhil:
As a newb hobbyist myself I spent a bit of time recently looking rather broadly at different ways to attack a problem requiring a digital solution. In the end I decided to ground myself much more firmly in the analog world before diving into digital design. It was easy to see how fast things could get complicated (for me) if I strayed away from the most basic microcontroller projects into real microcontroller projects, discrete logic, or programmable array logic. I'm sure I'll build up to it, and it'll be fun for me, but the experience left me with a deep respect for those people who are gifted with an intuitive and/or trained understanding of logic as a concept. I'm still forming my impressions of the different aspects of the electronic world, and my brief peek at the realm of programmable logic left me with the impression that it's difficulty level (for me at least) is very high.

There are many aspects of analog design that I find just as challenging, but in a different way. The feeling in my head when contemplating the function of an analog circuit is one of flow, I tend to visualize electricity as fluid (often air, as in a pneumatic system, or occasionally water). It can be hard to keep track of a lot at once, and some schematics make my head want to pop when I look at them (buck/boost converters for example, or just about anything with an inductor). Digital circuitry is difficult for me to imagine like this (square waves with air, ouch), so I expect to have to retread my instincts before being able to understand digital circuitry more complex logic. I try to keep shifting my methods of visualization to avoid forming bad mental habits. It sounds weird but it's how my head works best. :)

Speaking to software vs. analog hardware vs. digital hardware vs. etc . . .
In my case it's probably best I never do any of the above professionally (see above weirdness). My advice would be to follow your passion, even if it leads you in a completely different direction altogether. I share Dave's opinion on the philosophy: specialize in your passion, have a working understanding and curiosity about other things. If at all possible avoid making a decision based on the job market or potential income, but if you're forced to do so then stay up to date on your passion and be ready when the opportunity comes. Also, respect passionate dedication in other people, they will be among the most valuable and enjoyable people to know.


--- Quote from: A-sic Enginerd on May 04, 2010, 05:35:35 am ---. . . tools for place and route, floorplanning, etc . . .
--- End quote ---

The bit about floorplanning reminded me of a picture I saw once, and sent me trying to track it down. I found it in Art of Electronics 2nd Ed. on page 851.

I'm not sure what floorplanning means in the context of chip design, but I thought this was awesome nevertheless. :)

A-sic Enginerd:

--- Quote from: EEVblog on May 04, 2010, 06:37:43 am ---It would be really hard for a pure software geek with no hardware experience to be any good at HDL's.

Dave.

--- End quote ---

Thank you thank you thank you!
Can't tell you how many times I just about collapse to the floor and roll my eyes when I'll be talking to a fellow engineer that doesn't understand HDLs and they say something like, "well it's just like writing software."

It's also the reason there have been lots of tools that have come and gone in the market with the intent to autogenerate a bunch of synthesizable RTL based on some other whiz bang input like a high level block diagramming tool or some other sort of functional level input. Good idea, but they had the wrong people writing the code for the part of the product that spits out the actual HDL. The tools usually don't last long before the company dries up. Stuff Dave would definitely cry out "Absolute heap of shit!!!" ;D

jahonen:
I think too that there is no way you can say that HDL is just another form of software, no way.

For example, average sequentially thinking software guy becomes very confused when he reads for example following VHDL code snippet which increments count if a is not '1' (although, doing this is not very wise because it is confusing):


if rising_edge(clk) then
  count <= count + 1;
  if a = '1' then
    count <= count;
  end if;
end if;


If you translate this blindly to C, the if statement would seem to be pretty useless. If you don't know how the FPGA (or VHDL signal rules work), efficient coding is pretty much difficult. I personally tend not to think about gates in FPGA, but LUTs followed by DFF:s (and lots of routing channels in between), which they essentially are, more or less.

And for me, digital signals are just non-linear wideband analog signals up to GHz range for harmonics content. It just makes sense.

Regards,
Janne

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version