C
Colin Paul Gloster
|---------------------------------------------------------------------------------------------|
|> |
|> |
|> |
|> |
|> |
|> > On Aug 29, 3:13 am, Colin Paul Gloster <[email protected]> |
|> > wrote: |
|> |
|[..] |
|[..] |
|> |
|> > > [..] I think the intention would be clearer with different |
|> > > indentation. [..] |
|[..] |
|> > Hi Colin, |
|> > Thank you for your support. |
|> |
|> > You are the first big canon who gave full support behind the keyword |
|> > 'orif' and gets full understanding of its meaning. |
|---------------------------------------------------------------------------------------------|
Hello Weng,
I neither provided support for nor opposed your proposal, I simply
tried to clarify for Jim whether the appearances of elsif were typos.
I am indifferent.
However, you clearly have not understood any of the responses so far
in this thread. At least three alternatives not needing a new language
were shown to you:
a synthesis tool worth using should be able to determine how to
efficiently implement a design;
a case statement;
and
one-hot encoding or something similar using PSL instead of an
attribute.
The PSL approach is the only one you have tried to respond to. If you
can not prove that what you want to achieve can not be achieved
well otherwise, then you will find it difficult to convince people who
do not want too many ways to achieve one thing.
Your lack of appreciation for how the case statement is relevant and
other things you have revealed to us indicate that your depth of
understanding of VHDL needs to improve and this is also not helping
people to take you seriously. Please read at least two good books with
decent VHDL content, e.g. at least one of those listed on
WWW.Ashenden.com.Au
, and read the books you choose twice each.
|---------------------------------------------------------------------------------------------|
|"> > My fighting for 'orif' recognition is not for my personal purpose, it |
|> > is in the interest of HDL industry and academic world." |
|[..] |
|> > 3. As keyword 'orif' definition says, 'orif' only provides information |
|> > about mutually exclusive property among a group of conditions. |
|> > Compilers can do what they think is the best strategy as they want. |
|> > But for FPGA, the 'orif' perfectly refers to carry chain structure in |
|> > both Xilinx and Altera (I am not familiar with other FPGA products), |
|> > it is a wonderful thing, but should not be a burden or a blame, as |
|> > Jonathan indicated. |
|---------------------------------------------------------------------------------------------|
I appreciate that you are genuinely being noble, but please understand
that you should not insist that orif must be implemented as a carry
chain. The designer writes in a HDL and the optimizer in the synthesis
tool finds an efficient way to implement something. Something from a
HDL might not always be represented the same way, depending on many
issues too complicated to explain here. Please understand this example
from Andy:
|---------------------------------------------------------------------------------------------|
|"> Any synthesis tool that cannot figure out the code below (rewritten |
|> from your example, but in standard vhdl with elsif) indicates mutually |
|> exclusive conditions should be immediately uninstalled and returned to |
|> the vendor for a full refund! |
|> |
|> if(two_bits = "00") then |
|> ... |
|> elsif(two_bits = "01") then |
|> ... |
|> elsif(two_bits = "10") then |
|> ... |
|> else <-- equivalent to "when others =>" |
|> ... |
|> end if;" |
|---------------------------------------------------------------------------------------------|
No matter how you improve your proposal for orif, you can not refute
this point of Andy's.
Weng posted:
|---------------------------------------------------------------------------------------------|
|[..] |
|> |
|> > > |--------------------------------------------------------------------------| |
|> > > |"[..] | |
|> > > | | |
|> > > |[..] The danger in adding new keywords is that they may | |
|> > > |conflict with a name (signal, ...) already used in someone's design | |
|> > > |and cause an old design to be a syntax error in the new language | |
|> > > |revision. This generally does not please people and means they | |
|> > > |have to add special handling for the file (compile flags). | |
|> > > | | |
|> > > |[..]" | |
|> > > |--------------------------------------------------------------------------| |
|> |
|> > > A newly introduced reserved word would be guaranteed to not conflict |
|> > > with old code by not being possible to misinterpret as a basic |
|> > > identifier (basic_identifier ::= letter { [ underline ] |
|> > > letter_or_digit), e.g. by starting with an underline or by containing |
|> > > a percentage sign. |
|> |
|> > > Best regards, |
|> > > Colin Paul |
|[..] |
|> > 3. "A newly introduced reserved word would be guaranteed to not |
|> > conflict |
|> > with old code" |
|> |
|> > Jim's opinion is that if you introduce a new keyword 'orif', then even |
|> > though 'orif' doesn't conflict with 'elsif', but it certainly would |
|> > conflict with old signal name orif. This can never be avoided." |
|---------------------------------------------------------------------------------------------|
This can easily be avoided as I had already showed: it would be legal
and easy to have a reserved word (e.g. _orif) which could never had
been used as a basic_identifier.
|---------------------------------------------------------------------------------------------|
|" But his |
|> > new function name zero_one_hot() still has the same possibility to |
|> > conflict with old signal function name zero_one_hot() if someone had |
|> > used it before, but he never mentioned his same possibility. |
|---------------------------------------------------------------------------------------------|
That would be true for plain VHDL without PSL, but he posted as if
zero_one_hot() is now part of VHDL from PSL (but it is not in my PSL
reference manual, unlike onehot0) so that would not necessarily
require that a VHDL identifier be changed. From the PSL standard:
"[..]
4.2.2 Keywords
Keywords are reserved identifiers in PSL, so an HDL name that is a PSL
keyword cannot be referenced
directly, by its simple name, in an HDL expression used in a PSL
property. However, such an HDL name can
be referenced indirectly, using a hierarchical name or qualified name
as allowed by the underlying HDL.
The keywords used in PSL are shown in Table 1.
[..]
onehot0
[..]
5.2.3 Built-in functions
PSL defines a collection of built-in functions that detect typically
interesting conditions, or compute useful
values, as shown in Syntax 5-20.
Syntax 5-20.Built-in functions
HDL_or_PSL_Expression ::=
PSL_Expression
PSL_Expression ::=
Boolean -> Boolean
| Boolean <-> Boolean
Built_In_Function_Call ::=
prev (Any_Type [ , Number [ , Clock_Expression ]] )
[..]
| onehot0 ( BitVector )
[..]"
|---------------------------------------------------------------------------------------------|
|"> The fact that orif must be indented from elsif, is a very poor way to |
|> indicate functional structure of code. [..]" |
|---------------------------------------------------------------------------------------------|
Andy,
Your example
enable := (others => '0');
for i in enable'range loop
if address = i then
enable(i) := '1';
end if;
end loop;
from is
easier to read with indentation than
enable := (others => '0');
for i in enable'range loop if address = i then enable(i) := '1'; end if; end loop;
and is condemning evidence against neither FOR nor IF.
|---------------------------------------------------------------------------------------------|
|"[..] |
|> zero_one_hot() can always be prefixed with the standard package name |
|> in which it is defined." |
|---------------------------------------------------------------------------------------------|
Andy,
Is zero_one_hot() defined in a package? Even if it is, Weng was
complaining that Jim complained that orif would clash with a
basic_identifier and Weng perceived this as hypocrisy as he thought
zero_one_hot() would also clash with a basic_identifier.
|---------------------------------------------------------------------------------------------|
|" Keywords, on the other hand cannot. I believe |
|> that tricks like '_' and '%' on the front of new keywords are a |
|> hideous hack, [..] |
|---------------------------------------------------------------------------------------------|
Actually _ would need to go to the front but % could go anywhere, not
that this would make you detest the ways in which new reserved words
can be added to VHDL (sorry to Verilog people reading this) with a
guarantee that old basic_identifiers will still be valid.
|---------------------------------------------------------------------------------------------|
|"[..] |
| |
|I can imagine if both methods, Jim's and mine, are introduced into |
|VHDL standard, I can bet with you: 99.9999% of engineers who use |
|mutually exclusive method to speed up their designs would use my |
|method. My basis is nobody who write 'if...eslif...end if' statements |
|today uses 2 separate parts as Jim suggested for zero_one_hot() to |
|write 'if...eslif...end if' statements. |
| |
|[..]" |
|---------------------------------------------------------------------------------------------|
Does the way that most reactions you have received are negative not
seem to indicate that maybe 99.9999% adoption of your proposal is
overly optimistic? It could be said that almost 99.9999% of people who
write in VHDL write the basic_identifier for detecting a clock edge
with "2 separate parts" even though a standard to use the
basic_identifier only once per detection was published alongside
VHDL93.
Regards,
Colin Paul
P.S. This thread is taking up a lot of time, I might not post denials
of mischaracterizations of me again until many days later as I need to
get other work done soon.
|> |
|> |
|> |
|> |
|> |
|> > On Aug 29, 3:13 am, Colin Paul Gloster <[email protected]> |
|> > wrote: |
|> |
|[..] |
|[..] |
|> |
|> > > [..] I think the intention would be clearer with different |
|> > > indentation. [..] |
|[..] |
|> > Hi Colin, |
|> > Thank you for your support. |
|> |
|> > You are the first big canon who gave full support behind the keyword |
|> > 'orif' and gets full understanding of its meaning. |
|---------------------------------------------------------------------------------------------|
Hello Weng,
I neither provided support for nor opposed your proposal, I simply
tried to clarify for Jim whether the appearances of elsif were typos.
I am indifferent.
However, you clearly have not understood any of the responses so far
in this thread. At least three alternatives not needing a new language
were shown to you:
a synthesis tool worth using should be able to determine how to
efficiently implement a design;
a case statement;
and
one-hot encoding or something similar using PSL instead of an
attribute.
The PSL approach is the only one you have tried to respond to. If you
can not prove that what you want to achieve can not be achieved
well otherwise, then you will find it difficult to convince people who
do not want too many ways to achieve one thing.
Your lack of appreciation for how the case statement is relevant and
other things you have revealed to us indicate that your depth of
understanding of VHDL needs to improve and this is also not helping
people to take you seriously. Please read at least two good books with
decent VHDL content, e.g. at least one of those listed on
WWW.Ashenden.com.Au
, and read the books you choose twice each.
|---------------------------------------------------------------------------------------------|
|"> > My fighting for 'orif' recognition is not for my personal purpose, it |
|> > is in the interest of HDL industry and academic world." |
|[..] |
|> > 3. As keyword 'orif' definition says, 'orif' only provides information |
|> > about mutually exclusive property among a group of conditions. |
|> > Compilers can do what they think is the best strategy as they want. |
|> > But for FPGA, the 'orif' perfectly refers to carry chain structure in |
|> > both Xilinx and Altera (I am not familiar with other FPGA products), |
|> > it is a wonderful thing, but should not be a burden or a blame, as |
|> > Jonathan indicated. |
|---------------------------------------------------------------------------------------------|
I appreciate that you are genuinely being noble, but please understand
that you should not insist that orif must be implemented as a carry
chain. The designer writes in a HDL and the optimizer in the synthesis
tool finds an efficient way to implement something. Something from a
HDL might not always be represented the same way, depending on many
issues too complicated to explain here. Please understand this example
from Andy:
|---------------------------------------------------------------------------------------------|
|"> Any synthesis tool that cannot figure out the code below (rewritten |
|> from your example, but in standard vhdl with elsif) indicates mutually |
|> exclusive conditions should be immediately uninstalled and returned to |
|> the vendor for a full refund! |
|> |
|> if(two_bits = "00") then |
|> ... |
|> elsif(two_bits = "01") then |
|> ... |
|> elsif(two_bits = "10") then |
|> ... |
|> else <-- equivalent to "when others =>" |
|> ... |
|> end if;" |
|---------------------------------------------------------------------------------------------|
No matter how you improve your proposal for orif, you can not refute
this point of Andy's.
Weng posted:
|---------------------------------------------------------------------------------------------|
|[..] |
|> |
|> > > |--------------------------------------------------------------------------| |
|> > > |"[..] | |
|> > > | | |
|> > > |[..] The danger in adding new keywords is that they may | |
|> > > |conflict with a name (signal, ...) already used in someone's design | |
|> > > |and cause an old design to be a syntax error in the new language | |
|> > > |revision. This generally does not please people and means they | |
|> > > |have to add special handling for the file (compile flags). | |
|> > > | | |
|> > > |[..]" | |
|> > > |--------------------------------------------------------------------------| |
|> |
|> > > A newly introduced reserved word would be guaranteed to not conflict |
|> > > with old code by not being possible to misinterpret as a basic |
|> > > identifier (basic_identifier ::= letter { [ underline ] |
|> > > letter_or_digit), e.g. by starting with an underline or by containing |
|> > > a percentage sign. |
|> |
|> > > Best regards, |
|> > > Colin Paul |
|[..] |
|> > 3. "A newly introduced reserved word would be guaranteed to not |
|> > conflict |
|> > with old code" |
|> |
|> > Jim's opinion is that if you introduce a new keyword 'orif', then even |
|> > though 'orif' doesn't conflict with 'elsif', but it certainly would |
|> > conflict with old signal name orif. This can never be avoided." |
|---------------------------------------------------------------------------------------------|
This can easily be avoided as I had already showed: it would be legal
and easy to have a reserved word (e.g. _orif) which could never had
been used as a basic_identifier.
|---------------------------------------------------------------------------------------------|
|" But his |
|> > new function name zero_one_hot() still has the same possibility to |
|> > conflict with old signal function name zero_one_hot() if someone had |
|> > used it before, but he never mentioned his same possibility. |
|---------------------------------------------------------------------------------------------|
That would be true for plain VHDL without PSL, but he posted as if
zero_one_hot() is now part of VHDL from PSL (but it is not in my PSL
reference manual, unlike onehot0) so that would not necessarily
require that a VHDL identifier be changed. From the PSL standard:
"[..]
4.2.2 Keywords
Keywords are reserved identifiers in PSL, so an HDL name that is a PSL
keyword cannot be referenced
directly, by its simple name, in an HDL expression used in a PSL
property. However, such an HDL name can
be referenced indirectly, using a hierarchical name or qualified name
as allowed by the underlying HDL.
The keywords used in PSL are shown in Table 1.
[..]
onehot0
[..]
5.2.3 Built-in functions
PSL defines a collection of built-in functions that detect typically
interesting conditions, or compute useful
values, as shown in Syntax 5-20.
Syntax 5-20.Built-in functions
HDL_or_PSL_Expression ::=
PSL_Expression
PSL_Expression ::=
Boolean -> Boolean
| Boolean <-> Boolean
Built_In_Function_Call ::=
prev (Any_Type [ , Number [ , Clock_Expression ]] )
[..]
| onehot0 ( BitVector )
[..]"
|---------------------------------------------------------------------------------------------|
|"> The fact that orif must be indented from elsif, is a very poor way to |
|> indicate functional structure of code. [..]" |
|---------------------------------------------------------------------------------------------|
Andy,
Your example
enable := (others => '0');
for i in enable'range loop
if address = i then
enable(i) := '1';
end if;
end loop;
from is
easier to read with indentation than
enable := (others => '0');
for i in enable'range loop if address = i then enable(i) := '1'; end if; end loop;
and is condemning evidence against neither FOR nor IF.
|---------------------------------------------------------------------------------------------|
|"[..] |
|> zero_one_hot() can always be prefixed with the standard package name |
|> in which it is defined." |
|---------------------------------------------------------------------------------------------|
Andy,
Is zero_one_hot() defined in a package? Even if it is, Weng was
complaining that Jim complained that orif would clash with a
basic_identifier and Weng perceived this as hypocrisy as he thought
zero_one_hot() would also clash with a basic_identifier.
|---------------------------------------------------------------------------------------------|
|" Keywords, on the other hand cannot. I believe |
|> that tricks like '_' and '%' on the front of new keywords are a |
|> hideous hack, [..] |
|---------------------------------------------------------------------------------------------|
Actually _ would need to go to the front but % could go anywhere, not
that this would make you detest the ways in which new reserved words
can be added to VHDL (sorry to Verilog people reading this) with a
guarantee that old basic_identifiers will still be valid.
|---------------------------------------------------------------------------------------------|
|"[..] |
| |
|I can imagine if both methods, Jim's and mine, are introduced into |
|VHDL standard, I can bet with you: 99.9999% of engineers who use |
|mutually exclusive method to speed up their designs would use my |
|method. My basis is nobody who write 'if...eslif...end if' statements |
|today uses 2 separate parts as Jim suggested for zero_one_hot() to |
|write 'if...eslif...end if' statements. |
| |
|[..]" |
|---------------------------------------------------------------------------------------------|
Does the way that most reactions you have received are negative not
seem to indicate that maybe 99.9999% adoption of your proposal is
overly optimistic? It could be said that almost 99.9999% of people who
write in VHDL write the basic_identifier for detecting a clock edge
with "2 separate parts" even though a standard to use the
basic_identifier only once per detection was published alongside
VHDL93.
Regards,
Colin Paul
P.S. This thread is taking up a lot of time, I might not post denials
of mischaracterizations of me again until many days later as I need to
get other work done soon.