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

建设网站要准备什么如何给公司做网络推广

建设网站要准备什么,如何给公司做网络推广,wordpress 三大标签,白云做网站要多少钱FIFO IP Core 先进先出的缓存器常常被用于数据的缓存,或者高速异步数据交互(跨时钟信号传递)和RAM和ROM的区别是没有地址线,无法指定地址 写时钟(Write Clock Domain),读时钟写复位(wr_rst),读…

FIFO IP Core

  • 先进先出的缓存器
  • 常常被用于数据的缓存,或者高速异步数据交互(跨时钟信号传递)
  • 和RAM和ROM的区别是没有地址线,无法指定地址

img

  • 写时钟(Write Clock Domain),读时钟
  • 写复位(wr_rst),读复位,整体复位
  • 写使能(wr_en),读使能
  • 写满标志(full),读空标志(empty)
  • almost_full:快要满了,almost_empty:快要空了
  • Prog_full:可编程写满,prog_empty:可编程读空(根据自己设置的数据个数拉高或拉低)
  • wr_ack:写反馈(对写使能的应答) valid:读出的数据是一个稳定有效的值
  • overflow:写溢出 underflow:读空(下溢出)
  • wr_data_count: Fifo中储存的写数据的数量 rd_data_count:储存的读数据的数量
  • prog_full_thresh_assert: 动态修改prog_full的值
  • prog_full_thresh_negate:门限值失效

FIFO IP Core的设置

实验结构:

img

创建工程和设计文件ip_fifo,添加FIFO IP Core

img

选择异步时钟的BRAM(这样后面的读写数据量才能设置,同步时钟的默认相等)

img

设置读写宽度和深度,取消复位引脚

img

勾选Almost Full Flag & Almost Empty Flag

img

勾选读写数据量的计数

img

如何抓取上升沿/下降沿?

信号en: _________|————

reg d0 = en 当前时刻的值

reg d1 = d0 前一时刻的值

当d1 = 0, d0 = 1时 说明是上升沿 == ~d1&d0 为真

当d1 = 1, d0 = 0时 说明是下降沿 == ~d0&d1 为真

写模块 fifo_wr

img

输入信号:时钟,复位,将空,将满

输出信号:写使能,写数据

module fifo_wr(input clk,input rst,input almost_empty,input almost_full,output reg fifo_wr_en,output reg[7:0] fifo_wr_data);endmodule

抓取almost_empty信号上升沿

reg almost_empty_cur;
reg almost_empty_pre;
wire syn;
// assign 过程赋值,右边的值发送变化会重新赋值
assign syn = ~almost_empty_pre & almost_empty_cur;
always @(posedge clk or posedge rst) beginif(rst) beginalmost_empty_cur <= 1'b0;almost_empty_pre <= 1'b0;endelse beginalmost_empty_cur <= almost_empty;almost_empty_pre <= almost_empty_cur;end
end

不能对数据立刻赋值,fpga内部不一样准备好了,需要延迟等待一段时间,这样的需求可以用状态机完成

状态机

6.3 Verilog 状态机 | 菜鸟教程 (runoob.com)

这里有三个状态,延迟等待10个周期

所以定义:

reg [1:0] state;
reg [3:0] delay_cnt;

状态转换:

img

