在VHDL中 alias是什么意思

最近看VHDL方面的书见到了这样一句话:aliaslcount:std_logic_vector(3downto0)issec(3downto0);不知道这里的alias... 最近看VHDL方面的书见到了这样一句话:alias lcount :std_logic_vector(3 downto 0) is sec(3 downto 0);不知道这里的alias是什么意思?希望高手给指点下,谢谢 展开
 我来答
匿名用户
2012-07-27
展开全部
alias别名的意思吧,大概意思是说,lcount是sec的别名。
舒仕福
2023-07-11 广告
eor有以下两种含义:1. eor是计算机术语,表示二进制异或运算。在计算机逻辑运算中,算术逻辑执行二进制按位异或运算,两数执行异或后相同位结果为0,不同位结果为1。2. eor也表示在任何时期,向地层中注入流体、能量,以提高产量或采收率的... 点击进入详情页
本回答由舒仕福提供
百度网友4327fcbb9b
2015-08-13 · 知道合伙人教育行家
百度网友4327fcbb9b
知道合伙人教育行家
采纳数:26425 获赞数:292064
从师范学校毕业后一直在现在单位工作

向TA提问 私信TA
展开全部
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.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
威芯法16
2012-08-06
知道答主
回答量:8
采纳率:0%
帮助的人:4.3万
展开全部
给信号取个别名.
在这里, 即信号sec取个别名lcount. 在程序代码中, lcount和sec占用相同逻辑单元.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式