开发者

Are VHDL character substitutions ever used in real life?

开发者 https://www.devze.com 2023-02-20 03:44 出处:网络
VHDL allows the following substitutions, presumably because some computers might not s开发者_Python百科upport the vertical bar (or pipe symbol) (|) or the hash (or pound sign / number sign) (#):

VHDL allows the following substitutions, presumably because some computers might not s开发者_Python百科upport the vertical bar (or pipe symbol) (|) or the hash (or pound sign / number sign) (#):

case A|B can be written as case A!B

16#fff# can be written as 16:fff:

Any computer nowadays supports the vertical bar and the hash symbol, so I figured nobody uses these substitutions... Until somebody requested support for the exclamation mark.

My question: is this a lone case or are other people also using the exclamation mark as substitute for the vertical bar? Anybody using the colon?


Data point 1: Not me :)

And I've never seen it as far as I recall in any code - nor was I taught it at any point (in fact, this is the first I knew of those substitutions).

I had a quick look in Ashenden's Designer's Guide to VHDL, and the ! alternative is not even mentioned when the | is introduced for case statements.


These are inherited from Ada (in which they are obsolescent since Ada95). The Ada83 Rationale says "For portability reasons, it is possible to write any program in a 56 character subset of the ISO character set." in which ISO character set must be understood as ISO-646, aka ASCII (well ISO-646 has provision for replacing some characters for national variant, ASCII can be understood as the US national variant of ISO-646)

There is a third replacement: % can be use instead of " as string delimitor (both must be replaced).

I seem to remember that EBCDIC is using | or ! for the same code point depending on the variant.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号