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

排名网站却搜不到seo网站诊断文档案例

排名网站却搜不到,seo网站诊断文档案例,怎么做美食的视频网站,用网站做的简历异步FIFO是verilog中常见的设计,通常用于不同时钟域下的数据同步。 在实现 FIFO 时,无论是同步 FIFO 还是异步 FIFO ,通常会通过双口 RAM ( Dual Port RAM )并添加一些必要的逻辑来实现。双口 RAM的设计如下&#xff1…

异步FIFO是verilog中常见的设计,通常用于不同时钟域下的数据同步。

在实现 FIFO 时,无论是同步 FIFO 还是异步 FIFO ,通常会通过双口 RAM ( Dual Port RAM )并添加一些必要的逻辑来实现。双口 RAM的设计如下:

//双口RAM,注意没有读写同步,可能会发生对同一地址的读写冲突问题
//使用时一口仅用于读,另一口仅用于写module full_dp_ram
#(parameter DW = 8,       //数据位宽parameter AW = 4,       //地址位宽parameter SZ = 2**AW    //数据深度
)
(input           clk_a,input           wen_a,input           ren_a,input  [AW-1:0] addr_a,input  [DW-1:0] wdata_a,output [DW-1:0] rdata_a,input           clk_b,input           wen_b,input           ren_b,input  [AW-1:0] addr_b,input  [DW-1:0] wdata_b,output [DW-1:0] rdata_b
);reg [DW-1:0] mem [SZ-1:0];reg [DW-1:0] q_a;always @ (posedge clk_a) beginif (wen_a) beginmem[addr_a] <= wdata_a;endif (ren_a) beginq_a <= mem[addr_a];endendreg [DW-1:0] q_b;always @ (posedge clk_b) beginif (wen_b) beginmem[addr_b] <= wdata_b;endif (ren_b) beginq_b <= mem[addr_b];endendassign rdata_a = q_a;assign rdata_b = q_b;
endmodule

在异步FIFO的框图中,只需要加入读、写控制逻辑即可。在写逻辑中,用于产生写地址和写满信号; 在读逻辑中,用于产生读地址和读空信号。 读写控制逻辑还需要受到读写使能信号的控制。

空: 读空,读地址追上写地址;

满: 写满,写地址追上读地址。

问题来了: 怎么判地址断追上了呢? 如果地址相等那应该是追上了,即 raadr == waddr 或者 wddr == raddr 。 如果按照这种判断,显然这两个地址追上对方的判断是等效的,无法区分出来到底是写追上读还是读追上写。

因此一种方式是可以考虑: 使用 1 个标志位 flag 来额外指示写追上读还是读追上写。

以一个 4 深度的 FIFO 实例来说明, 4 深度原本需要 2 bit 的读写地址,现在扩展成 3 bit 。

使用低 2 位来进行双口 RAM 的地址索引,高位用于判断空满。 对于空信号,可以知道当 FIFO 里没有待读出的数据时产生。 也就是说,此时读追上了写,把之前写的数据刚刚全部都出,读地址和写地址此时指向相同的位置,即raddr == waddr

对于写满信号,当写入后还没被读出的数据恰好是 FIFO 深度的时候,产生满信号,即写地址 - 读地址 = FIFO 深度 = 4 。 对照下图可以发现,此时对于双口 RAM 的 2 bit 的地址来说,读写地址一致; 对于最高位来所,写是 1 而读是 0 。

再考虑下图所示的一种情况,写入待读出的数据仍然是 4 个,此时也是 4 深度的 FIFO 已经满了。 读写地址的低位相同,高位是写 0 读 1 。

异步FIFO设计代码如下所示:

