[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [oc] Verilog coding style for Open Cores-RTL - Case in pointSHA1



Excuse me for barging into the discussion, but I couldn't
help myself... :-)

Rudolf Usselmann wrote:
> Two things here:
> 
> First of I want to re-state that I am totally against
> Coding/Design Guidelines, as every decent engineer will
> have his/her own style and will know what he is doing.

I agree with you... and not. In a company it is one thing, but
here we have an OC-case, meaning that any designer - who may have
a different coding style than the original author - should be
able take the OC and use it. If you do at least some common
guide lines that OC users are aware of, I believe that the
use of OC would increase drastically.

I also think that there are a large number of "decent" designers
out there who really writes crappy code, due to the abscense
of guide lines. They would really benefit from that. Without
removing the artistic freedom of course... :-)

> Second, Joachim, shame on you !!!
> 
> What Paul has written is perfectly legal and synthesizable
> code !

Yes it is, but I would never use it due to the enormous
potential for misunderstandings.


> Those are NOT delay statements ! Those are parameters that
> are passed the dffhr module. I admit it does look a bit
> misleading. What that really does is passes the number in
> "#(nnn)" to the modules firs parameter statement. 
> 
> Looking at Pauls code:
> 
> module dffhr (d, r, clk, q);
>   parameter WIDTH = 1;
> ....
> 
> Now, we see that that parameter is "WIDTH". So Paul is instantiating
> the "dffhr" module several times with different width ...

Yes. But for clearance the parameter could (and should) have been
included in the parameter list. Personally I find it horrible to
see the use of a parameter in a module that turns out not to be
the defined value, but instead a passed value from some other part
of the code. Often a completely different file.

I don't argue the validity of the statement, but the code style is
such that I would not use it, and I don't consider myself to be alone
in that standpoint.

The reason for OC is for people to use it, right? If people don't,
then whose fault is that?

Compare:

A man at the car dealer: "I would like to buy a Volvo".
The salesman: "That is ok, here you have a Saab."
Of course the buyer leaves the store.
The salesman: "Hey what? This car works just as good"

Who was right?

Ha de!

Björn Olsson
InformAsic AB

--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml