pci_wb_tpram.v
上传用户:quan1896
上传日期:2014-05-14
资源大小:211k
文件大小:33k
- <!-- pf_header_start -->
- <html>
- <head>
- <META NAME="keywords" CONTENT="cores, VHDL, Verilog HDL, ASIC, Synthesizable,
- standard cell, IP, Intellectual Property, 32-bit RISC, UART, PCI, SDRAM,
- full custom, system on a chip, SOC, reusable, design, development, synthesis,
- designs, developers, C, Linux, eCos, open, free, open source cores, RTL code,
- system-on-a-chip, circuits, digital, GNU, GPL, core, controller, processor,
- system design, chip design, EDA, design methodology, design tools, ASICs, programmable logic,
- FPGA's, PLDs, CPLDs, verification, Synthesis, HDL, Simulation, IC design software,
- semiconductor design, integrated circuits, system designs, chip designs, EDAs,
- design methodologies, design tool, ASIC, programmable logics, FPGA, PLD, CPLD, Synthesis,
- circuit, Synopsys, system design, chip design, programmable logic, FPGA's, PLDs,
- CPLDs, verification, Simulation">
- <META NAME="description" CONTENT="OPENCORES.ORG endorses development and hosts
- a repository of free, open-source cores (chip designs) and supplemental
- platforms (boards).">
- <STYLE type=text/css>
- BODY {margin: 0;}
- BODY, P, DIV, TD, TR, TH, FORM, OL, UL, LI, B, I, INPUT, TEXTAREA, SELECT,
- FONT {font-size: 10pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- P, TD, FORM, TEXTAREA {font-size: 10pt;}
- H1, H2 {FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica; font-size: 13pt; text-decoration: none}
- .noline {text-decoration: none;}
- .menu_top {text-decoration: none; font-weight: bold;
- font-size: 7pt; color: #000000; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .menu_section {text-decoration: none; font-weight: bold;
- font-size: 10pt; color: #ffffff; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .menu_item {font-size: 10pt; color: #004488; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .menu_section_admin {text-decoration: none; font-weight: bold;
- font-size: 10pt; color: #ffff44; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .page_title {text-decoration: none; font-weight: bold; color: #c00000; font-size: 13pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .block_title {text-decoration: none; font-weight: bold; font-size: 11pt; color: #000000; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .block_subtitle {text-decoration: none; font-weight: bold; font-size: 10pt; color: #000000; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .title {text-decoration: none; font-weight: bold; font-size: 10pt; color: #000000; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .large {font-size: 13pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .medium {font-size: 10pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .small {font-size: 7pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .ultrasmall {font-size: 3pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica;}
- .button { font-family:Verdana, Tahoma, Arial, Helvetica; }
- .searchfield {font-family: verdana, arial, helvetica; font-size: 10px; color: #333333; width: 80px; height: 17px;}
- </STYLE>
- <title>OPENCORES.ORG</title>
- <script laguage="Javascript">
- function check(msg) {
- if(confirm(msg)) {
- return true
- } else {
- return false
- }
- }
- </script>
- </head>
-
- <body
- bgcolor="#e0e0e0"
- topmargin="0"
- leftmargin="0"
- marginwidth="0"
- marginheight="0"
- link="#004488"
- alink="#ff3300"
- vlink="#444444"
- >
- <a name="top">
- <!-- pf_header_end -->
- <center>
- <table cellpadding=0 cellspacing=0 border=0 width=96%><tr>
- <td width=1 bgcolor=#000000><img width=1 src="/images/dotty.gif"></td>
- <td>
- <table border=0 cellpadding=0 cellspacing=0 width=100%>
- <tr><td background="/images/topbg.gif" bgcolor=#aaddff height=70>
- <table width=100% border=0 ><tr><td width=180>
- <a href="/"><img border=0 src="/images/oc_logo.gif"></a>
- </td><td>
- <center>
- <!--
- <a title="" href="/banner.cgi"><img width=468 height=60 border=0 alt="" src=""></a>
- //-->
- <script type="text/javascript"><!--
- google_ad_client = "pub-9285819221080148";
- xgoogle_ad_width = 728;
- xgoogle_ad_height = 79;
- xgoogle_ad_format = "728x90_as";
- google_ad_width = 468;
- google_ad_height = 47;
- google_ad_format = "468x60_as";
- google_ad_type = "text_image";
- google_ad_channel ="3274390903";
- google_color_border = "aaddff";
- xgoogle_color_border = "ffee88";
- xgoogle_color_bg = "FFEE88";
- google_color_bg = "aaddFF";
- google_color_link = "004488";
- google_color_url = "b00000";
- google_color_text = "000000";
- //--></script>
- <script type="text/javascript"
- src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
- </script>
- </center>
- </td><td align=right>
- </td>
- </tr></table>
- </td></tr>
- <tr bgcolor=#000000><td><img height=1 src="/images/dotty.gif"></td></tr>
- <tr><td bgcolor=#ffffff>
- <table border=0 cellpadding=0 cellspacing=0 width=100%><tr>
- <td bgcolor=#ffee88 width=60% background="/images/menu1.gif"></td>
- <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_wb_tpram.v?rev=1.4'"></a></td>
- <td bgcolor=#ffffff align=right nowrap>
-
- <font class=menu_top size=-1>
-
- <a class=menu_top href="/login.cgi/login">LOGIN</a>
-
- :::
-
-
- <a class=menu_top href="/recover_pass.cgi/recover_pass">RECOVER PASS</a>
-
- :::
-
-
- <a class=menu_top href="/get_account.cgi/get_account">GET ACCOUNT</a>
-
-
-
- </font>
- </td></tr>
- <tr bgcolor=#ffffff>
- <td></td>
- <td></td>
- <td bgcolor=#000000><img src="/images/dotty.gif"></td>
- </tr>
- </table>
- <table border=0 cellpadding=0 cellspacing=0>
- <tr>
- <td width=10><img width=10 src="/images/dotty.gif"></td>
- <td width=120 valign=top>
-
- <table width=100% border=0 cellpadding=2 cellspacing=0>
- <tr><td><img height=2 src="/images/dotty.gif"></td></tr>
-
- <tr><td bgcolor="#347FB8">
- <img src="/images/bullet.gif">
-
- <font class=menu_section>Browse</font>
-
- </td></tr>
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/browse.cgi/by_category"><font class=menu_item>Projects</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/cvsweb.shtml/"><font class=menu_item>Code (CVS)</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/forums.cgi"><font class=menu_item>Forums</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/news.cgi/list/1"><font class=menu_item>News</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/articles.cgi/list"><font class=menu_item>Articles</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/polls.cgi/list"><font class=menu_item>Polls</font></a></li>
-
- </td></tr>
-
-
- <tr><td><font size=-2> </font></td></tr>
-
- <tr><td bgcolor="#347FB8">
- <img src="/images/bullet.gif">
-
- <font class=menu_section>OpenCores</font>
-
- </td></tr>
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/faq.cgi/index"><font class=menu_item>FAQ</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opencores/cvs_howto"><font class=menu_item>CVS HowTo</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opencores/mission"><font class=menu_item>Mission</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opencores/media"><font class=menu_item>Media</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opencores/tools"><font class=menu_item>Tools</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opencores/sponsors"><font class=menu_item>Sponsors</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opencores/mirrors"><font class=menu_item>Mirrors</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opencores/logos"><font class=menu_item>Logos</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opencores/contacts"><font class=menu_item>Contact us</font></a></li>
-
- </td></tr>
-
-
- <tr><td><font size=-2> </font></td></tr>
-
- <tr><td bgcolor="#347FB8">
- <img src="/images/bullet.gif">
-
- <font class=menu_section>Tools</font>
-
- </td></tr>
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <font class=menu_item><a href="/search.cgi">Search</a><br><table><tr><form action=/search.cgi/do_search><td><font class=small> </font></td><td><input class=searchfield type=text name=query></td></form></tr></table></font></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/cvsget.shtml"><font class=menu_item>Download Cores (CVSGet)</font></a></li>
-
- </td></tr>
-
-
- <tr><td><font size=-2> </font></td></tr>
-
- <tr><td bgcolor="#347FB8">
- <img src="/images/bullet.gif">
-
- <font class=menu_section>More</font>
-
- </td></tr>
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/wishbone/"><font class=menu_item>Wishbone</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/perlilog/"><font class=menu_item>Perlilog</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/edatools/"><font class=menu_item>EDA tools</font></a></li>
-
- </td></tr>
-
-
- <tr><td>
-
-
- <li class=small>
-
-
-
- <a class=menu_item href="/projects.cgi/web/opentech/"><font class=menu_item>OpenTech CD</font></a></li>
-
- </td></tr>
-
-
- <tr><td><font size=-2> </font></td></tr>
-
- </table>
- </td>
- <td width=10><img width=10 src="/images/dotty.gif"></td>
- <td background="/images/vpd.gif"><img width=1 src="/images/dotty.gif"></td>
- <td width=10><img width=10 src="/images/dotty.gif"></td>
- <td valign=top>
-
- <table width=100% cellpadding=2 cellspacing=0 border=0>
- <tr><td><img height=2 src="/images/dotty.gif"></td></tr>
- </table>
-
- <table width=100% cellspacing=0 cellpadding=0 border=0><tr><td>
- <!-- pf_body_start -->
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html>
- <head>
- <title>pci/rtl/verilog/pci_wb_tpram.v - view - 1.4</title>
- <meta name="robots" content="nofollow" />
- <meta name="generator" content="FreeBSD-CVSweb 3.0.5" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <link rel="stylesheet" type="text/css" href="/css/cvsweb.css" />
- </head>
- <body class="src">
- <table class="navigate-header" width="100%" summary="Navigation">
- <tr>
- <td>
- <a href="./pci_wb_tpram.v#rev1.4"><img src="/icons/back.gif" alt="[BACK]" border="0" width="20" height="22" /></a><b>Return to <a href="./pci_wb_tpram.v#rev1.4">pci_wb_tpram.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>
- </tr>
- </table>
- <hr />
- <div class="log-markup">
- File:
- <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_wb_tpram.v">pci_wb_tpram.v</a><br />
- <a name="rev1.4"></a><a name="HEAD"></a>
- Revision <b>1.4</b>: <a href="/cvsweb.cgi/~checkout~/pci/rtl/verilog/pci_wb_tpram.v?rev=1.4;content-type=text%2Fplain" class="download-link">download</a> - view: <a href="pci_wb_tpram.v?rev=1.4;content-type=text%2Fplain" class="display-link">text</a>, <a href="pci_wb_tpram.v?annotate=1.4">annotated</a> - <a href="pci_wb_tpram.v?r1=1.4#rev1.4">select for diffs</a><br />
- <i>Thu Aug 19 15:27:34 2004 UTC</i> (2 years, 8 months ago) by <i>mihad</i><br />
- Branches: <a href="./pci_wb_tpram.v?only_with_tag=MAIN">MAIN</a><br />
- CVS tags: <a href="./pci_wb_tpram.v?only_with_tag=HEAD">HEAD</a><br />
- <pre class="log">
- Changed minimum pci image size to 256 bytes because
- of some PC system problems with size of IO images.
- </pre>
- </div>
- <hr /><pre>
- //////////////////////////////////////////////////////////////////////
- //// ////
- //// Generic Two-Port Synchronous RAM ////
- //// ////
- //// This file is part of pci bridge project ////
- //// http://www.opencores.org/cvsweb.shtml/pci/ ////
- //// ////
- //// Description ////
- //// This block is a wrapper with common two-port ////
- //// synchronous memory interface for different ////
- //// types of ASIC and FPGA RAMs. Beside universal memory ////
- //// interface it also provides behavioral model of generic ////
- //// two-port synchronous RAM. ////
- //// It should be used in all OPENCORES designs that want to be ////
- //// portable accross different target technologies and ////
- //// independent of target memory. ////
- //// ////
- //// Supported ASIC RAMs are: ////
- //// - Artisan Double-Port Sync RAM ////
- //// - Avant! Two-Port Sync RAM (*) ////
- //// - Virage 2-port Sync RAM ////
- //// ////
- //// Supported FPGA RAMs are: ////
- //// - Xilinx Virtex RAMB4_S16_S16 ////
- //// ////
- //// To Do: ////
- //// - fix Avant! ////
- //// - xilinx rams need external tri-state logic ////
- //// - add additional RAMs (Altera, VS etc) ////
- //// ////
- //// Author(s): ////
- //// - Damjan Lampret, lampret@opencores.org ////
- //// - Miha Dolenc, mihad@opencores.org ////
- //// ////
- //////////////////////////////////////////////////////////////////////
- //// ////
- //// Copyright (C) 2000 Authors and OPENCORES.ORG ////
- //// ////
- //// This source file may be used and distributed without ////
- //// restriction provided that this copyright statement is not ////
- //// removed from the file and that any derivative work contains ////
- //// the original copyright notice and the associated disclaimer. ////
- //// ////
- //// This source file is free software; you can redistribute it ////
- //// and/or modify it under the terms of the GNU Lesser General ////
- //// Public License as published by the Free Software Foundation; ////
- //// either version 2.1 of the License, or (at your option) any ////
- //// later version. ////
- //// ////
- //// This source is distributed in the hope that it will be ////
- //// useful, but WITHOUT ANY WARRANTY; without even the implied ////
- //// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
- //// PURPOSE. See the GNU Lesser General Public License for more ////
- //// details. ////
- //// ////
- //// You should have received a copy of the GNU Lesser General ////
- //// Public License along with this source; if not, download it ////
- //// from http://www.opencores.org/lgpl.shtml ////
- //// ////
- //////////////////////////////////////////////////////////////////////
- //
- // CVS Revision History
- //
- // $Log: pci_wb_tpram.v,v $
- // Revision 1.4 2004/08/19 15:27:34 mihad
- // Changed minimum pci image size to 256 bytes because
- // of some PC system problems with size of IO images.
- //
- // Revision 1.3 2003/10/17 09:11:52 markom
- // mbist signals updated according to newest convention
- //
- // Revision 1.2 2003/08/14 13:06:03 simons
- // synchronizer_flop replaced with pci_synchronizer_flop, artisan ram instance updated.
- //
- // Revision 1.1 2003/01/27 16:49:31 mihad
- // Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
- //
- // Revision 1.7 2002/10/18 03:36:37 tadejm
- // Changed wrong signal name mbist_sen into mbist_ctrl_i.
- //
- // Revision 1.6 2002/10/17 22:49:22 tadejm
- // Changed BIST signals for RAMs.
- //
- // Revision 1.5 2002/10/11 10:09:01 mihad
- // Added additional testcase and changed rst name in BIST to trst
- //
- // Revision 1.4 2002/10/08 17:17:06 mihad
- // Added BIST signals for RAMs.
- //
- // Revision 1.3 2002/09/30 17:22:27 mihad
- // Added support for Virtual Silicon two port RAM. Didn't run regression on it yet!
- //
- // Revision 1.2 2002/08/19 16:51:36 mihad
- // Extracted distributed RAM module from wb/pci_tpram.v to its own file, got rid of undef directives
- //
- // Revision 1.1 2002/02/01 14:43:31 mihad
- // *** empty log message ***
- //
- //
- // synopsys translate_off
- `include "timescale.v"
- // synopsys translate_on
- `include "pci_constants.v"
- module pci_wb_tpram
- (
- // Generic synchronous two-port RAM interface
- clk_a,
- rst_a,
- ce_a,
- we_a,
- oe_a,
- addr_a,
- di_a,
- do_a,
- clk_b,
- rst_b,
- ce_b,
- we_b,
- oe_b,
- addr_b,
- di_b,
- do_b
- `ifdef PCI_BIST
- ,
- // debug chain signals
- mbist_si_i, // bist scan serial in
- mbist_so_o, // bist scan serial out
- mbist_ctrl_i // bist chain shift control
- `endif
- );
- //
- // Default address and data buses width
- //
- parameter aw = 8;
- parameter dw = 40;
- //
- // Generic synchronous two-port RAM interface
- //
- input clk_a; // Clock
- input rst_a; // Reset
- input ce_a; // Chip enable input
- input we_a; // Write enable input
- input oe_a; // Output enable input
- input [aw-1:0] addr_a; // address bus inputs
- input [dw-1:0] di_a; // input data bus
- output [dw-1:0] do_a; // output data bus
- input clk_b; // Clock
- input rst_b; // Reset
- input ce_b; // Chip enable input
- input we_b; // Write enable input
- input oe_b; // Output enable input
- input [aw-1:0] addr_b; // address bus inputs
- input [dw-1:0] di_b; // input data bus
- output [dw-1:0] do_b; // output data bus
- `ifdef PCI_BIST
- // debug chain signals
- input mbist_si_i; // bist scan serial in
- output mbist_so_o; // bist scan serial out
- input [`PCI_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i; // bist chain shift control
- `endif
- //
- // Internal wires and registers
- //
- `ifdef WB_VS_STP
- `define PCI_WB_RAM_SELECTED
- `ifdef PCI_BIST
- vs_hdtp_64x40_bist i_vs_hdtp_64x40_bist
- `else
- vs_hdtp_64x40 i_vs_hdtp_64x40
- `endif
- (
- .RCK (clk_b),
- .WCK (clk_a),
- .RADR (addr_b),
- .WADR (addr_a),
- .DI (di_a),
- .DOUT (do_b),
- .REN (1'b0),
- .WEN (!we_a)
- `ifdef PCI_BIST
- ,
- // debug chain signals
- .mbist_si_i (mbist_si_i),
- .mbist_so_o (mbist_so_o),
- .mbist_ctrl_i (mbist_ctrl_i)
- `endif
- );
-
- assign do_a = 0 ;
- `endif
- `ifdef WB_ARTISAN_SDP
- `define PCI_WB_RAM_SELECTED
- //
- // Instantiation of ASIC memory:
- //
- // Artisan Synchronous Double-Port RAM (ra2sh)
- //
- `ifdef PCI_BIST
- art_hsdp_64x40_bist /*#(dw, 1<<aw, aw) */ artisan_sdp
- (
- .QA(do_a),
- .CLKA(clk_a),
- .CENA(~ce_a),
- .WENA(~we_a),
- .AA(addr_a),
- .DA(di_a),
- .OENA(~oe_a),
- .QB(do_b),
- .CLKB(clk_b),
- .CENB(~ce_b),
- .WENB(~we_b),
- .AB(addr_b),
- .DB(di_b),
- .OENB(~oe_b),
- .mbist_si_i (mbist_si_i),
- .mbist_so_o (mbist_so_o),
- .mbist_ctrl_i (mbist_ctrl_i)
- );
- `else
- art_hsdp_64x40 /*#(dw, 1<<aw, aw) */ artisan_sdp
- (
- .QA(do_a),
- .CLKA(clk_a),
- .CENA(~ce_a),
- .WENA(~we_a),
- .AA(addr_a),
- .DA(di_a),
- .OENA(~oe_a),
- .QB(do_b),
- .CLKB(clk_b),
- .CENB(~ce_b),
- .WENB(~we_b),
- .AB(addr_b),
- .DB(di_b),
- .OENB(~oe_b)
- );
- `endif
- `endif
- `ifdef AVANT_ATP
- `define PCI_WB_RAM_SELECTED
- //
- // Instantiation of ASIC memory:
- //
- // Avant! Asynchronous Two-Port RAM
- //
- avant_atp avant_atp(
- .web(~we),
- .reb(),
- .oeb(~oe),
- .rcsb(),
- .wcsb(),
- .ra(addr),
- .wa(addr),
- .di(di),
- .do(do)
- );
- `endif
- `ifdef VIRAGE_STP
- `define PCI_WB_RAM_SELECTED
- //
- // Instantiation of ASIC memory:
- //
- // Virage Synchronous 2-port R/W RAM
- //
- virage_stp virage_stp(
- .QA(do_a),
- .QB(do_b),
- .ADRA(addr_a),
- .DA(di_a),
- .WEA(we_a),
- .OEA(oe_a),
- .MEA(ce_a),
- .CLKA(clk_a),
- .ADRB(adr_b),
- .DB(di_b),
- .WEB(we_b),
- .OEB(oe_b),
- .MEB(ce_b),
- .CLKB(clk_b)
- );
- `endif
- `ifdef WB_XILINX_DIST_RAM
- `define PCI_WB_RAM_SELECTED
- reg [(aw-1):0] out_address ;
- always@(posedge clk_b or posedge rst_b)
- begin
- if ( rst_b )
- out_address <= #1 0 ;
- else if (ce_b)
- out_address <= #1 addr_b ;
- end
- pci_ram_16x40d #(aw) wb_distributed_ram
- (
- .data_out (do_b),
- .we (we_a),
- .data_in (di_a),
- .read_address (out_address),
- .write_address (addr_a),
- .wclk (clk_a)
- );
- assign do_a = 0 ;
- `endif
- `ifdef WB_XILINX_RAMB4
- `define PCI_WB_RAM_SELECTED
- //
- // Instantiation of FPGA memory:
- //
- // Virtex/Spartan2
- //
- //
- // Block 0
- //
- RAMB4_S16_S16 ramb4_s16_s16_0(
- .CLKA(clk_a),
- .RSTA(rst_a),
- .ADDRA(addr_a),
- .DIA(di_a[15:0]),
- .ENA(ce_a),
- .WEA(we_a),
- .DOA(do_a[15:0]),
- .CLKB(clk_b),
- .RSTB(rst_b),
- .ADDRB(addr_b),
- .DIB(di_b[15:0]),
- .ENB(ce_b),
- .WEB(we_b),
- .DOB(do_b[15:0])
- );
- //
- // Block 1
- //
- RAMB4_S16_S16 ramb4_s16_s16_1(
- .CLKA(clk_a),
- .RSTA(rst_a),
- .ADDRA(addr_a),
- .DIA(di_a[31:16]),
- .ENA(ce_a),
- .WEA(we_a),
- .DOA(do_a[31:16]),
- .CLKB(clk_b),
- .RSTB(rst_b),
- .ADDRB(addr_b),
- .DIB(di_b[31:16]),
- .ENB(ce_b),
- .WEB(we_b),
- .DOB(do_b[31:16])
- );
- //
- // Block 2
- //
- // block ram2 wires - non generic width of block rams
- wire [15:0] blk2_di_a = {8'h00, di_a[39:32]} ;
- wire [15:0] blk2_di_b = {8'h00, di_b[39:32]} ;
- wire [15:0] blk2_do_a ;
- wire [15:0] blk2_do_b ;
- assign do_a[39:32] = blk2_do_a[7:0] ;
- assign do_b[39:32] = blk2_do_b[7:0] ;
- RAMB4_S16_S16 ramb4_s16_s16_2(
- .CLKA(clk_a),
- .RSTA(rst_a),
- .ADDRA(addr_a),
- .DIA(blk2_di_a),
- .ENA(ce_a),
- .WEA(we_a),
- .DOA(blk2_do_a),
- .CLKB(clk_b),
- .RSTB(rst_b),
- .ADDRB(addr_b),
- .DIB(blk2_di_b),
- .ENB(ce_b),
- .WEB(we_b),
- .DOB(blk2_do_b)
- );
- `endif
- `ifdef PCI_WB_RAM_SELECTED
- `else
- //
- // Generic two-port synchronous RAM model
- //
- //
- // Generic RAM's registers and wires
- //
- reg [dw-1:0] mem [(1<<aw)-1:0]; // RAM content
- reg [dw-1:0] do_reg_b; // RAM data output register
- //
- // Data output drivers
- //
- assign do_a = {dw{1'b0}} ;
- assign do_b = do_reg_b ;
- //
- // RAM read and write
- //
- always @(posedge clk_a)
- if (ce_a && we_a)
- mem[addr_a] <= #1 di_a;
- //
- // RAM read and write
- //
- always @(posedge clk_b)
- if (ce_b)
- do_reg_b <= #1 mem[addr_b];
- `endif
- // synopsys translate_off
- initial
- begin
- if (dw !== 40)
- begin
- $display("RAM instantiation error! Expected RAM width %d, actual %h!", 40, dw) ;
- $finish ;
- end
- `ifdef XILINX_RAMB4
- if (aw !== 8)
- begin
- $display("RAM instantiation error! Expected RAM address width %d, actual %h!", 40, aw) ;
- $finish ;
- end
- `endif
- // currenlty only artisan ram of depth 256 is supported - they don't provide generic ram models
- `ifdef ARTISAN_SDP
- if (aw !== 8)
- begin
- $display("RAM instantiation error! Expected RAM address width %d, actual %h!", 40, aw) ;
- $finish ;
- end
- `endif
- end
- // synopsys translate_on
- endmodule
- </pre>
- <hr />
- <address><span style="font-size: smaller">FreeBSD-CVSweb <<a href="mailto:freebsd-cvsweb@FreeBSD.org">freebsd-cvsweb@FreeBSD.org</a>></span></address>
- </body>
- </html>
- <!-- pf_body_end -->
- </td>
- <td><img width=15 src="/images/dotty.gif"></td>
- </tr></table>
- <xcenter>
- <p>
- <table width=100% cellpadding=0 cellspacing=0 border=0>
- <tr><td align=right valign=bottom><a title='Top' href='#top'><img border=0 alt='Top' src='/images/hr_up.gif'></a></td></tr>
- <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>
-
- <br>
- <!--
- <table border=0 cellpadding=0 cellspacing=1 bgcolor=#ffffff><tr><td>
- <table cellpadding=0 cellspacing=0 border=0 bgcolor=#ffffff><tr><td>
- //-->
- <script type="text/javascript"><!--
- google_ad_client = "pub-9285819221080148";
- google_alternate_color = "FFFFFF";
- google_ad_width = 728;
- google_ad_height = 90;
- google_ad_format = "728x90_as";
- google_ad_type = "text_image";
- google_ad_channel ="3034172958";
- google_color_border = "ffffff";
- google_color_bg = "ffffff";
- google_color_link = "444488";
- google_color_url = "b00000";
- google_color_text = "666666";
- //--></script>
- <script type="text/javascript"
- src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
- </script>
- <!--
- </td></tr></table>
- </td></tr></table>
- //-->
- </center>
- <img border=0 src="/images/dotty.gif" height=1 width=400>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- <img border=0 src="/images/dotty.gif" height=1 width=30>
- </td></tr>
- </table>
-
- </td></tr>
- <tr bgcolor=#000000><td><img height=1 src="/images/dotty.gif"></td></tr>
- </table>
- <table background="/images/topbg.gif" width=100% cellpadding=0 cellspacing=0 border=0 bgcolor=#aaddff>
- <tr><td align=right>
- Copyright (c) 1999-2007 OPENCORES.ORG. All rights reserved.
- </td></tr>
- <tr><td>
-
- </td></tr>
- </table>
- </td>
- <td width=1 bgcolor=#000000><img width=1 src="/images/dotty.gif"></td>
- <td width=1 bgcolor=#f0f0c8><img width=1 src="/images/dotty.gif"></td>
- </tr></table>
- </center>
- <!-- pf_footer_start -->
- </body>
- </html>
- <!-- pf_footer_end -->