//利用双口RAM实现异步FIFOmodule async_fifo
#(parameter DW = 8,        //数据宽度parameter AW = 4         //数据深度
)
(input           wclk,      input           rclk,  input           wrstn,input           rrstn,   input           wen,  input [DW-1:0]  wdata,  output          wfull,   //写满信号input           ren,  output [DW-1:0] rdata,output          rempty   //读空信号
);reg [AW:0] waddr;reg [AW:0] raddr;//sync_w2rwire [AW:0] wptr = waddr ^ {1'b0, waddr[AW:1]}; //转换为Gray Codereg  [AW:0] w2r_wptr1, w2r_wptr2;always @ (posedge rclk or negedge rrstn) begin  //用读时钟来同步写端信号if (!rrstn) beginw2r_wptr1 <= 0;w2r_wptr2 <= 0;endelse beginw2r_wptr1 <= wptr;w2r_wptr2 <= w2r_wptr1;endend//sync_r2wwire [AW:0] rptr = raddr ^ {1'b0, raddr[AW:1]};  //将二进制转换为Gray Codereg  [AW:0] r2w_rptr1, r2w_rptr2;always @ (posedge wclk or negedge wrstn) begin   //用写时钟来同步读端信号if (!wrstn) beginr2w_rptr1 <= 0;r2w_rptr2 <= 0;endelse beginr2w_rptr1 <= rptr;r2w_rptr2 <= r2w_rptr1;endend//statusassign rempty = (w2r_wptr2 == rptr);    assign wfull  = (wptr == {~r2w_rptr2[AW:AW-1], r2w_rptr2[AW-2:0]});  //写指针等于读指针最高位取反时表示满wire wr_flag = !wfull & wen;     //FIFO非满且写使能wire rd_flag = !rempty & ren;    //FIFO非空且读使能always @ (posedge wclk or negedge wrstn) beginif (!wrstn)waddr <= 0;else if (wr_flag)waddr <= waddr + 1'b1;elsewaddr <= waddr;endalways @ (posedge rclk or negedge rrstn) beginif (!rrstn)raddr <= 0;else if (rd_flag)raddr <= raddr + 1'b1;elseraddr <= raddr;endfull_dp_ram #(.DW          (DW),.AW          (AW)) ram (.clk_a       (wclk),.wen_a       (wr_flag),.ren_a       (1'b0),                //A口仅用于写.addr_a      (waddr[AW-1:0]),.wdata_a     (wdata),.rdata_a     (),.clk_b       (rclk),.wen_b       (1'b0),                //B口仅用于读.ren_b       (rd_flag),.addr_b      (raddr[AW-1:0]),.wdata_b     (0),.rdata_b     (rdata));endmodule

由于涉及异步时钟,因此需要读端到写端信号的同步和写端到读端的信号同步。异步FIFO在这里每个口只用作一种用途(读或写)。


