当前位置: 首页 > news >正文

quartus工具篇——PLL IP核的使用

quartus工具篇——PLL IP核的使用

1、PLL简介

PLL(Phase-Locked Loop,相位锁环)是FPGA中非常重要的时钟管理单元,其主要功能包括:

  1. 频率合成 - PLL可以生成比输入时钟频率高的时钟信号。
  2. 频率分频 - PLL也可以输出分频后的较低频率时钟。
  3. 减小时钟抖动 - PLL可以过滤输入时钟中的噪声和抖动。
  4. 锁相输出 - PLL可以使多个时钟保持一定的相位关系。
  5. 时钟复用 - 一个PLL可以驱动多个时钟域。

PLL的工作原理是通过控制环路内VCO的相位和频率实现以上功能。

在FPGA中,PLL广泛用于:

  • 生成界面、存储等需要的各种工作时钟
  • 将外部时钟处理后提供低抖动时钟
  • 实现模块间的时钟域同步

PLL提供时钟的稳定性和灵活性,是FPGA设计中必不可少的时钟管理机制

2、具体实现配置

image-20230724194339864

选中点击打开后会出现以下配置界面,配置自己芯片的时钟频率,我这里配置的是50MHZ

image-20230724194535783

取消勾选掉多余的信号

image-20230724194706063

按照下列步骤配置输出的时钟频率,我这里配置了三个时钟clk c0、clk c1、clk c2,分别是10MHZ、20MHZ、300MHZ

image-20230724194849063

生成文件,勾选生成对应的文件、我这里多勾选了bsf文件,是这个PLL ip核的波形文件、PLL_inst.v是实例化的部分,其他的文件这里不做过多的叙述

image-20230724195117287

点击finish生成,这里生成了PLL的实现文件,我们可以将之前勾选的文件添加进项目中

image-20230724195243741

生成的文件位置会在你创建项目的目录下,我们将PLL_inst初始化文件添加进来:

image-20230724195438561

PLL_inst.v文件内容,会存放实例化模块,方便我们进行调用和仿真,我们只需要将我们的信号与PLL信号进行联通就行,如下列所示,c0将生成10MHZ的时钟、c1将生成20MHZ的时钟、c2将生成300MHZ的时钟

PLL	PLL_inst (.inclk0 ( inclk0_sig ),.c0 ( c0_sig ),.c1 ( c1_sig ),.c2 ( c2_sig ));

3、使用配置的PLL进行仿真

仿真代码:

// Copyright (C) 2018  Intel Corporation. All rights reserved.
// Your use of Intel Corporation's design tools, logic functions 
// and other software and tools, and its AMPP partner logic 
// functions, and any output files from any of the foregoing 
// (including device programming or simulation files), and any 
// associated documentation or information are expressly subject 
// to the terms and conditions of the Intel Program License 
// Subscription Agreement, the Intel Quartus Prime License Agreement,
// the Intel FPGA IP License Agreement, or other applicable license
// agreement, including, without limitation, that your use is for
// the sole purpose of programming logic devices manufactured by
// Intel and sold by Intel or its authorized distributors.  Please
// refer to the applicable agreement for further details.// *****************************************************************************
// This file contains a Verilog test bench template that is freely editable to  
// suit user's needs .Comments are provided in each section to help the user    
// fill out necessary details.                                                  
// *****************************************************************************
// Generated on "07/24/2023 19:18:12"// Verilog Test Bench template for design : t5
// 
// Simulation tool : ModelSim-Altera (Verilog)
// `timescale 1 ns/ 1 ns
module t5_vlg_tst();
// constants                                           
// general purpose registers// test vector input registers
parameter SYS_CLK = 20;
reg clk;// wires                                               
wire c0_sig;
wire c1_sig;
wire c2_sig;// assign statements (if any)                          always #(SYS_CLK/2) clk = ~clk;initial beginclk = 1'b0;#(200*SYS_CLK);$stop;
endPLL	PLL_inst (.inclk0 ( clk ),.c0 ( c0_sig ),.c1 ( c1_sig ),.c2 ( c2_sig ));endmodule

4、仿真结果

image-20230724194124544

我这里仿真了50MHZ的时钟,可以看到结果完全相符合

5、总结

在fpga开发中时钟配置十分重要,本文略讲的比较简单,可以观看下列视频加深了解

04_IP核之PLL使用讲解_哔哩哔哩_bilibili

http://www.lryc.cn/news/99745.html

相关文章:

  • [Angular] Import TranslateModule in Angular 16
  • Web自动化测试高级定位xpath
  • 2023河南萌新联赛第(二)场:河南工业大学 F - 最短距离
  • 前端文件上传实践与后端处理——文件分块上传
  • SFP6012A-ASEMI代理海矽美快恢复二极管参数、尺寸、规格
  • githack的安装步骤+一次错误体验
  • 【Spring框架】SpringBoot创建和使用
  • 【C语言项目】多臂井径电子测井成像项目(一)
  • 力扣 56. 合并区间
  • 前端开发Vue3.0 标签setup语法『UI组件库』之『模态框』【业务提升必备】
  • 在CSDN学Golang云原生(Kubernetes二开)
  • chatglm-6b量化推理指标记录
  • Android kotlin系列讲解之最佳的UI体验 - Material Design 实战
  • 链表基础知识
  • process.env.npm_config_argv的值3个参数remain、cooked、original什么含义
  • 【飞书】飞书导出md文档 | 飞书markdown文档导出 | 解决飞书只能导出pdf word
  • 零信任网络架构与实现技术的研究与思考
  • Unity 性能优化二:内存问题
  • JavaScript与TypeScript的区别
  • 【NetCore】05-使用Autofac增强容器能力
  • sparksql参数
  • STM32读写内部Flash
  • golang文件锁,目录锁,syscall包的使用
  • 数据库数据恢复-Syabse数据库存储页底层数据杂乱的数据恢复案例
  • 移远通信推出新一代高算力智能模组SG885G-WF,为工业和消费级IoT应用带来全新性能标杆
  • 微信小程序开发,小程序类目符合,线上版本无权限申请wx.getLocation接口
  • vue2企业级项目(五)
  • 【HTML5】拖放详解及实现案例
  • Codeforces Round 888 (Div. 3)(视频讲解全部题目)
  • MySQL之深入InnoDB存储引擎——物理文件