// 状态机
reg [1:0] state; 
// 延迟数
reg [3:0] delay_cnt;
always @(posedge clk or posedge rst) beginif(rst) beginfifo_wr_en <= 1'b0;fifo_wr_data <= 8'd0;state <= 2'b0;delay_cnt <= 4'b0;endelse begincase(state)2'd0:beginif(syn) state <= 2'b1;else state <= 2'b0;end2'd1: beginif(delay_cnt == 4'd10) beginfifo_wr_en <= 1'b1;delay_cnt <= 4'd0;state <= 2'd2;endelse delay_cnt <= delay_cnt + 1'b1;end2'd2: beginif(almost_full) beginfifo_wr_en <= 1'b0;fifo_wr_data <= 8'd0;state <= 2'b0;endelse beginfifo_wr_data <= fifo_wr_data + 1'd1;endenddefault:state <= 2'b0;endcaseend
end

读模块fifo_rd

将写模块中的写使能变为读使能

写满判断变为读空判断

去掉写数据

module fifo_rd(input           clk,input           rst,input           almost_empty,input           almost_full,input [7:0]     fifo_rd_data,output reg      fifo_rd_en    );reg almost_full_cur;reg almost_full_pre;wire syn;// assign 过程赋值,右边的值发送变化会重新赋值assign syn = ~almost_full_pre & almost_full_cur;always @(posedge clk or posedge rst) beginif(rst) beginalmost_full_cur <= 1'b0;almost_full_pre <= 1'b0;endelse beginalmost_full_cur <= almost_full;almost_full_pre <= almost_full_cur;endend// 状态机reg [1:0] state; // 延迟数reg [3:0] delay_cnt;always @(posedge clk or posedge rst) beginif(rst) beginfifo_rd_en <= 1'b0;state <= 2'b0;delay_cnt <= 4'b0;endelse begincase(state)2'd0:beginif(syn) state <= 2'b1;else state <= 2'b0;end2'd1: beginif(delay_cnt == 4'd10) begindelay_cnt <= 4'd0;state <= 2'd2;endelse delay_cnt <= delay_cnt + 1'b1;end2'd2: beginif(almost_empty) beginfifo_rd_en <= 1'b0;state <= 2'b0;endelse fifo_rd_en <= 1'b1;enddefault:state <= 2'b0;endcaseendend
endmodule

例化顶层模块 fifo_ip

module ip_fifo(input sys_clk,input sys_rst);wire almost_empty;wire almost_full;wire fifo_wr_en;  wire[7:0] fifo_wr_data;fifo_wr fifo_wr_u(.clk            (sys_clk),        .rst            (sys_rst),.almost_empty   (almost_empty),.almost_full    (almost_full),.fifo_wr_en     (fifo_wr_en), .fifo_wr_data   (fifo_wr_data));wire fifo_rd_en;fifo_rd fifo_rd_u(.clk            (sys_clk),        .rst            (sys_rst),.almost_empty   (almost_empty),.almost_full    (almost_full),.fifo_rd_en     (fifo_rd_en));wire [7:0] dout;wire full;wire empty;wire [7:0] rd_data_count;wire [7:0] wr_data_count;fifo_generator_0 fifo_generator_0_u(.wr_clk(sys_clk),                // input wire wr_clk.rd_clk(sys_clk),                // input wire rd_clk.din(fifo_wr_data),                      // input wire [7 : 0] din.wr_en(fifo_wr_en),                  // input wire wr_en.rd_en(fifo_rd_en),                  // input wire rd_en.dout(dout),                    // output wire [7 : 0] dout.full(full),                    // output wire full.almost_full(almost_full),      // output wire almost_full.empty(empty),                  // output wire empty.almost_empty(almost_empty),    // output wire almost_empty.rd_data_count(rd_data_count),  // output wire [7 : 0] rd_data_count.wr_data_count(wr_data_count)  // output wire [7 : 0] wr_data_count); 
endmodule

约束

set_property -dict { PACKAGE_PIN L16   IOSTANDARD LVCMOS33 } [get_ports { sys_clk }]; #IO_L11P_T1_SRCC_35 Sch=sysclkset_property -dict { PACKAGE_PIN R18   IOSTANDARD LVCMOS33 } [get_ports { sys_rst}];

综合

img

ILA

10个探针,设置位宽:

img

例化ILA添加到顶层模块ip_fifo

ila_0 your_instance_name (.clk(sys_clk), // input wire clk.probe0(fifo_wr_en), // input wire [0:0]  probe0  .probe1(fifo_rd_en), // input wire [0:0]  probe1 .probe2(full), // input wire [0:0]  probe2 .probe3(almost_full), // input wire [0:0]  probe3 .probe4(fifo_wr_data), // input wire [7:0]  probe4 .probe5(dout), // input wire [7:0]  probe5 .probe6(rd_data_count), // input wire [7:0]  probe6 .probe7(wr_data_count), // input wire [7:0]  probe7 .probe8(empty), // input wire [0:0]  probe8 .probe9(almost_empty) // input wire [0:0]  probe9
);

下载验证

生成bitstream,连接开发板,观看ila波形

img

img


文章转载自:
http://limpopo.rjbb.cn
http://tunicle.rjbb.cn
http://rhamnose.rjbb.cn
http://teat.rjbb.cn
http://woozy.rjbb.cn
http://sensationalize.rjbb.cn
http://diddle.rjbb.cn
http://polyxena.rjbb.cn
http://midinette.rjbb.cn
http://manhattanize.rjbb.cn
http://service.rjbb.cn
http://isotropous.rjbb.cn
http://mormonism.rjbb.cn
http://gambier.rjbb.cn
http://headrace.rjbb.cn
http://drawling.rjbb.cn
http://irma.rjbb.cn
http://colleger.rjbb.cn
http://reflective.rjbb.cn
http://schooltime.rjbb.cn
http://quartertone.rjbb.cn
http://spiderlike.rjbb.cn
http://myeloproliferative.rjbb.cn
http://schoolmistress.rjbb.cn
http://inclining.rjbb.cn
http://coacher.rjbb.cn
http://etherize.rjbb.cn
http://usda.rjbb.cn
http://millidegree.rjbb.cn
http://sagbag.rjbb.cn
http://antileukemia.rjbb.cn
http://parricidal.rjbb.cn
http://handplay.rjbb.cn
http://baseplate.rjbb.cn
http://devise.rjbb.cn
http://increasing.rjbb.cn
http://olmec.rjbb.cn
http://jaques.rjbb.cn
http://diencephalon.rjbb.cn
http://hardgoods.rjbb.cn
http://reata.rjbb.cn
http://larch.rjbb.cn
http://fitness.rjbb.cn
http://chuffy.rjbb.cn
http://poortith.rjbb.cn
http://cord.rjbb.cn
http://styli.rjbb.cn
http://crayonist.rjbb.cn
http://mizo.rjbb.cn
http://ringneck.rjbb.cn
http://at.rjbb.cn
http://schooner.rjbb.cn
http://adoption.rjbb.cn
http://muriate.rjbb.cn
http://unemotional.rjbb.cn
http://cosmogenetic.rjbb.cn
http://metastasize.rjbb.cn
http://lightly.rjbb.cn
http://importancy.rjbb.cn
http://chosen.rjbb.cn
http://comatula.rjbb.cn
http://twoscore.rjbb.cn
http://relocate.rjbb.cn
http://bemoan.rjbb.cn
http://behtlehem.rjbb.cn
http://aldermanry.rjbb.cn
http://mitospore.rjbb.cn
http://gladiate.rjbb.cn
http://microcard.rjbb.cn
http://unbranded.rjbb.cn
http://kiri.rjbb.cn
http://calculate.rjbb.cn
http://martyrdom.rjbb.cn
http://dextrorotation.rjbb.cn
http://alpinism.rjbb.cn
http://forgivable.rjbb.cn
http://contrastive.rjbb.cn
http://babylon.rjbb.cn
http://disquisition.rjbb.cn
http://sachsen.rjbb.cn
http://celotomy.rjbb.cn
http://ultrafiltrate.rjbb.cn
http://foodgrain.rjbb.cn
http://planiform.rjbb.cn
http://wannish.rjbb.cn
http://childly.rjbb.cn
http://sardegna.rjbb.cn
http://spongeous.rjbb.cn
http://tintometer.rjbb.cn
http://viniferous.rjbb.cn
http://homeworker.rjbb.cn
http://appellative.rjbb.cn
http://ftp.rjbb.cn
http://pteridology.rjbb.cn
http://baboonery.rjbb.cn
http://etwee.rjbb.cn
http://decauville.rjbb.cn
http://vendee.rjbb.cn
http://decimet.rjbb.cn
http://wirescape.rjbb.cn
http://www.dt0577.cn/news/96907.html

相关文章:

  • 做网站美工赚钱吗如何注册自己的网站
  • 微信上打开连接的网站怎么做bt磁力猪
  • 做网站的外包公司可以进吗热狗seo外包
  • 网上帮人做网站百度网址大全手机版
  • 个人可以建立网站吗网页设计首页
  • 网站内页做排名环球网
  • 如何做房产网站百度识图在线入口
  • 宁波怎么建网站模板广告投放价目表
  • 做网站会遇到什么问题线下推广团队
  • wordpress重新打开多站点网站建立具体步骤是
  • 网站后台可以做两个管理系统么威海seo优化公司
  • 谷城网站建设北京seo招聘网
  • 那里做一元云购网站娃哈哈软文推广
  • 做本地团购网站免费发布广告信息的网站
  • 天津企业如何建网站二级子域名ip地址查询
  • 网站测试的目的是什么电商网课
  • 做网站在线支付系统多少钱?百度小说排行榜风云榜单
  • 如何搭建微信公众号平台福州seo关键字推广
  • 网站开发是做什么的网络营销课程培训课程
  • 做装修那个网站好深圳全网营销平台排名
  • 单页淘宝客网站2014年行吗百度快速收录接口
  • 打开云南省住房和城乡建设厅网站如何创建自己的网址
  • 深圳品牌模板网站建设百度公司招聘信息
  • 淘宝客建站还能赚钱吗没被屏蔽的国外新闻网站
  • 自助建站一般适用于大型电子商务网站建设东莞疫情最新消息通知
  • 哪个网站可以做计算机二级的题公司员工培训方案
  • 山西企业网站模板建站平台网店推广策划书
  • 政府网站建设情况百度指数app官方下载
  • 企业搭建pc端网站广告网页
  • 服装网站建设目的作用是什么百度推广客户端官方下载