Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Include file extension: ".v" vs ".vh"?

7,038 views
Skip to first unread message

Andreas Ehliar

unread,
May 4, 2007, 2:54:26 AM5/4/07
to
I've seen both ".v" and ".vh" used as extensions for
`include files. Although Verilog doesn't care about the
extension name at all I'm wondering what people in this
group prefer.

Is it common to use ".vh"? I've only seen it in a couple
of places, whereas I've seen ".v" in lots of designs at
for example opencores.

/Andreas

gabor

unread,
May 4, 2007, 8:38:08 AM5/4/07
to

For me it depends on what's in the file I'm including.
I hadn't seen the .vh convention, but I use .v when
there is behavioral code in the file, mostly to convice
the editor to properly format and keyword highlight, etc.

When the file is only `define etc. I usually use a .inc
(include) file extension. This helps recognize the
file as something that is not compilable by itself.

Mostly I try not to use `include if I can avoid it.

Regards,
Gabor

Edmond Coté

unread,
May 4, 2007, 10:25:25 AM5/4/07
to
On May 4, 2:54 am, Andreas Ehliar <ehl...@lysator.liu.se> wrote:

I have typically used .v

FYI, SystemVerilog supports packages that can be loaded with the
import keyword, much like a C++ namespace. Depending on which tools
you have access to, you may want to check that out.

Edmond

unfrostedpoptart

unread,
May 4, 2007, 12:40:00 PM5/4/07
to
On May 3, 11:54 pm, Andreas Ehliar <ehl...@lysator.liu.se> wrote:
> I've seen both ".v" and ".vh" used as extensions for
> `include files. Although Verilog doesn't care about the
> extension name at all I'm wondering what people in this
> group prefer.

I've seen .vh used for Verilog header files, containing `defines, and
`included in other .v files.

David

Petter Gustad

unread,
May 4, 2007, 4:58:56 PM5/4/07
to
gabor <ga...@alacron.com> writes:

> Mostly I try not to use `include if I can avoid it.

Ditto.

Petter

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

0 new messages