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.

coding standard - explicit bus width in all assignments?

Status
Not open for further replies.

nachumk

Newbie level 4
Joined
Jul 27, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Mountain View, CA
Activity points
1,341
I have recently run across this Verilog coding standard:

Use explicit bus widths during assignments, connections, and reads:

reg [7:0] data;

always @ ...
data[7:0] <= ...

case (state[1:0])
...

mod mod_inst (
.d(data[7:0]),
...
);

I have serious issues with this, but I'm curious what others think.

Thanx,
Nachum
 

it seems a bit unnecessary, but can be helpful. It makes the user confirm that the connections are the correct width. I don't think many people will go through the hassle though.

My guess is that the code comes from someone who learned verilog this way, or took it from code samples.

A third possibility is that the code was auto-generated by a script. is that case, there might be a function that automatically expands the ranges when printing the code.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top