现代电子技术综合实验报告—简易数字频率计(2)
现代电子技术综合实验报告—简易数字频率计,基于XILINX的FPGA设计的简易频率计,用ISE仿真,采用VHDL编程,
clkout10 : in STD_LOGIC;
clkout100 : in STD_LOGIC; fout : out STD_LOGIC; dp1 : out STD_LOGIC; dp2 : out STD_LOGIC); end gate_sel;
architecture Behavioral of gate_sel is
signal se:STD_LOGIC_VECTOR(2 downto 0):="000"; signal f01,f001:std_logic:='0'; begin
process(se1,se10,se100,clkout1,clkout10,clkout100) begin
se <= se1 & se10 & se100; case se is
when "100" => fout <= clkout1; dp1 <= '1'; dp2 <= '1'; when "010" => fout <= clkout10 ; dp1<= '1'; dp2<= '0'; when "001" => fout <= clkout100 ; dp1<= '0' ; dp2<= '1'; when others => null; end case; end process; end Behavioral;
仿真测试:
门控电路
源程序:
-- Company: -- Engineer: --
-- Create Date: 18:53:38 09/15/2011 -- Design Name:
-- Module Name: gate_control - Behavioral -- Project Name: -- Target Devices: -- Tool versions: -- Description:
----------------------------------------------------------------------------------
现代电子技术综合实验报告—简易数字频率计,基于XILINX的FPGA设计的简易频率计,用ISE仿真,采用VHDL编程,
--
-- Dependencies: --
-- Revision:
-- Revision 0.01 - File Created -- Additional Comments: --
---------------------------------------------------------------------------------- library IEEE;
use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM;
--use UNISIM.VComponents.all;
entity gate_control is
Port ( Bsignal : in STD_LOGIC; Gate : out STD_LOGIC; Reset : out STD_LOGIC; Latch : out STD_LOGIC); end gate_control;
architecture Behavioral of gate_control is signal G1,G2,G3:STD_LOGIC:='0';
signal sel:STD_LOGIC_VECTOR(2 downto 0); begin
process(Bsignal,sel,G1) begin
if rising_edge(Bsignal)
then G1 <= not G1; end if;
if falling_edge(Bsignal) then
G2 <= not G1; end if;
end process; Latch<=G2; Gate<=G1;
现代电子技术综合实验报告—简易数字频率计,基于XILINX的FPGA设计的简易频率计,用ISE仿真,采用VHDL编程,
process (Bsignal,sel,G1,G2) begin
sel<=Bsignal & G1 & G2;
if (sel="001") then G3 <= '1'; else G3 <= '0'; end if;
end process; Reset<=G3; end Behavioral;
仿真测试:
此门控电路在gate为高电平的时候开始计数,latch为高电平的时候锁存,reset为高电平的时候计数器清零。
频率计数器
同步级联
现代电子技术综合实验报告—简易数字频率计,基于XILINX的FPGA设计的简易频率计,用ISE仿真,采用VHDL编程,
异步级联
源程序:
---------------------------------------------------------------------------------- -- Company: -- Engineer: --
-- Create Date: 11:08:36 09/15/2011 -- Design Name:
-- Module Name: counter6 - 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; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM;
--use UNISIM.VComponents.all;
entity counter6 is
Port ( Csignal : in STD_LOGIC; clear : in STD_LOGIC; count_en : in STD_LOGIC;
现代电子技术综合实验报告—简易数字频率计,基于XILINX的FPGA设计的简易频率计,用ISE仿真,采用VHDL编程,
over : out STD_LOGIC;
result1 : out STD_LOGIC_VECTOR (3 downto 0); result2 : out STD_LOGIC_VECTOR (3 downto 0); result3 : out STD_LOGIC_VECTOR (3 downto 0); result4 : out STD_LOGIC_VECTOR (3 downto 0); result5 : out STD_LOGIC_VECTOR (3 downto 0); result6 : out STD_LOGIC_VECTOR (3 downto 0)); end counter6;
architecture Behavioral of counter6 is signal carry_out1:STD_LOGIC:='0'; signal carry_out2:STD_LOGIC:='0'; signal carry_out3:STD_LOGIC:='0'; signal carry_out4:STD_LOGIC:='0'; signal carry_out5:STD_LOGIC:='0'; signal carry_out6:STD_LOGIC:='0'; signal temp:STD_LOGIC:='0'; COMPONENT counter
Port ( rst : in STD_LOGIC; clk : in STD_LOGIC; carry_in : in STD_LOGIC; carry_out : out STD_LOGIC;
count_out : out STD_LOGIC_VECTOR (3 downto 0));
END COMPONENT; BEGIN
c1:counter PORT MAP ( clear, Csignal, count_en,carry_out1,result1) ; c2:counter PORT MAP ( clear, carry_out1, count_en,carry_out2,result2) ; c3:counter PORT MAP ( clear, carry_out2, count_en,carry_out3,result3) ; c4:counter PORT MAP ( clear, carry_out3, count_en,carry_out4,result4) ; c5:counter PORT MAP ( clear, carry_out4, count_en,carry_out5,result5) ;
c6:counter PORT MAP ( clear, carry_out5, count_en,carry_out6,result6) ;
process(carry_out6) begin
if clear = '1' then
over <= '1'; over <= '0';
elsif carry_out6 = '1' then end if;
end process; end Behavioral;
----------------------------------------------------------------------------------
现代电子技术综合实验报告—简易数字频率计,基于XILINX的FPGA设计的简易频率计,用ISE仿真,采用VHDL编程,
-- Company: -- Engineer: --
-- Create Date: 09:26:07 09/15/2011 -- Design Name:
-- Module Name: counter - Behavioral -- Pr …… 此处隐藏:4325字,全部文档内容请下载后查看。喜欢就下载吧 ……
相关推荐:
- [资格考试]石油钻采专业设备项目可行性研究报告编
- [资格考试]2012-2013学年度第二学期麻风病防治知
- [资格考试]道路勘测设计 绪论
- [资格考试]控烟戒烟知识培训资料
- [资格考试]建设工程安全生产管理(三类人员安全员
- [资格考试]photoshop制作茶叶包装盒步骤平面效果
- [资格考试]授课进度计划表封面(09-10下施工)
- [资格考试]麦肯锡卓越工作方法读后感
- [资格考试]2007年广西区农村信用社招聘考试试题
- [资格考试]软件实施工程师笔试题
- [资格考试]2014年初三数学复习专练第一章 数与式(
- [资格考试]中国糯玉米汁饮料市场发展概况及投资战
- [资格考试]塑钢门窗安装((专项方案)15)
- [资格考试]初中数学答题卡模板2
- [资格考试]2015-2020年中国效率手册行业市场调查
- [资格考试]华北电力大学学习实践活动领导小组办公
- [资格考试]溃疡性结肠炎研究的新进展
- [资格考试]人教版高中语文1—5册(必修)背诵篇目名
- [资格考试]ISO9001-2018质量管理体系最新版标准
- [资格考试]论文之希尔顿酒店集团进入中国的战略研
- 全国中小学生转学申请表
- 《奇迹暖暖》17-支2文学少女小满(9)公
- 2019-2020学年八年级地理下册 第六章
- 2005年高考试题——英语(天津卷)
- 无纺布耐磨测试方法及标准
- 建筑工程施工劳动力安排计划
- (目录)中国中央空调行业市场深度调研分
- 中国期货价格期限结构模型实证分析
- AutoCAD 2016基础教程第2章 AutoCAD基
- 2014-2015学年西城初三期末数学试题及
- 机械加工工艺基础(完整版)
- 归因理论在管理中的应用[1]0
- 突破瓶颈 实现医院可持续发展
- 2014年南京师范大学商学院决策学招生目
- 现浇箱梁支架预压报告
- Excel_2010函数图表入门与实战
- 人教版新课标初中数学 13.1 轴对称 (
- Visual Basic 6.0程序设计教程电子教案
- 2010北京助理工程师考试复习《建筑施工
- 国外5大医疗互联网模式分析




