3个回答
展开全部
你调用dff1这个程序
component
dff1
port(rd,d,clk:in
std_logic;
q:out
std_logic);
end
component;
下面编译的时候就自动会生成顶层文件。下面会自动产生dff1程序
component
dff1
port(rd,d,clk:in
std_logic;
q:out
std_logic);
end
component;
下面编译的时候就自动会生成顶层文件。下面会自动产生dff1程序
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
如下:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY dianzhen IS
PORT (clka,clkb:IN STD_LOGIC;
hangcon,liecon:OUT STD_LOGIC_VECTOR(15 DOWNTO 0)); END ENTITY dianzhen;
ARCHITECTURE dz OF dianzhen IS COMPONENT COUNT32 PORT( CLK1: IN STD_LOGIC;
QOUT1 : OUT STD_LOGIC_VECTOR(4 DOWNTO 0)); END COMPONENT; COMPONENT COUNT16 PORT( CLK : IN STD_LOGIC;
QOUT : OUT STD_LOGIC_VECTOR(3 DOWNTO 0)); END COMPONENT; COMPONENT ROWCON
PORT(DATAIN : IN STD_LOGIC_VECTOR(3 DOWNTO 0); ROW : OUT STD_LOGIC_VECTOR(15 DOWNTO 0)); END COMPONENT; COMPONENT XIANSHI
PORT(WEI : IN STD_LOGIC_VECTOR(3 downto 0); SHI : IN STD_LOGIC_VECTOR(4 downto 0);
Q : OUT STD_LOGIC_VECTOR(15 downto 0));
END COMPONENT;
SIGNAL d,e: STD_LOGIC_VECTOR(3 downto 0); SIGNAL f: STD_LOGIC_VECTOR(4 downto 0); BEGIN
u1: COUNT32 PORT MAP(CLK1=>clkb,QOUT1=>f); u2: COUNT16 PORT MAP(CLK=>clka,QOUT=>d); u3: ROWCON PORT MAP(DATAIN=>d, ROW=>hangcon); u4: XIANSHI PORT MAP(WEI=>e,SHI=>f, Q=>liecon); END ARCHITECTURE dz;
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY dianzhen IS
PORT (clka,clkb:IN STD_LOGIC;
hangcon,liecon:OUT STD_LOGIC_VECTOR(15 DOWNTO 0)); END ENTITY dianzhen;
ARCHITECTURE dz OF dianzhen IS COMPONENT COUNT32 PORT( CLK1: IN STD_LOGIC;
QOUT1 : OUT STD_LOGIC_VECTOR(4 DOWNTO 0)); END COMPONENT; COMPONENT COUNT16 PORT( CLK : IN STD_LOGIC;
QOUT : OUT STD_LOGIC_VECTOR(3 DOWNTO 0)); END COMPONENT; COMPONENT ROWCON
PORT(DATAIN : IN STD_LOGIC_VECTOR(3 DOWNTO 0); ROW : OUT STD_LOGIC_VECTOR(15 DOWNTO 0)); END COMPONENT; COMPONENT XIANSHI
PORT(WEI : IN STD_LOGIC_VECTOR(3 downto 0); SHI : IN STD_LOGIC_VECTOR(4 downto 0);
Q : OUT STD_LOGIC_VECTOR(15 downto 0));
END COMPONENT;
SIGNAL d,e: STD_LOGIC_VECTOR(3 downto 0); SIGNAL f: STD_LOGIC_VECTOR(4 downto 0); BEGIN
u1: COUNT32 PORT MAP(CLK1=>clkb,QOUT1=>f); u2: COUNT16 PORT MAP(CLK=>clka,QOUT=>d); u3: ROWCON PORT MAP(DATAIN=>d, ROW=>hangcon); u4: XIANSHI PORT MAP(WEI=>e,SHI=>f, Q=>liecon); END ARCHITECTURE dz;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询