On Wednesday, April 24, 2013 19:58:37 David Riley wrote:
Well, "easy". Hardware description
languages have a steep
learning curve.
If you're just starting out on them, it's
probably helpful to remember that what you're doing is a
lot more like describing a schematic in text (much like a
SPICE netlist, though with some more "programmy" bits) than
programming in a language like C. If you have some template
code you're planning on working with, that's probably a good
start (there are lots of CPU projects on
opencores.org, as
well as a lot of other cores for interfaces like SPI if you
need them).
I learned much about the way a cpu is implemented from the example in
http://opencores.org/project,mcpu
which is a minimally simple design, but it shows the basic concept very
elegantly.
The other thing that helped me a lot is that with the behavioral languages you
should always have in the back of your mind some image of how it will
translate to hardware - ie, not think like 'if this happens, then it will do
that' but rather 'the if will cause a comparator to be made, which feeds an
enable signal towards X'.
Schematic capture can take you a long way, but it's much more 'hardware style'
work than VHDL or Verilog. I initially thought I would like schematic capture
a lot better, but after a couple of days of drawing, I changed my mind. The
initial setup is fairly doable, but changing your design can be a headache
with schematics. I think Altera's Quartus still lets you do schematics, but
I'm not so sure about Xilinx' ISE.