【发布时间】:2013-03-09 18:39:33
【问题描述】:
我有以下代码(它编码了一个按下按钮的数字):
with buttons select
tmp <= "000" when x"1",
"001" when x"2",
"010" when x"4",
"011" when x"8",
"100" when others;
code <= input(1 downto 0);
error <= input(2);
我试图在不使用tmp 信号的情况下重写它。是否可以?以下不起作用:
with buttons select
error & code <= "000" when x"1",
"001" when x"2",
"010" when x"4",
"011" when x"8",
"100" when others;
【问题讨论】: