R
rickman
Guest
I thought a few of you might be interested in how my trial switch to
Verilog for my last project went. I have to say although there were
some surprises all in all it was a success and showed me that Verilog
is a lot easier to use and live with than Verilog.
One of the surprises was just the predicted issue of signed arithmetic
when defaults are used. I made a mistake of treating a counter as an
integer and used an expression like (0 > (count - 1)). In simulation
this never became true because the counter just wrapped around as an
unsigned number. That was a victory for strong typing! But I found
that relatively quickly and only scratched my head for a couple of
minutes. However, this was a small project and I'm sure on a larger
project this could be a more time consuming issue. So in the future I
need to learn the exact rules for signed and unsigned arithmetic so I
can develop a style that lets me work without causing this type of
error.
I found a few things I could do in Verilog easily that I thought I
couldn't do in VHDL. But when I dug into them more the real issue was
that I was working with an older compiler that included Verilog 2001,
but did not include VHDL 2008. It's amazing what can happen in a mere
seven years!
But the big thing was just how easy it is to write in Verilog compared
to all the verbosity of VHDL. Not just the extra typing, but extra
thinking that had little to do with addressing the design problem but
rather how to work with the language to express my solution to the
design problem. Even my test bench was a lot easier writing than my
typical test benches in VHDL. The readmemh system task was great! I
could even add comments to the data file!
The hardware for my design has not been built yet, so the design has
not been tested in the chip. But my record is usually that the design
works pretty well right out of the box. But then most of my designs
aren't all that complex. I haven't done a large design in years.
Although, a small design today was a large design 10 years ago....
Rick
Verilog for my last project went. I have to say although there were
some surprises all in all it was a success and showed me that Verilog
is a lot easier to use and live with than Verilog.
One of the surprises was just the predicted issue of signed arithmetic
when defaults are used. I made a mistake of treating a counter as an
integer and used an expression like (0 > (count - 1)). In simulation
this never became true because the counter just wrapped around as an
unsigned number. That was a victory for strong typing! But I found
that relatively quickly and only scratched my head for a couple of
minutes. However, this was a small project and I'm sure on a larger
project this could be a more time consuming issue. So in the future I
need to learn the exact rules for signed and unsigned arithmetic so I
can develop a style that lets me work without causing this type of
error.
I found a few things I could do in Verilog easily that I thought I
couldn't do in VHDL. But when I dug into them more the real issue was
that I was working with an older compiler that included Verilog 2001,
but did not include VHDL 2008. It's amazing what can happen in a mere
seven years!
But the big thing was just how easy it is to write in Verilog compared
to all the verbosity of VHDL. Not just the extra typing, but extra
thinking that had little to do with addressing the design problem but
rather how to work with the language to express my solution to the
design problem. Even my test bench was a lot easier writing than my
typical test benches in VHDL. The readmemh system task was great! I
could even add comments to the data file!
The hardware for my design has not been built yet, so the design has
not been tested in the chip. But my record is usually that the design
works pretty well right out of the box. But then most of my designs
aren't all that complex. I haven't done a large design in years.
Although, a small design today was a large design 10 years ago....
Rick