脑颅炸了,编了一个简单的移位程序。用到了sll函数。仿真结果看不懂啊!!!!
程序如下:library ieee;
use ieee.std_logic_1164.all;
entity m_sequence1 is
port ( clk : in std_logic;
V : outbit_vector(0 to 3));
end m_sequence1;
architecture behave of m_sequence1 is
signal q: bit_vector(0 to 3):="0001";
begin
process (clk)
begin
if clk'event and clk='1' then
q<= q sll 1;
END IF;
v<=q;
END PROCESS;
END BEHAVE;
仿真结果如下:
仿真结果: q的值不对啊,v的值对了,但是多出了红色圈圈那部分。并且长度还不一样 求解释。改了一天都没发现问题
页:
[1]