Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

naming style for identifiers in verilog HDL

Status
Not open for further replies.

DSD

Newbie level 3
Joined
Nov 21, 2004
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
28
There are two familiar naming styles for identifiers (signal names, port names, module names etc) in verilog HDL.

1. Use lower case letters for all identifiers, for example, rx_flow.

2. Mix lower case letters and upper case letters for all identifiers, for example, RxFlow.

Which style do you use in your design? Why?

I prefer the second style because it is clearer and uses less letters.
 

dear friend,

Putying an underscore is not risky right?

also what to say advantage and disadvantage, its their wish, and easiness.

santu
 

You can read Verilog Coding guidelines of your organisation or client to adopt a proper naming convention
 

most of the organizations prefer the first one
if u want the 2 flopped version of signal say reset its better to name it as reset_2d or reset_dd

I too prefer the same!
naming convention is reqd to understand ur code easily to u and others! otherwise u waste time in understanding itself only!!
 

verilog is a case sensitive HDL...so to avoid having any syntax errors, i'd prefer to use the "all lower case letters with underscores"...(the first example you gave)...

it's important to avoid mixing the cases that may lead to misspelling identifiers...just stick to a unique coding style in all your codes, because mis-typed identifiers may infer an implicit net, without giving a syntax error...and that's a BIG PROBLEM...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top