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

并行计算

开发平台:

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_wbs_wbb3_2_wbb2.v?rev=1.5'"></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_wbs_wbb3_2_wbb2.v - view - 1.5</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_wbs_wbb3_2_wbb2.v#rev1.5"><img src="/icons/back.gif" alt="[BACK]" border="0" width="20" height="22" /></a><b>Return to <a href="./pci_wbs_wbb3_2_wbb2.v#rev1.5">pci_wbs_wbb3_2_wbb2.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_wbs_wbb3_2_wbb2.v">pci_wbs_wbb3_2_wbb2.v</a><br />
  468. <a name="rev1.5"></a><a name="HEAD"></a>
  469.  Revision <b>1.5</b>: <a href="/cvsweb.cgi/~checkout~/pci/rtl/verilog/pci_wbs_wbb3_2_wbb2.v?rev=1.5;content-type=text%2Fplain" class="download-link">download</a> - view: <a href="pci_wbs_wbb3_2_wbb2.v?rev=1.5;content-type=text%2Fplain" class="display-link">text</a>, <a href="pci_wbs_wbb3_2_wbb2.v?annotate=1.5">annotated</a> - <a href="pci_wbs_wbb3_2_wbb2.v?r1=1.5#rev1.5">select&nbsp;for&nbsp;diffs</a><br />
  470. <i>Mon Aug 16 09:12:01 2004 UTC</i> (2 years, 9 months ago) by <i>mihad</i><br />
  471. Branches: <a href="./pci_wbs_wbb3_2_wbb2.v?only_with_tag=MAIN">MAIN</a><br />
  472. CVS tags: <a href="./pci_wbs_wbb3_2_wbb2.v?only_with_tag=HEAD">HEAD</a><br />
  473. <pre class="log">
  474. Removed unsinthesizable !== comparation.
  475. </pre>
  476. </div>
  477. <hr /><pre>
  478. //////////////////////////////////////////////////////////////////////
  479. ////                                                              ////
  480. ////  File name &quot;pci_wbs_wbb3_2_wbb2.v&quot;                           ////
  481. ////                                                              ////
  482. ////  This file is part of the &quot;PCI bridge&quot; project               ////
  483. ////  http://www.opencores.org/cores/pci/                         ////
  484. ////                                                              ////
  485. ////  Author(s):                                                  ////
  486. ////      - Miha Dolenc (mihad@opencores.org)                     ////
  487. ////                                                              ////
  488. ////                                                              ////
  489. ////                                                              ////
  490. //////////////////////////////////////////////////////////////////////
  491. ////                                                              ////
  492. //// Copyright (C) 2003 Miha Dolenc, mihad@opencores.org          ////
  493. ////                                                              ////
  494. //// This source file may be used and distributed without         ////
  495. //// restriction provided that this copyright statement is not    ////
  496. //// removed from the file and that any derivative work contains  ////
  497. //// the original copyright notice and the associated disclaimer. ////
  498. ////                                                              ////
  499. //// This source file is free software; you can redistribute it   ////
  500. //// and/or modify it under the terms of the GNU Lesser General   ////
  501. //// Public License as published by the Free Software Foundation; ////
  502. //// either version 2.1 of the License, or (at your option) any   ////
  503. //// later version.                                               ////
  504. ////                                                              ////
  505. //// This source is distributed in the hope that it will be       ////
  506. //// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
  507. //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
  508. //// PURPOSE.  See the GNU Lesser General Public License for more ////
  509. //// details.                                                     ////
  510. ////                                                              ////
  511. //// You should have received a copy of the GNU Lesser General    ////
  512. //// Public License along with this source; if not, download it   ////
  513. //// from http://www.opencores.org/lgpl.shtml                     ////
  514. ////                                                              ////
  515. //////////////////////////////////////////////////////////////////////
  516. //
  517. // CVS Revision History
  518. //
  519. // $Log: pci_wbs_wbb3_2_wbb2.v,v $
  520. // Revision 1.5  2004/08/16 09:12:01  mihad
  521. // Removed unsinthesizable !== comparation.
  522. //
  523. // Revision 1.4  2004/01/24 11:54:18  mihad
  524. // Update! SPOCI Implemented!
  525. //
  526. // Revision 1.3  2003/12/19 11:11:30  mihad
  527. // Compact PCI Hot Swap support added.
  528. // New testcases added.
  529. // Specification updated.
  530. // Test application changed to support WB B3 cycles.
  531. //
  532. // Revision 1.2  2003/12/01 16:20:56  simons
  533. // ifdef - endif statements put in separate lines for flint compatibility.
  534. //
  535. // Revision 1.1  2003/08/12 13:58:19  mihad
  536. // Module that converts slave WISHBONE B3 accesses to
  537. // WISHBONE B2 accesses with CAB.
  538. //
  539. //
  540. module pci_wbs_wbb3_2_wbb2
  541. (
  542.     wb_clk_i,
  543.     wb_rst_i,
  544.     wbs_cyc_i,
  545.     wbs_cyc_o,
  546.     wbs_stb_i,
  547.     wbs_stb_o,
  548.     wbs_adr_i,
  549.     wbs_adr_o,
  550.     wbs_dat_i_i,
  551.     wbs_dat_i_o,
  552.     wbs_dat_o_i,
  553.     wbs_dat_o_o,
  554.     wbs_we_i,
  555.     wbs_we_o,
  556.     wbs_sel_i,
  557.     wbs_sel_o,
  558.     wbs_ack_i,
  559.     wbs_ack_o,
  560.     wbs_err_i,
  561.     wbs_err_o,
  562.     wbs_rty_i,
  563.     wbs_rty_o,
  564.     wbs_cti_i,
  565.     wbs_bte_i,
  566.     wbs_cab_o,
  567.     wb_init_complete_i
  568. ) ;
  569. input       wb_clk_i    ;
  570. input       wb_rst_i    ;
  571. input           wbs_cyc_i           ;
  572. output          wbs_cyc_o           ;
  573. input           wbs_stb_i           ;
  574. output          wbs_stb_o           ;
  575. input   [31:0]  wbs_adr_i           ;
  576. output  [31:0]  wbs_adr_o           ;
  577. input   [31:0]  wbs_dat_i_i         ;
  578. output  [31:0]  wbs_dat_i_o         ;
  579. input   [31:0]  wbs_dat_o_i         ;
  580. output  [31:0]  wbs_dat_o_o         ;
  581. input           wbs_we_i            ;
  582. output          wbs_we_o            ;
  583. input   [ 3:0]  wbs_sel_i           ;
  584. output  [ 3:0]  wbs_sel_o           ;
  585. input           wbs_ack_i           ;
  586. output          wbs_ack_o           ;
  587. input           wbs_err_i           ;
  588. output          wbs_err_o           ;
  589. input           wbs_rty_i           ;
  590. output          wbs_rty_o           ;
  591. input   [ 2:0]  wbs_cti_i           ;
  592. input   [ 1:0]  wbs_bte_i           ;
  593. output          wbs_cab_o           ;
  594. input           wb_init_complete_i  ;
  595. reg             wbs_cyc_o           ;
  596. reg     [31:0]  wbs_adr_o           ;
  597. reg     [31:0]  wbs_dat_i_o         ;
  598. reg             wbs_dat_i_o_valid   ;
  599. reg     [31:0]  wbs_dat_o_o         ;
  600. reg             wbs_we_o            ;
  601. reg     [ 3:0]  wbs_sel_o           ;
  602. reg             wbs_ack_o           ;
  603. reg             wbs_err_o           ;
  604. reg             wbs_rty_o           ; 
  605. reg             wbs_cab_o           ;
  606. always@(posedge wb_rst_i or posedge wb_clk_i)
  607. begin
  608.     if (wb_rst_i)
  609.     begin
  610.         wbs_cyc_o           &lt;= 1'b0  ;
  611.         wbs_adr_o           &lt;= 32'h0 ;
  612.         wbs_dat_i_o         &lt;= 32'h0 ;
  613.         wbs_dat_o_o         &lt;= 32'h0 ;
  614.         wbs_sel_o           &lt;= 4'h0  ;
  615.         wbs_we_o            &lt;= 1'b0  ;
  616.         wbs_dat_i_o_valid   &lt;= 1'b0  ;
  617.         wbs_cab_o           &lt;= 1'b0  ;
  618.     end
  619.     else
  620.     begin:transfer_and_transfer_adr_ctrl_blk
  621.         reg start_cycle            ;
  622.         reg [3:0] end_cycle        ;
  623.         reg generate_int_adr       ;
  624.         
  625.         start_cycle  = ~wbs_cyc_o &amp; wbs_cyc_i &amp; wbs_stb_i &amp; ~wbs_ack_o &amp; ~wbs_err_o &amp; ~wbs_rty_o &amp; wb_init_complete_i ;
  626.         
  627.         // there is a few conditions when cycle must be terminated
  628.         // I've put them into bit array for better readability of the code
  629.         // 1st condition - pci bridge is signaling an error
  630.         end_cycle[0] = wbs_err_i ;
  631.     
  632.         // 2nd condition - pci bridge is signaling a retry - that can be ignored via the defines
  633.         end_cycle[1] = wbs_rty_i 
  634.             `ifdef PCI_WBS_B3_RTY_DISABLE 
  635.                 &amp; 1'b0 
  636.             `endif 
  637.                 ;
  638.         // 3rd condition - end non burst cycles as soon as pci bridge response is received
  639.         end_cycle[2] = wbs_cyc_i &amp; wbs_stb_i &amp; wbs_ack_i &amp; ~wbs_cab_o ;
  640.         // 4th condition - end cycle when acknowledge and strobe are both asserted and master is signaling end of burst
  641.         end_cycle[3] = wbs_cyc_i &amp; wbs_stb_i &amp; wbs_ack_o &amp; wbs_cab_o &amp; (wbs_cti_i == 3'b111) ;
  642.         if (wbs_dat_i_o_valid)
  643.         begin
  644.             if (wbs_ack_i | wbs_err_i 
  645.                 `ifdef PCI_WBS_B3_RTY_DISABLE 
  646.                 `else 
  647.                     | wbs_rty_i 
  648.                 `endif
  649.                     )
  650.                 wbs_dat_i_o_valid &lt;= 1'b0 ;
  651.         end
  652.         else
  653.         begin
  654.             if (wbs_cyc_i &amp; wbs_stb_i &amp; wbs_we_i &amp; ~wbs_ack_o &amp; ~wbs_err_o &amp; ~wbs_rty_o &amp; wb_init_complete_i)
  655.             begin
  656.                 wbs_dat_i_o       &lt;= wbs_dat_i_i ;
  657.                 wbs_dat_i_o_valid &lt;= 1'b1 ;
  658.             end
  659.         end
  660.         if (start_cycle)
  661.         begin
  662.             wbs_cyc_o   &lt;= 1'b1         ;
  663.             wbs_sel_o   &lt;= wbs_sel_i    ;
  664.             wbs_we_o    &lt;= wbs_we_i     ;
  665.             
  666.             if (wbs_cti_i == 3'b010)
  667.             begin
  668.                 case (wbs_bte_i)
  669.                 2'b00:  begin 
  670.                             wbs_cab_o &lt;= 1'b1 ; 
  671.                         end
  672.                 2'b01:  begin
  673.                             if (wbs_adr_i[3:2] == 2'b00)
  674.                                 wbs_cab_o &lt;= 1'b1 ;
  675.                             else
  676.                                 wbs_cab_o &lt;= 1'b0 ;
  677.                         end
  678.                 2'b10:  begin
  679.                             if (wbs_adr_i[4:2] == 3'b000)
  680.                                 wbs_cab_o &lt;= 1'b1 ;
  681.                             else
  682.                                 wbs_cab_o &lt;= 1'b0 ;
  683.                         end
  684.                 2'b11:  begin
  685.                             if (wbs_adr_i[5:2] == 4'b0000)
  686.                                 wbs_cab_o &lt;= 1'b1 ;
  687.                             else
  688.                                 wbs_cab_o &lt;= 1'b0 ;
  689.                         end
  690.                 endcase
  691.             end
  692.             else
  693.             begin
  694.                 wbs_cab_o &lt;= 1'b0 ;
  695.             end
  696.         end
  697.         else if ( wbs_cyc_o &amp; (|end_cycle) )
  698.         begin
  699.             wbs_cyc_o &lt;= 1'b0 ;
  700.         end        
  701.         if (start_cycle)
  702.             wbs_adr_o &lt;= wbs_adr_i ;
  703.         else if (wbs_ack_i)
  704.             wbs_adr_o[31:2] &lt;= wbs_adr_o[31:2] + 1'b1 ;
  705.         if (~wbs_we_o &amp; wbs_ack_i)
  706.             wbs_dat_o_o &lt;= wbs_dat_o_i ;
  707.     end
  708. end
  709. always@(posedge wb_rst_i or posedge wb_clk_i)
  710. begin
  711.     if (wb_rst_i)
  712.     begin
  713.         wbs_ack_o &lt;= 1'b0 ;
  714.         wbs_err_o &lt;= 1'b0 ;
  715.         wbs_rty_o &lt;= 1'b0 ;
  716.     end
  717.     else
  718.     begin
  719.         if (wbs_ack_o)
  720.             wbs_ack_o &lt;= wbs_ack_i | ~wbs_stb_i ;
  721.         else
  722.             wbs_ack_o &lt;= wbs_ack_i ;
  723.         
  724.         if (wbs_err_o)
  725.             wbs_err_o &lt;= ~wbs_stb_i ;
  726.         else
  727.             wbs_err_o &lt;= wbs_err_i ;
  728.     `ifdef PCI_WBS_B3_RTY_DISABLE
  729.         wbs_rty_o &lt;= 1'b0 ;
  730.     `else
  731.         if (wbs_rty_o)
  732.             wbs_rty_o &lt;= ~wbs_stb_i ;
  733.         else
  734.             wbs_rty_o &lt;= wbs_rty_i ;
  735.     `endif
  736.     end
  737. end
  738. assign wbs_stb_o = (wbs_cyc_o &amp; ~wbs_we_o &amp; ~wbs_ack_o &amp; ~wbs_err_o &amp; ~wbs_rty_o) |
  739.                    (wbs_cyc_o &amp; wbs_stb_i &amp; wbs_cab_o &amp; ~wbs_we_o &amp; wbs_cti_i != 3'b111) |
  740.                    (wbs_cyc_o &amp; wbs_we_o &amp; wbs_dat_i_o_valid) ;
  741. endmodule
  742. </pre>
  743. <hr />
  744. <address><span style="font-size: smaller">FreeBSD-CVSweb &lt;<a href="mailto:freebsd-cvsweb@FreeBSD.org">freebsd-cvsweb@FreeBSD.org</a>&gt;</span></address>
  745. </body>
  746. </html>
  747. <!-- pf_body_end -->
  748. </td>
  749. <td><img width=15 src="/images/dotty.gif"></td>
  750. </tr></table>
  751. <xcenter>
  752. <p>
  753. <table width=100% cellpadding=0 cellspacing=0 border=0>
  754.       <tr><td align=right valign=bottom><a title='Top' href='#top'><img border=0 alt='Top' src='/images/hr_up.gif'></a></td></tr>
  755.       <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>
  756. &nbsp;
  757. <br>
  758. <!--
  759. <table border=0 cellpadding=0 cellspacing=1 bgcolor=#ffffff><tr><td>
  760. <table cellpadding=0 cellspacing=0 border=0 bgcolor=#ffffff><tr><td>
  761. //-->
  762. <script type="text/javascript"><!--
  763. google_ad_client = "pub-9285819221080148";
  764. google_alternate_color = "FFFFFF";
  765. google_ad_width = 728;
  766. google_ad_height = 90;
  767. google_ad_format = "728x90_as";
  768. google_ad_type = "text_image";
  769. google_ad_channel ="3034172958";
  770. google_color_border = "ffffff";
  771. google_color_bg = "ffffff";
  772. google_color_link = "444488";
  773. google_color_url = "b00000";
  774. google_color_text = "666666";
  775. //--></script>
  776. <script type="text/javascript"
  777.   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  778. </script>
  779. <!--
  780. </td></tr></table>
  781. </td></tr></table>
  782. //-->
  783. </center>
  784. <img border=0 src="/images/dotty.gif" height=1 width=400>
  785. <img border=0 src="/images/dotty.gif" height=1 width=30>
  786. <img border=0 src="/images/dotty.gif" height=1 width=30>
  787. <img border=0 src="/images/dotty.gif" height=1 width=30>
  788. <img border=0 src="/images/dotty.gif" height=1 width=30>
  789. <img border=0 src="/images/dotty.gif" height=1 width=30>
  790. <img border=0 src="/images/dotty.gif" height=1 width=30>
  791. <img border=0 src="/images/dotty.gif" height=1 width=30>
  792. <img border=0 src="/images/dotty.gif" height=1 width=30>
  793. <img border=0 src="/images/dotty.gif" height=1 width=30>
  794. <img border=0 src="/images/dotty.gif" height=1 width=30>
  795. <img border=0 src="/images/dotty.gif" height=1 width=30>
  796. <img border=0 src="/images/dotty.gif" height=1 width=30>
  797. <img border=0 src="/images/dotty.gif" height=1 width=30>
  798. <img border=0 src="/images/dotty.gif" height=1 width=30>
  799. <img border=0 src="/images/dotty.gif" height=1 width=30>
  800. <img border=0 src="/images/dotty.gif" height=1 width=30>
  801. <img border=0 src="/images/dotty.gif" height=1 width=30>
  802. <img border=0 src="/images/dotty.gif" height=1 width=30>
  803. <img border=0 src="/images/dotty.gif" height=1 width=30>
  804. <img border=0 src="/images/dotty.gif" height=1 width=30>
  805. <img border=0 src="/images/dotty.gif" height=1 width=30>
  806. <img border=0 src="/images/dotty.gif" height=1 width=30>
  807. <img border=0 src="/images/dotty.gif" height=1 width=30>
  808. <img border=0 src="/images/dotty.gif" height=1 width=30>
  809. </td></tr>
  810. </table>
  811. &nbsp;
  812. </td></tr>
  813. <tr bgcolor=#000000><td><img height=1 src="/images/dotty.gif"></td></tr>
  814. </table>
  815. <table background="/images/topbg.gif" width=100% cellpadding=0 cellspacing=0 border=0 bgcolor=#aaddff>
  816. <tr><td align=right>
  817. Copyright (c) 1999-2007 OPENCORES.ORG. All rights reserved. &nbsp;
  818. </td></tr>
  819. <tr><td>
  820. &nbsp;
  821. </td></tr>
  822. </table>
  823. </td>
  824. <td width=1 bgcolor=#000000><img width=1 src="/images/dotty.gif"></td>
  825. <td width=1 bgcolor=#f0f0c8><img width=1 src="/images/dotty.gif"></td>
  826. </tr></table>
  827. </center>
  828. <!-- pf_footer_start -->
  829.   </body>
  830. </html>
  831. <!-- pf_footer_end -->