大神
这个程序的仿真程序怎么编?、
!!!急急急!!!
entity djs is
port(
clock,en,aclr:in std_logic;
grpsl:in std_logic_vector(3 downto 0);
q:buffer std_logic_vector(4 downto 0);
bell:out std_logic
);
end djs;
architecture behave_djs of djs is
begin
process(clock,aclr)
begin
if (aclr='1') then
q<="01010";
else
if rising_edge(clock) then
if en='1' then
q<=q-1;
if (q="00000" or grpsl="0000") then
bell<='1';
else
bell<='0';
end if;
end if;
end if;
end if;
end process;
end behave_djs;
这个程序的仿真程序怎么编?、
!!!急急急!!!
entity djs is
port(
clock,en,aclr:in std_logic;
grpsl:in std_logic_vector(3 downto 0);
q:buffer std_logic_vector(4 downto 0);
bell:out std_logic
);
end djs;
architecture behave_djs of djs is
begin
process(clock,aclr)
begin
if (aclr='1') then
q<="01010";
else
if rising_edge(clock) then
if en='1' then
q<=q-1;
if (q="00000" or grpsl="0000") then
bell<='1';
else
bell<='0';
end if;
end if;
end if;
end if;
end process;
end behave_djs;