永发信息网

在VHDL中 alias是什么意思

答案:3  悬赏:80  手机版
解决时间 2021-04-06 23:00
在VHDL中 alias是什么意思
最佳答案
Formal Definition:

An alternate name for an existing named entity.
Complete description: Language Reference Manual §4.3.3.

Simplified Syntax:

alias alias_name : alias_type is object_name;

Description:

The alias declares an alternative name for any existing object: signal, variable, constant or file. It can also be used for "non-objects": virtually everything, which was previously declared, except for labels, loop parameters, and generate parameters.
Alias does not define a new object. It is just a specific name assigned to some existing object.
Aliases are prevalently used to assign specific names to slices of vectors in order to improve readability of the specification (see example 1). When an alias denotes a slice of an object and no subtype indication is given then the subtype of the object is viewed as if it was of the subtype specified by the slice.

If the alias refers to some other object than a slice and no subtype indication is supported then the object is viewed in the same way as it was declared.
When a subtype indication is supported then the object is viewed as if it were of the subtype specified. In case of arrays, the subtype indication can be of opposite direction than the original object (example 2).
Subtype indication is allowed only for object alias declarations.
A reference to an alias is implicitly a reference to the object denoted by the alias (example 3).

If an alias denotes a subprogram (including an operator) or enumeration literal then a signature (matching the parameter and result type) is required (example 4). See signature for details.

Examples:

Example 1
signal Instruction : Bit_Vector(15 downto 0);
alias OpCode : Bit_Vector(3 downto 0) is Instruction(15 downto 12);
alias Source : Bit_Vector(1 downto 0) is Instruction(11 downto 10);
alias Destin : Bit_Vector(1 downto 0) is Instruction(9 downto 8);
alias ImmDat : Bit_Vector(7 downto 0) is Instruction(7 downto 0);

The four aliases in the example above denote four elements of an instruction: operation code, source code, destination code and immediate data supported for some operations. Note that in all declarations the number of bits in the subtype indication and the subtype of the original object match.

Example 2
signal DataBus : Bit_Vector(31 downto 0);
alias FirstNibble : Bit_Vector(0 to 3) is DataBus(31 downto 28);

DataBus and FirstNibble have opposite directions. A reference to FirstNibble(0 to 1) is equivalent to a reference to DataBus(31 downto 30).

Example 3
signal Instruction : Bit_Vector(15 downto 0);
alias OpCode : Bit_Vector(3 downto 0) is Instruction(15 downto 12);
. . .
if Opcode = "0101" -- equivalent to if Instruction(15 downto 12) = "0101"
then
. . .

Both conditions are exactly the same, but the one where alias is used is more readable.

Important notes:

ˇ VHDL Language Reference Manual uses the name 'entity' to denote a language unit, i.e. object, parameter etc. It is completely different idea than a design entity.

ˇ Many synthesis tools do not support aliases.
全部回答
给信号取个别名.
在这里, 即信号sec取个别名lcount. 在程序代码中, lcount和sec占用相同逻辑单元.
alias别名的意思吧,大概意思是说,lcount是sec的别名。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
老爸的一句话让我,如何让摩羯男真的爱上你
正在做试管婴儿,打促排针卵泡促不起,怎么办
蚌埠有什么好玩的夜生活
单选题《京都议定书》是1997年在日本京都召开
星巴克 意式烤鸡帕尼尼价格 各类Panini价格
看看这只法斗市场价大约在多少
关于木的优美句子,求几句关于木头的感人的句
小米4手机怎么截图手机屏幕截图
1立方消解石灰等于多少吨?
仓鼠买回来了,笼子还没回来,可以养吗
沧州有什么中专学校,河北省沧州市有哪些中专
认证多了进项发票可以留抵吗?
生鸭肠多钱一斤
3月22日是“世界水日”,2005年世界水日的主
土建如何与水电 消防 幕墙装修进行施工配合和
推荐资讯
人生何必计较太多在乎太多。如果你太认真那么
演讲口才分为几个层次名次称呼
大丈夫男子汉下一句,男人励志名人名言
怎么教狗狗站立`已经学会了蹲下了哈哈
我国主要从澳大利亚进口的矿产是A.铁矿石B.天
新盖房子放破鞋什么意思?新盖房子,还没装修
java读取excel报错
在a、b两个烧杯内分别放等质量且质量分数相同
活泼可爱的反义词,什么样的女生比较可爱?
芦荟直接擦脸会使脸变黄吗
成语档案 ()精()锐怎么填
大志广告工作室地址在什么地方,我要处理点事
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?