一道题,用vhdl写

2019-03-25 09:14发布

写出相应的vhdl描述,求大神帮忙。。。 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
9条回答
小龚
2019-03-25 14:52
喔,我自己写了一个
代码:----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date:    14:22:13 05/20/2012
-- Design Name:
-- Module Name:    some - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity some is
    Port ( A : in  STD_LOGIC;
           CLK : in  STD_LOGIC;
           C : out  STD_LOGIC;
           Z : out  STD_LOGIC);
end some;

architecture Behavioral of some is
signal s1:std_logic;
signal s2:std_logic;
signal s_z:std_logic;
signal s_c:std_logic;
begin
process(clk)is
begin
if(clk'event and clk='1')then
  s1<=a;
  end if;
   
end process;
s2<=s1 and a;
process
begin
  wait until clk'event and clk='1';
  s_c<=s2;
end process;
process
begin
  wait until clk'event and clk='1';
  s_z<=s1;
  end process;
  z<=s_z;
  c<=s_c;


end Behavioral;
实现了该电路图,但是我觉得太低效了。。自动转换会更高效吗?怎样自动转换,还望详细介绍。。

一周热门 更多>