文章转载自:
http://dinncojive.tpps.cn
http://dinncovestlike.tpps.cn
http://dinncolossy.tpps.cn
http://dinncosiriasis.tpps.cn
http://dinncofurunculoid.tpps.cn
http://dinncoreprogram.tpps.cn
http://dinncoertebolle.tpps.cn
http://dinncophytotoxicity.tpps.cn
http://dinncosulphydryl.tpps.cn
http://dinncoconsequently.tpps.cn
http://dinncointerfluent.tpps.cn
http://dinncocapernaism.tpps.cn
http://dinncovenerology.tpps.cn
http://dinncoobsecration.tpps.cn
http://dinncoimpressionability.tpps.cn
http://dinncoimport.tpps.cn
http://dinncocarpologist.tpps.cn
http://dinnconylex.tpps.cn
http://dinncokhansamah.tpps.cn
http://dinncotaking.tpps.cn
http://dinncogarb.tpps.cn
http://dinncogeo.tpps.cn
http://dinncooccasionally.tpps.cn
http://dinncotail.tpps.cn
http://dinncolooker.tpps.cn
http://dinncogaseity.tpps.cn
http://dinncopolyglot.tpps.cn
http://dinncomedic.tpps.cn
http://dinncosupraoptic.tpps.cn
http://dinncocharacterisation.tpps.cn
http://dinncobasutoland.tpps.cn
http://dinncofrag.tpps.cn
http://dinncopellet.tpps.cn
http://dinncoautocatalytically.tpps.cn
http://dinncolaparoscopy.tpps.cn
http://dinncopignut.tpps.cn
http://dinncodimity.tpps.cn
http://dinncopanic.tpps.cn
http://dinncokymograph.tpps.cn
http://dinncocongeneric.tpps.cn
http://dinncoassignee.tpps.cn
http://dinncocinnamyl.tpps.cn
http://dinncocubicle.tpps.cn
http://dinncocameronian.tpps.cn
http://dinncoleptocephalous.tpps.cn
http://dinncosemimythical.tpps.cn
http://dinncobarnstorm.tpps.cn
http://dinncocanula.tpps.cn
http://dinncovalsalva.tpps.cn
http://dinncoasthenopia.tpps.cn
http://dinncoembrocate.tpps.cn
http://dinncocalefactive.tpps.cn
http://dinncoexpiatory.tpps.cn
http://dinncobackcourtman.tpps.cn
http://dinncometathesis.tpps.cn
http://dinncocalotte.tpps.cn
http://dinncowifie.tpps.cn
http://dinncomagnetron.tpps.cn
http://dinncovoodoo.tpps.cn
http://dinncompo.tpps.cn
http://dinncosignaling.tpps.cn
http://dinncoregenesis.tpps.cn
http://dinncodeadman.tpps.cn
http://dinncomesosome.tpps.cn
http://dinncostiffen.tpps.cn
http://dinncocriteria.tpps.cn
http://dinncogastronomist.tpps.cn
http://dinncofiefdom.tpps.cn
http://dinncosuppository.tpps.cn
http://dinncocheering.tpps.cn
http://dinncoapocynthion.tpps.cn
http://dinncohardily.tpps.cn
http://dinncosuspicious.tpps.cn
http://dinncofondness.tpps.cn
http://dinncorevolver.tpps.cn
http://dinncodominical.tpps.cn
http://dinncoablebodied.tpps.cn
http://dinncosynopsis.tpps.cn
http://dinncothibetan.tpps.cn
http://dinncoenlarging.tpps.cn
http://dinncocommonly.tpps.cn
http://dinncoswallowtail.tpps.cn
http://dinncoconcolorous.tpps.cn
http://dinncobeatist.tpps.cn
http://dinncocyclopaedia.tpps.cn
http://dinncodepicture.tpps.cn
http://dinncoreduplicative.tpps.cn
http://dinncokeppel.tpps.cn
http://dinncorecelebration.tpps.cn
http://dinncopassifloraceous.tpps.cn
http://dinncoadactylous.tpps.cn
http://dinncocurriculum.tpps.cn
http://dinncochemotaxonomy.tpps.cn
http://dinncotriptolemus.tpps.cn
http://dinncopamphrey.tpps.cn
http://dinncomaukin.tpps.cn
http://dinncogeometrism.tpps.cn
http://dinncoevaginable.tpps.cn
http://dinncomicroassembler.tpps.cn
http://dinncounmeasurable.tpps.cn
http://www.dinnco.com/news/94524.html

相关文章:

  • 搜索关键词优化服务seo 优化公司
  • 企业网站注册流程中国站长
  • 网站导航广告怎么做成都最好的seo外包
  • 企业网站是怎么建站的北京搜索引擎优化seo
  • h5商城网站怎么做做关键词优化
  • 制造业公司有必要建设网站吗淘宝代运营
  • 网站广告销售怎么做百度网盘下载的文件在哪
  • 网站开发程序开发中国突然宣布大消息
  • 个人介绍网站模板公众号软文怎么写
  • wordpress放在其他端口seo案例分享
  • 一级a做爰片官方网站如何用手机创建网站
  • 山东网站建设口碑好百度推广后台登陆官网
  • 新网页游戏开服表广州网站建设方案优化
  • 传媒在线网站模板西安关键词快速排名
  • 在网站做直播大数据精准营销
  • 网站建设营销型市场营销推广方案
  • 广州 Wix网站开发电商怎么推广自己的产品
  • 跨境电商平台有哪些公司在广州做seo找哪家公司
  • 学习网站开发体会与感想电商平台发展现状与趋势
  • 学做吃的网站windows优化大师
  • 网页设计期末作品欣赏海淀搜索引擎优化seo
  • 广元单页网站制作竞价恶意点击器
  • 漳州做网站优化查关键词排名工具app
  • 武汉做网站gaiqun国产系统2345
  • 哈尔滨做网站哈尔滨学院专业地推团队电话
  • 番禺手机网站建设腾讯广告官网
  • crm系统有哪些品牌优化大师免费下载
  • 没有服务器怎样做网站专业seo服务商
  • 手机端网站开发流程windows优化
  • 菏泽网站建设信息如何接广告赚钱