P
parag_paul@hotmail.com
Guest
I dont get it ,
Why is Verilog as a language allowing you what Hardware ideally should
not ?
Why is Verilog as a language allowing you what Hardware ideally should
not ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I don't think so.I dont get it ,
Why is Verilog as a language allowing you what Hardware ideally should
not ?
The port direction is basically advisory. I guess that this isI dont get it ,
Why is Verilog as a language allowing you what Hardware ideally should
not ?
Obviously VHDL is different, and it does not go beyond the semanticOn Mon, 11 Jun 2007 15:47:32 -0700, "parag_p...@hotmail.com"
parag_p...@hotmail.com> wrote:
I dont get it ,
Why is Verilog as a language allowing you what Hardware ideally should
not ?
The port direction is basically advisory. I guess that this is
historically related to port collapsing in XL, where your port
probably ends up as an inout anyway. The LRM specifically says "A port
that is declared as input (output) but used as an output (input) or
inout may be coerced to inout. If not coerced to inout, a warning has
to be issued".
In other words, a simulator can do pretty much what it wants, although
a synthesiser or linter should flag this as an error for you.
As for the second part of your question, well, VHDL is different,
isn't it?
Evan
Thanks EvanI'm afraid that I don't understand most of your reply. Can you put
some more words in it, and redraw your diagram showing signal
directions and connections?
Your basic question seems to be why Verilog allows something that VHDL
doesn't. As I said, they're different. In this particular case,
because of a historical accident, the Verilog LRM allows something
which is both illogical and incorrect, and this is Not A Good Thing.
The text in the LRM is not attempting to justify this, because it's
not justifiable. The text just allows EDA vendors to write tools that
will accept old models that use this "feature".
Don't write code that does this because, as you've found out, your
simulator may not tell you that you've made a mistake.
Also another doubt I have is, " I read somewhere in debug that for anOn Jun 12, 5:56 pm, Evan Lavelle <nos...@nospam.com> wrote:
I'm afraid that I don't understand most of your reply. Can you put
some more words in it, and redraw your diagram showing signal
directions and connections?
Your basic question seems to be why Verilog allows something that VHDL
doesn't. As I said, they're different. In this particular case,
because of a historical accident, the Verilog LRM allows something
which is both illogical and incorrect, and this is Not A Good Thing.
The text in the LRM is not attempting to justify this, because it's
not justifiable. The text just allows EDA vendors to write tools that
will accept old models that use this "feature".
Don't write code that does this because, as you've found out, your
simulator may not tell you that you've made a mistake.
Thanks Evan
In the diagram what I meant was that , suppose a is an input port and
is conencted to an output port in the instantiated module ( VHDL
perspective )
How is the simulator correct in not allowing me to do so. It say ,
port mismatch, although the concept of port coercion can happen , isnt
it?
I think VHDL simulator is at fault or is the behavior correct,
Moreover you cannot write an input port in your VHDL process saying
that it cannot be written to as it is an input port. But when you use
pli or debugger you are allowed to force a value there
Are we even getting near some code of strictness when it comes to
debug or everything goes
VHDL is a more formally defined language with stricter rules. ItsI dont get it ,
Why is Verilog as a language allowing you what Hardware ideally should
not ?
So there is no concept of coercing in VHDL ?parag_p...@hotmail.com wrote:
I dont get it ,
Why is Verilog as a language allowing you what Hardware ideally should
not ?
VHDL is a more formally defined language with stricter rules. Its
port connections are rather like software subprogram arguments, with
fixed directions. Its hierarchical resolution for drivers at
different levels of hierarchy is elegantly defined, but is not much
like real hardware.
Verilog is more quick-and-dirty. Its port connections (at least when
collapsed) act more like hardware. Unless a hardware connection has
buffering logic, it is just a wire with no inherent direction, and can
drive either direction. Its flat resolution for all drivers on a net
matches real hardware.
It is just a difference in language design philosophy. Each has
advantages and disadvantages, and different people prefer each. If
they were the same, there wouldn't be two different languages.