阅读:1682回复:1
vhdl程序的一个小问题,请大家看看。
我在做一个串行数据到并行数据的转换。
signal data_in : std_logic; --输入串行数据 signal tmp : std_logic_vector(17 downto 0); --输出并行数据 16bit signal count : std_logic_vector(3 downto 0); --计数器 ....... 主要请大家看看数据移位的两种方式有什么区别: 第一种: if(count="0000")then tmp(15 downto 0)<=tmp(14 downto 0) & datain; ....... 第二种: if(count="0000")then tmp(15 downto 0)<=tmp(15 downto 0) * "10"; tmp(0)<=data_in; |
|