pci_wbw_wbr_fifos.v
上传用户:quan1896
上传日期:2014-05-14
资源大小:211k
文件大小:45k
源码类别:

并行计算

开发平台:

Others

  1. <!-- pf_header_start -->
  2. <html>
  3.   <head>
  4.     <META NAME="keywords" CONTENT="cores, VHDL, Verilog HDL, ASIC, Synthesizable,
  5.       standard cell, IP, Intellectual Property, 32-bit RISC, UART, PCI, SDRAM,
  6.       full custom, system on a chip, SOC, reusable, design, development, synthesis,
  7.       designs, developers, C, Linux, eCos, open, free, open source cores, RTL code,
  8.       system-on-a-chip, circuits, digital, GNU, GPL, core, controller, processor,
  9.       system design, chip design, EDA, design methodology, design tools, ASICs, programmable logic,
  10.       FPGA's, PLDs, CPLDs, verification, Synthesis, HDL, Simulation, IC design software,
  11.       semiconductor design, integrated circuits, system designs, chip designs, EDAs, 
  12.       design methodologies, design tool, ASIC, programmable logics, FPGA, PLD, CPLD, Synthesis, 
  13.       circuit, Synopsys, system design, chip design, programmable logic, FPGA's, PLDs, 
  14.       CPLDs, verification, Simulation">
  15.     <META NAME="description" CONTENT="OPENCORES.ORG endorses development and hosts
  16.       a repository of free, open-source cores (chip designs) and supplemental
  17.       platforms (boards).">
  18.     <STYLE type=text/css>
  19.       BODY {margin: 0;}
  20.       BODY, P, DIV, TD, TR, TH, FORM, OL, UL, LI, B, I, INPUT, TEXTAREA, SELECT,
  21.       FONT {font-size: 10pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  22.       P, TD, FORM, TEXTAREA {font-size: 10pt;}
  23.       H1, H2 {FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica; font-size: 13pt; text-decoration: none}
  24.       .noline {text-decoration: none;}
  25.       .menu_top {text-decoration: none; font-weight: bold;
  26.         font-size: 7pt; color: #000000; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;} 
  27.       .menu_section {text-decoration: none; font-weight: bold;
  28.         font-size: 10pt; color: #ffffff; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;} 
  29.       .menu_item {font-size: 10pt; color: #004488; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  30.       .menu_section_admin {text-decoration: none; font-weight: bold;
  31.         font-size: 10pt; color: #ffff44; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;} 
  32.       .page_title {text-decoration: none; font-weight: bold; color: #c00000; font-size: 13pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  33.       .block_title {text-decoration: none; font-weight: bold; font-size: 11pt; color: #000000; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  34.       .block_subtitle {text-decoration: none; font-weight: bold; font-size: 10pt; color: #000000; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  35.       .title {text-decoration: none; font-weight: bold; font-size: 10pt; color: #000000; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  36.       .large {font-size: 13pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  37.       .medium {font-size: 10pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  38.       .small {font-size: 7pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  39.       .ultrasmall {font-size: 3pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
  40.       .button { font-family:Verdana, Tahoma, Arial, Helvetica; }
  41.       .searchfield {font-family: verdana, arial, helvetica; font-size: 10px; color: #333333; width: 80px; height: 17px;}
  42.     </STYLE>
  43.     <title>OPENCORES.ORG</title>
  44.     <script laguage="Javascript">
  45.       function check(msg) {
  46.         if(confirm(msg)) {
  47.           return true
  48.         } else {
  49.           return false
  50.         }
  51.       }
  52.     </script>
  53.   </head>
  54.   
  55.   <body 
  56.     bgcolor="#e0e0e0" 
  57.     topmargin="0" 
  58.     leftmargin="0" 
  59.     marginwidth="0" 
  60.     marginheight="0" 
  61.     link="#004488" 
  62.     alink="#ff3300"
  63.     vlink="#444444"
  64.   >
  65. <a name="top">
  66. <!-- pf_header_end -->
  67. <center>
  68. <table cellpadding=0 cellspacing=0 border=0 width=96%><tr>
  69. <td width=1 bgcolor=#000000><img width=1 src="/images/dotty.gif"></td>
  70. <td>
  71. <table border=0 cellpadding=0 cellspacing=0 width=100%>
  72. <tr><td background="/images/topbg.gif" bgcolor=#aaddff height=70>
  73. <table width=100% border=0 ><tr><td width=180>
  74. <a href="/"><img border=0 src="/images/oc_logo.gif"></a>
  75. </td><td>
  76. <center>
  77. <!--
  78. <a title="" href="/banner.cgi"><img width=468 height=60 border=0 alt="" src=""></a>
  79. //-->
  80. <script type="text/javascript"><!--
  81. google_ad_client = "pub-9285819221080148";
  82. xgoogle_ad_width = 728;
  83. xgoogle_ad_height = 79;
  84. xgoogle_ad_format = "728x90_as";
  85. google_ad_width = 468;
  86. google_ad_height = 47;
  87. google_ad_format = "468x60_as";
  88. google_ad_type = "text_image";
  89. google_ad_channel ="3274390903";
  90. google_color_border = "aaddff";
  91. xgoogle_color_border = "ffee88";
  92. xgoogle_color_bg = "FFEE88";
  93. google_color_bg = "aaddFF";
  94. google_color_link = "004488";
  95. google_color_url = "b00000";
  96. google_color_text = "000000";
  97. //--></script>
  98. <script type="text/javascript"
  99.   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  100. </script>
  101. </center>
  102. </td><td align=right>
  103. </td>
  104. </tr></table>
  105. </td></tr>
  106. <tr bgcolor=#000000><td><img height=1 src="/images/dotty.gif"></td></tr>
  107. <tr><td bgcolor=#ffffff>
  108. <table border=0 cellpadding=0 cellspacing=0 width=100%><tr>
  109. <td bgcolor=#ffee88 width=60% background="/images/menu1.gif"></td>
  110. <td bgcolor=#ffee88 width=15 background="/images/menu1.gif" align=right><input type=image border=0 src="/images/exp1pf.gif" onclick="javascript:window.location='/pf.cgi?url=/cvsweb.shtml/pci/rtl/verilog/pci_wbw_wbr_fifos.v?rev=1.7'"></a></td>
  111. <td bgcolor=#ffffff align=right nowrap>
  112. &nbsp; &nbsp; &nbsp; &nbsp; 
  113. <font class=menu_top size=-1>
  114.         
  115.           <a class=menu_top href="/login.cgi/login">LOGIN</a>
  116.           
  117.             &nbsp; ::: &nbsp;
  118.           
  119.         
  120.           <a class=menu_top href="/recover_pass.cgi/recover_pass">RECOVER PASS</a>
  121.           
  122.             &nbsp; ::: &nbsp;
  123.           
  124.         
  125.           <a class=menu_top href="/get_account.cgi/get_account">GET ACCOUNT</a>
  126.           
  127.         
  128. &nbsp; &nbsp;
  129. </font>
  130. </td></tr>
  131. <tr bgcolor=#ffffff>
  132.   <td></td>
  133.   <td></td>
  134.   <td bgcolor=#000000><img src="/images/dotty.gif"></td>
  135. </tr>
  136. </table>
  137. <table border=0 cellpadding=0 cellspacing=0>
  138. <tr>
  139. <td width=10><img width=10 src="/images/dotty.gif"></td>
  140. <td width=120 valign=top>
  141.         
  142.         <table width=100% border=0 cellpadding=2 cellspacing=0>
  143.           <tr><td><img height=2 src="/images/dotty.gif"></td></tr>
  144.         
  145.          <tr><td bgcolor="#347FB8">
  146.            <img src="/images/bullet.gif">
  147.          
  148.            <font class=menu_section>Browse</font>
  149.          
  150.          </td></tr>
  151.           
  152.            <tr><td>
  153.               
  154.                   
  155.                       <li class=small>
  156.                   
  157.               
  158.             
  159.                 <a class=menu_item href="/browse.cgi/by_category"><font class=menu_item>Projects</font></a></li>
  160.             
  161.            </td></tr>
  162.             
  163.           
  164.            <tr><td>
  165.               
  166.                   
  167.                       <li class=small>
  168.                   
  169.               
  170.             
  171.                 <a class=menu_item href="/cvsweb.shtml/"><font class=menu_item>Code (CVS)</font></a></li>
  172.             
  173.            </td></tr>
  174.             
  175.           
  176.            <tr><td>
  177.               
  178.                   
  179.                       <li class=small>
  180.                   
  181.               
  182.             
  183.                 <a class=menu_item href="/forums.cgi"><font class=menu_item>Forums</font></a></li>
  184.             
  185.            </td></tr>
  186.             
  187.           
  188.            <tr><td>
  189.               
  190.                   
  191.                       <li class=small>
  192.                   
  193.               
  194.             
  195.                 <a class=menu_item href="/news.cgi/list/1"><font class=menu_item>News</font></a></li>
  196.             
  197.            </td></tr>
  198.             
  199.           
  200.            <tr><td>
  201.               
  202.                   
  203.                       <li class=small>
  204.                   
  205.               
  206.             
  207.                 <a class=menu_item href="/articles.cgi/list"><font class=menu_item>Articles</font></a></li>
  208.             
  209.            </td></tr>
  210.             
  211.           
  212.            <tr><td>
  213.               
  214.                   
  215.                       <li class=small>
  216.                   
  217.               
  218.             
  219.                 <a class=menu_item href="/polls.cgi/list"><font class=menu_item>Polls</font></a></li>
  220.             
  221.            </td></tr>
  222.             
  223.           
  224.           <tr><td><font size=-2>&nbsp;</font></td></tr>
  225.         
  226.          <tr><td bgcolor="#347FB8">
  227.            <img src="/images/bullet.gif">
  228.          
  229.            <font class=menu_section>OpenCores</font>
  230.          
  231.          </td></tr>
  232.           
  233.            <tr><td>
  234.               
  235.                   
  236.                       <li class=small>
  237.                   
  238.               
  239.             
  240.                 <a class=menu_item href="/faq.cgi/index"><font class=menu_item>FAQ</font></a></li>
  241.             
  242.            </td></tr>
  243.             
  244.           
  245.            <tr><td>
  246.               
  247.                   
  248.                       <li class=small>
  249.                   
  250.               
  251.             
  252.                 <a class=menu_item href="/projects.cgi/web/opencores/cvs_howto"><font class=menu_item>CVS HowTo</font></a></li>
  253.             
  254.            </td></tr>
  255.             
  256.           
  257.            <tr><td>
  258.               
  259.                   
  260.                       <li class=small>
  261.                   
  262.               
  263.             
  264.                 <a class=menu_item href="/projects.cgi/web/opencores/mission"><font class=menu_item>Mission</font></a></li>
  265.             
  266.            </td></tr>
  267.             
  268.           
  269.            <tr><td>
  270.               
  271.                   
  272.                       <li class=small>
  273.                   
  274.               
  275.             
  276.                 <a class=menu_item href="/projects.cgi/web/opencores/media"><font class=menu_item>Media</font></a></li>
  277.             
  278.            </td></tr>
  279.             
  280.           
  281.            <tr><td>
  282.               
  283.                   
  284.                       <li class=small>
  285.                   
  286.               
  287.             
  288.                 <a class=menu_item href="/projects.cgi/web/opencores/tools"><font class=menu_item>Tools</font></a></li>
  289.             
  290.            </td></tr>
  291.             
  292.           
  293.            <tr><td>
  294.               
  295.                   
  296.                       <li class=small>
  297.                   
  298.               
  299.             
  300.                 <a class=menu_item href="/projects.cgi/web/opencores/sponsors"><font class=menu_item>Sponsors</font></a></li>
  301.             
  302.            </td></tr>
  303.             
  304.           
  305.            <tr><td>
  306.               
  307.                   
  308.                       <li class=small>
  309.                   
  310.               
  311.             
  312.                 <a class=menu_item href="/projects.cgi/web/opencores/mirrors"><font class=menu_item>Mirrors</font></a></li>
  313.             
  314.            </td></tr>
  315.             
  316.           
  317.            <tr><td>
  318.               
  319.                   
  320.                       <li class=small>
  321.                   
  322.               
  323.             
  324.                 <a class=menu_item href="/projects.cgi/web/opencores/logos"><font class=menu_item>Logos</font></a></li>
  325.             
  326.            </td></tr>
  327.             
  328.           
  329.            <tr><td>
  330.               
  331.                   
  332.                       <li class=small>
  333.                   
  334.               
  335.             
  336.                 <a class=menu_item href="/projects.cgi/web/opencores/contacts"><font class=menu_item>Contact us</font></a></li>
  337.             
  338.            </td></tr>
  339.             
  340.           
  341.           <tr><td><font size=-2>&nbsp;</font></td></tr>
  342.         
  343.          <tr><td bgcolor="#347FB8">
  344.            <img src="/images/bullet.gif">
  345.          
  346.            <font class=menu_section>Tools</font>
  347.          
  348.          </td></tr>
  349.           
  350.            <tr><td>
  351.               
  352.                   
  353.                       <li class=small>
  354.                   
  355.               
  356.             
  357.                 <font class=menu_item><a href="/search.cgi">Search</a><br><table><tr><form action=/search.cgi/do_search><td><font class=small>&nbsp;&nbsp;</font></td><td><input class=searchfield type=text name=query></td></form></tr></table></font></li>
  358.             
  359.            </td></tr>
  360.             
  361.           
  362.            <tr><td>
  363.               
  364.                   
  365.                       <li class=small>
  366.                   
  367.               
  368.             
  369.                 <a class=menu_item href="/cvsget.shtml"><font class=menu_item>Download Cores (CVSGet)</font></a></li>
  370.             
  371.            </td></tr>
  372.             
  373.           
  374.           <tr><td><font size=-2>&nbsp;</font></td></tr>
  375.         
  376.          <tr><td bgcolor="#347FB8">
  377.            <img src="/images/bullet.gif">
  378.          
  379.            <font class=menu_section>More</font>
  380.          
  381.          </td></tr>
  382.           
  383.            <tr><td>
  384.               
  385.                   
  386.                       <li class=small>
  387.                   
  388.               
  389.             
  390.                 <a class=menu_item href="/projects.cgi/web/wishbone/"><font class=menu_item>Wishbone</font></a></li>
  391.             
  392.            </td></tr>
  393.             
  394.           
  395.            <tr><td>
  396.               
  397.                   
  398.                       <li class=small>
  399.                   
  400.               
  401.             
  402.                 <a class=menu_item href="/projects.cgi/web/perlilog/"><font class=menu_item>Perlilog</font></a></li>
  403.             
  404.            </td></tr>
  405.             
  406.           
  407.            <tr><td>
  408.               
  409.                   
  410.                       <li class=small>
  411.                   
  412.               
  413.             
  414.                 <a class=menu_item href="/projects.cgi/web/edatools/"><font class=menu_item>EDA tools</font></a></li>
  415.             
  416.            </td></tr>
  417.             
  418.           
  419.            <tr><td>
  420.               
  421.                   
  422.                       <li class=small>
  423.                   
  424.               
  425.             
  426.                 <a class=menu_item href="/projects.cgi/web/opentech/"><font class=menu_item>OpenTech CD</font></a></li>
  427.             
  428.            </td></tr>
  429.             
  430.           
  431.           <tr><td><font size=-2>&nbsp;</font></td></tr>
  432.         
  433.         </table>
  434. </td>
  435. <td width=10><img width=10 src="/images/dotty.gif"></td>
  436. <td background="/images/vpd.gif"><img width=1 src="/images/dotty.gif"></td>
  437. <td width=10><img width=10 src="/images/dotty.gif"></td>
  438. <td valign=top>
  439.         
  440.         <table width=100% cellpadding=2 cellspacing=0 border=0>
  441.           <tr><td><img height=2 src="/images/dotty.gif"></td></tr>
  442.         </table>
  443.         
  444. <table width=100% cellspacing=0 cellpadding=0 border=0><tr><td>
  445. <!-- pf_body_start -->
  446.  
  447. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  448. <html>
  449. <head>
  450. <title>pci/rtl/verilog/pci_wbw_wbr_fifos.v - view - 1.7</title>
  451. <meta name="robots" content="nofollow" />
  452. <meta name="generator" content="FreeBSD-CVSweb 3.0.5" />
  453. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  454. <meta http-equiv="Content-Style-Type" content="text/css" />
  455. <link rel="stylesheet" type="text/css" href="/css/cvsweb.css" />
  456. </head>
  457. <body class="src">
  458. <table class="navigate-header" width="100%" summary="Navigation">
  459.  <tr>
  460.   <td>
  461. <a href="./pci_wbw_wbr_fifos.v#rev1.7"><img src="/icons/back.gif" alt="[BACK]" border="0" width="20" height="22" /></a><b>Return to <a href="./pci_wbw_wbr_fifos.v#rev1.7">pci_wbw_wbr_fifos.v</a> CVS log</b> <img src="/icons/text.gif" alt="[TXT]" border="0" width="20" height="22" /></td>  <td style="text-align: right"><img src="/icons/dir.gif" alt="[DIR]" border="0" width="20" height="22" /> <b>Up to  <a href="/cvsweb.shtml/#dirlist">[Official OpenCores CVS Repository]</a> / <a href="/cvsweb.shtml/pci/#dirlist">pci</a> / <a href="/cvsweb.shtml/pci/rtl/#dirlist">rtl</a> / <a href="/cvsweb.shtml/pci/rtl/verilog/#dirlist">verilog</a></b></td>
  462.  </tr>
  463. </table>
  464. <hr />
  465. <div class="log-markup">
  466. File:&nbsp;
  467.  <a href="/cvsweb.shtml/#dirlist">[Official OpenCores CVS Repository]</a> / <a href="/cvsweb.shtml/pci/#dirlist">pci</a> / <a href="/cvsweb.shtml/pci/rtl/#dirlist">rtl</a> / <a href="/cvsweb.shtml/pci/rtl/verilog/#dirlist">verilog</a> / <a href="/cvsweb.shtml/pci/rtl/verilog/pci_wbw_wbr_fifos.v">pci_wbw_wbr_fifos.v</a><br />
  468. <a name="rev1.7"></a><a name="HEAD"></a>
  469.  Revision <b>1.7</b>: <a href="/cvsweb.cgi/~checkout~/pci/rtl/verilog/pci_wbw_wbr_fifos.v?rev=1.7;content-type=text%2Fplain" class="download-link">download</a> - view: <a href="pci_wbw_wbr_fifos.v?rev=1.7;content-type=text%2Fplain" class="display-link">text</a>, <a href="pci_wbw_wbr_fifos.v?annotate=1.7">annotated</a> - <a href="pci_wbw_wbr_fifos.v?r1=1.7#rev1.7">select&nbsp;for&nbsp;diffs</a><br />
  470. <i>Tue Jul  4 13:16:19 2006 UTC</i> (10 months, 2 weeks ago) by <i>mihad</i><br />
  471. Branches: <a href="./pci_wbw_wbr_fifos.v?only_with_tag=MAIN">MAIN</a><br />
  472. CVS tags: <a href="./pci_wbw_wbr_fifos.v?only_with_tag=HEAD">HEAD</a><br />
  473. <pre class="log">
  474. Write burst performance patch applied.
  475. Not tested. Everything should be backwards
  476. compatible, since functional code is ifdefed.
  477. </pre>
  478. </div>
  479. <hr /><pre>
  480. //////////////////////////////////////////////////////////////////////
  481. ////                                                              ////
  482. ////  File name &quot;wbw_wbr_fifos.v&quot;                                 ////
  483. ////                                                              ////
  484. ////  This file is part of the &quot;PCI bridge&quot; project               ////
  485. ////  http://www.opencores.org/cores/pci/                         ////
  486. ////                                                              ////
  487. ////  Author(s):                                                  ////
  488. ////      - Miha Dolenc (mihad@opencores.org)                     ////
  489. ////                                                              ////
  490. ////  All additional information is avaliable in the README       ////
  491. ////  file.                                                       ////
  492. ////                                                              ////
  493. ////                                                              ////
  494. //////////////////////////////////////////////////////////////////////
  495. ////                                                              ////
  496. //// Copyright (C) 2001 Miha Dolenc, mihad@opencores.org          ////
  497. ////                                                              ////
  498. //// This source file may be used and distributed without         ////
  499. //// restriction provided that this copyright statement is not    ////
  500. //// removed from the file and that any derivative work contains  ////
  501. //// the original copyright notice and the associated disclaimer. ////
  502. ////                                                              ////
  503. //// This source file is free software; you can redistribute it   ////
  504. //// and/or modify it under the terms of the GNU Lesser General   ////
  505. //// Public License as published by the Free Software Foundation; ////
  506. //// either version 2.1 of the License, or (at your option) any   ////
  507. //// later version.                                               ////
  508. ////                                                              ////
  509. //// This source is distributed in the hope that it will be       ////
  510. //// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
  511. //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
  512. //// PURPOSE.  See the GNU Lesser General Public License for more ////
  513. //// details.                                                     ////
  514. ////                                                              ////
  515. //// You should have received a copy of the GNU Lesser General    ////
  516. //// Public License along with this source; if not, download it   ////
  517. //// from http://www.opencores.org/lgpl.shtml                     ////
  518. ////                                                              ////
  519. //////////////////////////////////////////////////////////////////////
  520. //
  521. // CVS Revision History
  522. //
  523. // $Log: pci_wbw_wbr_fifos.v,v $
  524. // Revision 1.7  2006/07/04 13:16:19  mihad
  525. // Write burst performance patch applied.
  526. // Not tested. Everything should be backwards
  527. // compatible, since functional code is ifdefed.
  528. //
  529. // Revision 1.6  2003/12/19 11:11:30  mihad
  530. // Compact PCI Hot Swap support added.
  531. // New testcases added.
  532. // Specification updated.
  533. // Test application changed to support WB B3 cycles.
  534. //
  535. // Revision 1.5  2003/10/17 09:11:52  markom
  536. // mbist signals updated according to newest convention
  537. //
  538. // Revision 1.4  2003/08/14 13:06:03  simons
  539. // synchronizer_flop replaced with pci_synchronizer_flop, artisan ram instance updated.
  540. //
  541. // Revision 1.3  2003/03/26 13:16:18  mihad
  542. // Added the reset value parameter to the synchronizer flop module.
  543. // Added resets to all synchronizer flop instances.
  544. // Repaired initial sync value in fifos.
  545. //
  546. // Revision 1.2  2003/01/30 22:01:09  mihad
  547. // Updated synchronization in top level fifo modules.
  548. //
  549. // Revision 1.1  2003/01/27 16:49:31  mihad
  550. // Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
  551. //
  552. // Revision 1.9  2002/10/18 03:36:37  tadejm
  553. // Changed wrong signal name mbist_sen into mbist_ctrl_i.
  554. //
  555. // Revision 1.8  2002/10/17 22:49:22  tadejm
  556. // Changed BIST signals for RAMs.
  557. //
  558. // Revision 1.7  2002/10/11 10:09:01  mihad
  559. // Added additional testcase and changed rst name in BIST to trst
  560. //
  561. // Revision 1.6  2002/10/08 17:17:06  mihad
  562. // Added BIST signals for RAMs.
  563. //
  564. // Revision 1.5  2002/09/30 16:03:04  mihad
  565. // Added meta flop module for easier meta stable FF identification during synthesis
  566. //
  567. // Revision 1.4  2002/09/25 15:53:52  mihad
  568. // Removed all logic from asynchronous reset network
  569. //
  570. // Revision 1.3  2002/02/01 15:25:14  mihad
  571. // Repaired a few bugs, updated specification, added test bench files and design document
  572. //
  573. // Revision 1.2  2001/10/05 08:20:12  mihad
  574. // Updated all files with inclusion of timescale file for simulation purposes.
  575. //
  576. // Revision 1.1.1.1  2001/10/02 15:33:47  mihad
  577. // New project directory structure
  578. //
  579. //
  580. `include &quot;pci_constants.v&quot;
  581. // synopsys translate_off
  582. `include &quot;timescale.v&quot;
  583. // synopsys translate_on
  584. module pci_wbw_wbr_fifos
  585. (
  586.     wb_clock_in,
  587.     pci_clock_in,
  588.     reset_in,
  589.     wbw_wenable_in,
  590.     wbw_addr_data_in,
  591.     wbw_cbe_in,
  592.     wbw_control_in,
  593.     wbw_renable_in,
  594.     wbw_addr_data_out,
  595.     wbw_cbe_out,
  596.     wbw_control_out,
  597. //    wbw_flush_in,         write fifo flush not used
  598.     wbw_almost_full_out,
  599.     wbw_full_out,
  600.     wbw_empty_out,
  601.     wbw_transaction_ready_out,
  602.  wbw_half_full_out, ////Robert, burst issue
  603.     wbr_wenable_in,
  604.     wbr_data_in,
  605.     wbr_be_in,
  606.     wbr_control_in,
  607.     wbr_renable_in,
  608.     wbr_data_out,
  609.     wbr_be_out,
  610.     wbr_control_out,
  611.     wbr_flush_in,
  612.     wbr_empty_out
  613.  
  614. `ifdef PCI_BIST
  615.     ,
  616.     // debug chain signals
  617.     mbist_si_i,       // bist scan serial in
  618.     mbist_so_o,       // bist scan serial out
  619.     mbist_ctrl_i        // bist chain shift control
  620. `endif                        
  621. ) ;
  622. /*-----------------------------------------------------------------------------------------------------------
  623. System inputs:
  624. wb_clock_in - WISHBONE bus clock
  625. pci_clock_in - PCI bus clock
  626. reset_in - reset from control logic
  627. -------------------------------------------------------------------------------------------------------------*/
  628. input wb_clock_in, pci_clock_in, reset_in ;
  629. /*-----------------------------------------------------------------------------------------------------------
  630. WISHBONE WRITE FIFO interface signals prefixed with wbw_ - FIFO is used for posted writes initiated by
  631. WISHBONE master, traveling through FIFO and are completed on PCI by PCI master interface
  632. write enable signal:
  633. wbw_wenable_in = write enable input for WBW_FIFO - driven by WISHBONE slave interface
  634. data input signals:
  635. wbw_addr_data_in = data input - data from WISHBONE bus - first entry of transaction is address others are data entries
  636. wbw_cbe_in       = bus command/byte enable(~SEL[3:0]) input - first entry of transaction is bus command, other are byte enables
  637. wbw_control_in   = control input - encoded control bus input
  638. read enable signal:
  639. wbw_renable_in = read enable input driven by PCI master interface
  640. data output signals:
  641. wbw_addr_data_out = data output - data from WISHBONE bus - first entry of transaction is address, others are data entries
  642. wbw_cbe_out      = bus command/byte enable output - first entry of transaction is bus command, others are byte enables
  643. wbw_control_out = control input - encoded control bus input
  644. status signals - monitored by various resources in the core
  645. wbw_flush_in = flush signal input for WBW_FIFO - when asserted, fifo is flushed(emptied)
  646. wbw_almost_full_out = almost full output from WBW_FIFO
  647. wbw_full_out = full output from WBW_FIFO
  648. wbw_empty_out = empty output from WBW_FIFO
  649. wbw_transaction_ready_out = output indicating that one complete transaction is waiting in WBW_FIFO
  650. -----------------------------------------------------------------------------------------------------------*/
  651. // input control and data
  652. input        wbw_wenable_in ;
  653. input [31:0] wbw_addr_data_in ;
  654. input [3:0]  wbw_cbe_in ;
  655. input [3:0]  wbw_control_in ;
  656. // output control and data
  657. input         wbw_renable_in ;
  658. output [31:0] wbw_addr_data_out ;
  659. output [3:0]  wbw_cbe_out ;
  660. output [3:0]  wbw_control_out ;
  661. // flush input
  662. // input wbw_flush_in ; // not used
  663. // status outputs
  664. output wbw_almost_full_out ;
  665. output wbw_full_out ;
  666. output wbw_empty_out ;
  667. output wbw_transaction_ready_out ;
  668. output wbw_half_full_out; ////Robert, burst issue
  669. /*-----------------------------------------------------------------------------------------------------------
  670. WISHBONE READ FIFO interface signals prefixed with wbr_ - FIFO is used for holding delayed read completions
  671. initiated by master on WISHBONE bus and completed on PCI bus,
  672. write enable signal:
  673. wbr_wenable_in = write enable input for WBR_FIFO - driven by PCI master interface
  674. data input signals:
  675. wbr_data_in      = data input - data from PCI bus - there is no address entry here, since address is stored in separate register
  676. wbr_be_in        = byte enable(~BE#[3:0]) input - byte enables - same through one transaction
  677. wbr_control_in   = control input - encoded control bus input
  678. read enable signal:
  679. wbr_renable_in = read enable input driven by WISHBONE slave interface
  680. data output signals:
  681. wbr_data_out = data output - data from PCI bus
  682. wbr_be_out      = byte enable output(~#BE)
  683. wbr_control_out = control output - encoded control bus output
  684. status signals - monitored by various resources in the core
  685. wbr_flush_in = flush signal input for WBR_FIFO - when asserted, fifo is flushed(emptied)
  686. wbr full_out = full output from WBR_FIFO
  687. wbr_empty_out = empty output from WBR_FIFO
  688. -----------------------------------------------------------------------------------------------------------*/
  689. // input control and data
  690. input        wbr_wenable_in ;
  691. input [31:0] wbr_data_in ;
  692. input [3:0]  wbr_be_in ;
  693. input [3:0]  wbr_control_in ;
  694. // output control and data
  695. input         wbr_renable_in ;
  696. output [31:0] wbr_data_out ;
  697. output [3:0]  wbr_be_out ;
  698. output [3:0]  wbr_control_out ;
  699. // flush input
  700. input wbr_flush_in ;
  701. output wbr_empty_out ;
  702. `ifdef PCI_BIST
  703. /*-----------------------------------------------------
  704. BIST debug chain port signals
  705. -----------------------------------------------------*/
  706. input   mbist_si_i;       // bist scan serial in
  707. output  mbist_so_o;       // bist scan serial out
  708. input [`PCI_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i;       // bist chain shift control
  709. `endif
  710. /*-----------------------------------------------------------------------------------------------------------
  711. FIFO depth parameters:
  712. WBW_DEPTH = defines WBW_FIFO depth
  713. WBR_DEPTH = defines WBR_FIFO depth
  714. WBW_ADDR_LENGTH = defines WBW_FIFO's location address length = log2(WBW_DEPTH)
  715. WBR_ADDR_LENGTH = defines WBR_FIFO's location address length = log2(WBR_DEPTH)
  716. -----------------------------------------------------------------------------------------------------------*/
  717. parameter WBW_DEPTH = `WBW_DEPTH ;
  718. parameter WBW_ADDR_LENGTH = `WBW_ADDR_LENGTH ;
  719. parameter WBR_DEPTH = `WBR_DEPTH ;
  720. parameter WBR_ADDR_LENGTH = `WBR_ADDR_LENGTH ;
  721. /*-----------------------------------------------------------------------------------------------------------
  722. wbw_wallow = WBW_FIFO write allow wire - writes to FIFO are allowed when FIFO isn't full and write enable is 1
  723. wbw_rallow = WBW_FIFO read allow wire - reads from FIFO are allowed when FIFO isn't empty and read enable is 1
  724. -----------------------------------------------------------------------------------------------------------*/
  725. wire wbw_wallow ;
  726. wire wbw_rallow ;
  727. /*-----------------------------------------------------------------------------------------------------------
  728. wbr_wallow = WBR_FIFO write allow wire - writes to FIFO are allowed when FIFO isn't full and write enable is 1
  729. wbr_rallow = WBR_FIFO read allow wire - reads from FIFO are allowed when FIFO isn't empty and read enable is 1
  730. -----------------------------------------------------------------------------------------------------------*/
  731. wire wbr_wallow ;
  732. wire wbr_rallow ;
  733. /*-----------------------------------------------------------------------------------------------------------
  734. wires for address port conections from WBW_FIFO control logic to RAM blocks used for WBW_FIFO
  735. -----------------------------------------------------------------------------------------------------------*/
  736. wire [(WBW_ADDR_LENGTH - 1):0] wbw_raddr ;
  737. wire [(WBW_ADDR_LENGTH - 1):0] wbw_waddr ;
  738. /*-----------------------------------------------------------------------------------------------------------
  739. wires for address port conections from WBR_FIFO control logic to RAM blocks used for WBR_FIFO
  740. -----------------------------------------------------------------------------------------------------------*/
  741. wire [(WBR_ADDR_LENGTH - 1):0] wbr_raddr ;
  742. wire [(WBR_ADDR_LENGTH - 1):0] wbr_waddr ;
  743. /*-----------------------------------------------------------------------------------------------------------
  744. WBW_FIFO transaction counters: used to count incoming transactions and outgoing transactions. When number of
  745. input transactions is equal to number of output transactions, it means that there isn't any complete transaction
  746. currently present in the FIFO.
  747. -----------------------------------------------------------------------------------------------------------*/
  748. reg [(WBW_ADDR_LENGTH - 2):0] wbw_inTransactionCount ;
  749. reg [(WBW_ADDR_LENGTH - 2):0] wbw_outTransactionCount ;
  750. /*-----------------------------------------------------------------------------------------------------------
  751. wires monitoring control bus. When control bus on a write transaction has a value of `LAST, it means that
  752. complete transaction is in the FIFO. When control bus on a read transaction has a value of `LAST,
  753. it means that there was one complete transaction taken out of FIFO.
  754. -----------------------------------------------------------------------------------------------------------*/
  755. wire wbw_last_in  = wbw_control_in[`LAST_CTRL_BIT]  ;
  756. wire wbw_last_out = wbw_control_out[`LAST_CTRL_BIT] ;
  757. wire wbw_empty ;
  758. wire wbr_empty ;
  759. assign wbw_empty_out = wbw_empty ;
  760. assign wbr_empty_out = wbr_empty ;
  761. // clear wires for fifos
  762. wire wbw_clear = reset_in /*|| wbw_flush_in*/ ; // WBW_FIFO clear flush not used
  763. wire wbr_clear = reset_in /*|| wbr_flush_in*/ ; // WBR_FIFO clear - flush changed from asynchronous to synchronous
  764. /*-----------------------------------------------------------------------------------------------------------
  765. Definitions of wires for connecting RAM instances
  766. -----------------------------------------------------------------------------------------------------------*/
  767. wire [39:0] dpram_portA_output ;
  768. wire [39:0] dpram_portB_output ;
  769. wire [39:0] dpram_portA_input = {wbw_control_in, wbw_cbe_in, wbw_addr_data_in} ;
  770. wire [39:0] dpram_portB_input = {wbr_control_in, wbr_be_in, wbr_data_in} ;
  771. /*-----------------------------------------------------------------------------------------------------------
  772. Fifo output assignments - each ram port provides data for different fifo
  773. -----------------------------------------------------------------------------------------------------------*/
  774. assign wbw_control_out = dpram_portB_output[39:36] ;
  775. assign wbr_control_out = dpram_portA_output[39:36] ;
  776. assign wbw_cbe_out     = dpram_portB_output[35:32] ;
  777. assign wbr_be_out      = dpram_portA_output[35:32] ;
  778. assign wbw_addr_data_out = dpram_portB_output[31:0] ;
  779. assign wbr_data_out      = dpram_portA_output[31:0] ;
  780. `ifdef WB_RAM_DONT_SHARE
  781.     /*-----------------------------------------------------------------------------------------------------------
  782.     Piece of code in this ifdef section is used in applications which can provide enough RAM instances to
  783.     accomodate four fifos - each occupying its own instance of ram. Ports are connected in such a way,
  784.     that instances of RAMs can be changed from two port to dual port ( async read/write port ). In that case,
  785.     write port is always port a and read port is port b.
  786.     -----------------------------------------------------------------------------------------------------------*/
  787.     /*-----------------------------------------------------------------------------------------------------------
  788.     Pad redundant address lines with zeros. This may seem stupid, but it comes in perfect for FPGA impl.
  789.     -----------------------------------------------------------------------------------------------------------*/
  790.     /*
  791.     wire [(`WBW_FIFO_RAM_ADDR_LENGTH - WBW_ADDR_LENGTH - 1):0] wbw_addr_prefix = {( `WBW_FIFO_RAM_ADDR_LENGTH - WBW_ADDR_LENGTH){1'b0}} ;
  792.     wire [(`WBR_FIFO_RAM_ADDR_LENGTH - WBR_ADDR_LENGTH - 1):0] wbr_addr_prefix = {( `WBR_FIFO_RAM_ADDR_LENGTH - WBR_ADDR_LENGTH){1'b0}} ;
  793.     */
  794.     // compose complete port addresses
  795.     wire [(`WB_FIFO_RAM_ADDR_LENGTH-1):0] wbw_whole_waddr = wbw_waddr ;
  796.     wire [(`WB_FIFO_RAM_ADDR_LENGTH-1):0] wbw_whole_raddr = wbw_raddr ;
  797.     wire [(`WB_FIFO_RAM_ADDR_LENGTH-1):0] wbr_whole_waddr = wbr_waddr ;
  798.     wire [(`WB_FIFO_RAM_ADDR_LENGTH-1):0] wbr_whole_raddr = wbr_raddr ;
  799.     wire wbw_read_enable = 1'b1 ;
  800.     wire wbr_read_enable = 1'b1 ;
  801.     `ifdef PCI_BIST
  802.     wire mbist_so_o_internal ; // wires for connection of debug ports on two rams
  803.     wire mbist_si_i_internal = mbist_so_o_internal ;
  804.     `endif
  805.     // instantiate and connect two generic rams - one for wishbone write fifo and one for wishbone read fifo
  806.     pci_wb_tpram #(`WB_FIFO_RAM_ADDR_LENGTH, 40) wbw_fifo_storage
  807.     (
  808.         /////////////////Generic synchronous two-port RAM interface
  809.         .clk_a(wb_clock_in),
  810.         .rst_a(reset_in),
  811.         .ce_a(1'b1),
  812.         .we_a(wbw_wallow),
  813.         .oe_a(1'b1),
  814.         .addr_a(wbw_whole_waddr),
  815.         .di_a(dpram_portA_input),
  816.         .do_a(),
  817.         .clk_b(pci_clock_in),
  818.         .rst_b(reset_in),
  819.         .ce_b(wbw_read_enable),
  820.         .we_b(1'b0),
  821.         .oe_b(1'b1),
  822.         .addr_b(wbw_whole_raddr),
  823.         .di_b(40'h00_0000_0000),
  824.         .do_b(dpram_portB_output)
  825.     `ifdef PCI_BIST
  826.         ,
  827.         .mbist_si_i       (mbist_si_i),
  828.         .mbist_so_o       (mbist_so_o_internal),
  829.         .mbist_ctrl_i       (mbist_ctrl_i)
  830.     `endif
  831.     );
  832.  
  833.     pci_wb_tpram #(`WB_FIFO_RAM_ADDR_LENGTH, 40) wbr_fifo_storage
  834.     (
  835.         // Generic synchronous two-port RAM interface
  836.         .clk_a(pci_clock_in),
  837.         .rst_a(reset_in),
  838.         .ce_a(1'b1),
  839.         .we_a(wbr_wallow),
  840.         .oe_a(1'b1),
  841.         .addr_a(wbr_whole_waddr),
  842.         .di_a(dpram_portB_input),
  843.         .do_a(),
  844.         .clk_b(wb_clock_in),
  845.         .rst_b(reset_in),
  846.         .ce_b(wbr_read_enable),
  847.         .we_b(1'b0),
  848.         .oe_b(1'b1),
  849.         .addr_b(wbr_whole_raddr),
  850.         .di_b(40'h00_0000_0000),
  851.         .do_b(dpram_portA_output)
  852.     `ifdef PCI_BIST
  853.         ,
  854.         .mbist_si_i       (mbist_si_i_internal),
  855.         .mbist_so_o       (mbist_so_o),
  856.         .mbist_ctrl_i       (mbist_ctrl_i)
  857.     `endif
  858.     );
  859. `else // RAM blocks sharing between two fifos
  860.     /*-----------------------------------------------------------------------------------------------------------
  861.     Code section under this ifdef is used for implementation where RAM instances are too expensive. In this
  862.     case one RAM instance is used for both - WISHBONE read and WISHBONE write fifo.
  863.     -----------------------------------------------------------------------------------------------------------*/
  864.     /*-----------------------------------------------------------------------------------------------------------
  865.     Address prefix definition - since both FIFOs reside in same RAM instance, storage is separated by MSB
  866.     addresses. WISHBONE write fifo addresses are padded with zeros on the MSB side ( at least one address line
  867.     must be used for this ), WISHBONE read fifo addresses are padded with ones on the right ( at least one ).
  868.     -----------------------------------------------------------------------------------------------------------*/
  869.     wire [(`WB_FIFO_RAM_ADDR_LENGTH - WBW_ADDR_LENGTH - 1):0] wbw_addr_prefix = {( `WB_FIFO_RAM_ADDR_LENGTH - WBW_ADDR_LENGTH){1'b0}} ;
  870.     wire [(`WB_FIFO_RAM_ADDR_LENGTH - WBR_ADDR_LENGTH - 1):0] wbr_addr_prefix = {( `WB_FIFO_RAM_ADDR_LENGTH - WBR_ADDR_LENGTH){1'b1}} ;
  871.     /*-----------------------------------------------------------------------------------------------------------
  872.     Port A address generation for RAM instance. RAM instance must be full two port RAM - read and write capability
  873.     on both sides.
  874.     Port A is clocked by WISHBONE clock, DIA is input for wbw_fifo, DOA is output for wbr_fifo.
  875.     Address is multiplexed so operation can be switched between fifos. Default is a read on port.
  876.     -----------------------------------------------------------------------------------------------------------*/
  877.     wire [(`WB_FIFO_RAM_ADDR_LENGTH-1):0] portA_addr = wbw_wallow ? {wbw_addr_prefix, wbw_waddr} : {wbr_addr_prefix, wbr_raddr} ;
  878.     /*-----------------------------------------------------------------------------------------------------------
  879.     Port B is clocked by PCI clock, DIB is input for wbr_fifo, DOB is output for wbw_fifo.
  880.     Address is multiplexed so operation can be switched between fifos. Default is a read on port.
  881.     -----------------------------------------------------------------------------------------------------------*/
  882.     wire [(`WB_FIFO_RAM_ADDR_LENGTH-1):0] portB_addr  = wbr_wallow ? {wbr_addr_prefix, wbr_waddr} : {wbw_addr_prefix, wbw_raddr} ;
  883.     wire portA_enable      = 1'b1 ;
  884.     wire portB_enable      = 1'b1 ;
  885.     // instantiate RAM for these two fifos
  886.     pci_wb_tpram #(`WB_FIFO_RAM_ADDR_LENGTH, 40) wbu_fifo_storage
  887.     (
  888.         // Generic synchronous two-port RAM interface
  889.         .clk_a(wb_clock_in),
  890.         .rst_a(reset_in),
  891.         .ce_a(portA_enable),
  892.         .we_a(wbw_wallow),
  893.         .oe_a(1'b1),
  894.         .addr_a(portA_addr),
  895.         .di_a(dpram_portA_input),
  896.         .do_a(dpram_portA_output),
  897.         .clk_b(pci_clock_in),
  898.         .rst_b(reset_in),
  899.         .ce_b(portB_enable),
  900.         .we_b(wbr_wallow),
  901.         .oe_b(1'b1),
  902.         .addr_b(portB_addr),
  903.         .di_b(dpram_portB_input),
  904.         .do_b(dpram_portB_output)
  905.     `ifdef PCI_BIST
  906.         ,
  907.         .mbist_si_i       (mbist_si_i),
  908.         .mbist_so_o       (mbist_so_o),
  909.         .mbist_ctrl_i       (mbist_ctrl_i)
  910.     `endif
  911.     );
  912. `endif
  913. /*-----------------------------------------------------------------------------------------------------------
  914. Instantiation of two control logic modules - one for WBW_FIFO and one for WBR_FIFO
  915. -----------------------------------------------------------------------------------------------------------*/
  916. pci_wbw_fifo_control #(WBW_ADDR_LENGTH) wbw_fifo_ctrl
  917. (
  918.     .rclock_in(pci_clock_in),
  919.     .wclock_in(wb_clock_in),
  920.     .renable_in(wbw_renable_in),
  921.     .wenable_in(wbw_wenable_in),
  922.     .reset_in(reset_in),
  923. //////////////////////////////    .flush_in(wbw_flush_in),
  924.     .almost_full_out(wbw_almost_full_out),
  925.     .full_out(wbw_full_out),
  926.     .empty_out(wbw_empty),
  927.     .waddr_out(wbw_waddr),
  928.     .raddr_out(wbw_raddr),
  929.     .rallow_out(wbw_rallow),
  930.     .wallow_out(wbw_wallow),
  931. .half_full_out(wbw_half_full_out) ////Robert, burst issue
  932. );
  933. pci_wbr_fifo_control #(WBR_ADDR_LENGTH) wbr_fifo_ctrl
  934. (   .rclock_in(wb_clock_in),
  935.     .wclock_in(pci_clock_in),
  936.     .renable_in(wbr_renable_in),
  937.     .wenable_in(wbr_wenable_in),
  938.     .reset_in(reset_in),
  939.     .flush_in(wbr_flush_in),
  940.     .empty_out(wbr_empty),
  941.     .waddr_out(wbr_waddr),
  942.     .raddr_out(wbr_raddr),
  943.     .rallow_out(wbr_rallow),
  944.     .wallow_out(wbr_wallow)
  945. );
  946. // in and out transaction counters and grey codes
  947. reg  [(WBW_ADDR_LENGTH-2):0] inGreyCount ;
  948. reg  [(WBW_ADDR_LENGTH-2):0] outGreyCount ;
  949. wire [(WBW_ADDR_LENGTH-2):0] inNextGreyCount = {wbw_inTransactionCount[(WBW_ADDR_LENGTH-2)], wbw_inTransactionCount[(WBW_ADDR_LENGTH-2):1] ^ wbw_inTransactionCount[(WBW_ADDR_LENGTH-3):0]} ;
  950. wire [(WBW_ADDR_LENGTH-2):0] outNextGreyCount = {wbw_outTransactionCount[(WBW_ADDR_LENGTH-2)], wbw_outTransactionCount[(WBW_ADDR_LENGTH-2):1] ^ wbw_outTransactionCount[(WBW_ADDR_LENGTH-3):0]} ;
  951. // input transaction counter increment - when last data of transaction is written to fifo
  952. wire in_count_en  = wbw_wallow &amp;&amp; wbw_last_in ;
  953. // output transaction counter increment - when last data is on top of fifo and read from it
  954. wire out_count_en = wbw_renable_in &amp;&amp; wbw_last_out ;
  955. // register holding grey coded count of incoming transactions
  956. always@(posedge wb_clock_in or posedge wbw_clear)
  957. begin
  958.     if (wbw_clear)
  959.     begin
  960.         inGreyCount &lt;= #3 0 ;
  961.     end
  962.     else
  963.     if (in_count_en)
  964.         inGreyCount &lt;= #3 inNextGreyCount ;
  965. end
  966. wire [(WBW_ADDR_LENGTH-2):0] pci_clk_sync_inGreyCount ;
  967. reg  [(WBW_ADDR_LENGTH-2):0] pci_clk_inGreyCount ;
  968. pci_synchronizer_flop #((WBW_ADDR_LENGTH - 1), 0) i_synchronizer_reg_inGreyCount
  969. (
  970.     .data_in        (inGreyCount),
  971.     .clk_out        (pci_clock_in),
  972.     .sync_data_out  (pci_clk_sync_inGreyCount),
  973.     .async_reset    (wbw_clear)
  974. ) ;
  975. always@(posedge pci_clock_in or posedge wbw_clear)
  976. begin
  977.     if (wbw_clear)
  978.         pci_clk_inGreyCount &lt;= #`FF_DELAY 0 ;
  979.     else
  980.         pci_clk_inGreyCount &lt;= # `FF_DELAY pci_clk_sync_inGreyCount ;
  981. end
  982. // register holding grey coded count of outgoing transactions
  983. always@(posedge pci_clock_in or posedge wbw_clear)
  984. begin
  985.     if (wbw_clear)
  986.     begin
  987.         outGreyCount &lt;= #`FF_DELAY 0 ;
  988.     end
  989.     else
  990.     if (out_count_en)
  991.         outGreyCount &lt;= #`FF_DELAY outNextGreyCount ;
  992. end
  993. // incoming transactions counter
  994. always@(posedge wb_clock_in or posedge wbw_clear)
  995. begin
  996.     if (wbw_clear)
  997.         wbw_inTransactionCount &lt;= #`FF_DELAY 1 ;
  998.     else
  999.     if (in_count_en)
  1000.         wbw_inTransactionCount &lt;= #`FF_DELAY wbw_inTransactionCount + 1'b1 ;
  1001. end
  1002. // outgoing transactions counter
  1003. always@(posedge pci_clock_in or posedge wbw_clear)
  1004. begin
  1005.     if (wbw_clear)
  1006.         wbw_outTransactionCount &lt;= 1 ;
  1007.     else
  1008.     if (out_count_en)
  1009.         wbw_outTransactionCount &lt;= #`FF_DELAY wbw_outTransactionCount + 1'b1 ;
  1010. end
  1011. assign wbw_transaction_ready_out = pci_clk_inGreyCount != outGreyCount ;
  1012. endmodule
  1013. </pre>
  1014. <hr />
  1015. <address><span style="font-size: smaller">FreeBSD-CVSweb &lt;<a href="mailto:freebsd-cvsweb@FreeBSD.org">freebsd-cvsweb@FreeBSD.org</a>&gt;</span></address>
  1016. </body>
  1017. </html>
  1018. <!-- pf_body_end -->
  1019. </td>
  1020. <td><img width=15 src="/images/dotty.gif"></td>
  1021. </tr></table>
  1022. <xcenter>
  1023. <p>
  1024. <table width=100% cellpadding=0 cellspacing=0 border=0>
  1025.       <tr><td align=right valign=bottom><a title='Top' href='#top'><img border=0 alt='Top' src='/images/hr_up.gif'></a></td></tr>
  1026.       <tr><td background='/images/hpd.gif'><img height=1 border=0 src='/images/dotty.gif'></td></tr><tr><td height=4><img height=4 src='/images/dotty.gif'></td></tr></table>
  1027. &nbsp;
  1028. <br>
  1029. <!--
  1030. <table border=0 cellpadding=0 cellspacing=1 bgcolor=#ffffff><tr><td>
  1031. <table cellpadding=0 cellspacing=0 border=0 bgcolor=#ffffff><tr><td>
  1032. //-->
  1033. <script type="text/javascript"><!--
  1034. google_ad_client = "pub-9285819221080148";
  1035. google_alternate_color = "FFFFFF";
  1036. google_ad_width = 728;
  1037. google_ad_height = 90;
  1038. google_ad_format = "728x90_as";
  1039. google_ad_type = "text_image";
  1040. google_ad_channel ="3034172958";
  1041. google_color_border = "ffffff";
  1042. google_color_bg = "ffffff";
  1043. google_color_link = "444488";
  1044. google_color_url = "b00000";
  1045. google_color_text = "666666";
  1046. //--></script>
  1047. <script type="text/javascript"
  1048.   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  1049. </script>
  1050. <!--
  1051. </td></tr></table>
  1052. </td></tr></table>
  1053. //-->
  1054. </center>
  1055. <img border=0 src="/images/dotty.gif" height=1 width=400>
  1056. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1057. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1058. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1059. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1060. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1061. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1062. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1063. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1064. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1065. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1066. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1067. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1068. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1069. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1070. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1071. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1072. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1073. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1074. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1075. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1076. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1077. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1078. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1079. <img border=0 src="/images/dotty.gif" height=1 width=30>
  1080. </td></tr>
  1081. </table>
  1082. &nbsp;
  1083. </td></tr>
  1084. <tr bgcolor=#000000><td><img height=1 src="/images/dotty.gif"></td></tr>
  1085. </table>
  1086. <table background="/images/topbg.gif" width=100% cellpadding=0 cellspacing=0 border=0 bgcolor=#aaddff>
  1087. <tr><td align=right>
  1088. Copyright (c) 1999-2007 OPENCORES.ORG. All rights reserved. &nbsp;
  1089. </td></tr>
  1090. <tr><td>
  1091. &nbsp;
  1092. </td></tr>
  1093. </table>
  1094. </td>
  1095. <td width=1 bgcolor=#000000><img width=1 src="/images/dotty.gif"></td>
  1096. <td width=1 bgcolor=#f0f0c8><img width=1 src="/images/dotty.gif"></td>
  1097. </tr></table>
  1098. </center>
  1099. <!-- pf_footer_start -->
  1100.   </body>
  1101. </html>
  1102. <!-- pf_footer_end -->