module bram1 #( parameter ABITS = 8, DBITS = 8, TRANSP = 0 ) ( input clk, input [ABITS-1:0] WR_ADDR, input [DBITS-1:0] WR_DATA, input WR_EN, input [ABITS-1:0] RD_ADDR, output [DBITS-1:0] RD_DATA ); localparam [ABITS-1:0] INIT_ADDR_0 = 1234; localparam [ABITS-1:0] INIT_ADDR_1 = 4321; localparam [ABITS-1:0] INIT_ADDR_2 = 2**ABITS-1; localparam [ABITS-1:0] INIT_ADDR_3 = (2**ABITS-1) / 2; localparam [DBITS-1:0] INIT_DATA_0 = 128'h 51e152a7300e309ccb8cd06d34558f49; localparam [DBITS-1:0] INIT_DATA_1 = 128'h 07b1fe94a530ddf3027520f9d23ab43e; localparam [DBITS-1:0] INIT_DATA_2 = 128'h 3cedc6de43ef3f607af3193658d0eb0b; localparam [DBITS-1:0] INIT_DATA_3 = 128'h f6bc5514a8abf1e2810df966bcc13b46; reg [DBITS-1:0] memory [0:2**ABITS-1]; reg [ABITS-1:0] RD_ADDR_BUF; reg [DBITS-1:0] RD_DATA_BUF; initial begin memory[INIT_ADDR_0] <= INIT_DATA_0; memory[INIT_ADDR_1] <= INIT_DATA_1; memory[INIT_ADDR_2] <= INIT_DATA_2; memory[INIT_ADDR_3] <= INIT_DATA_3; end always @(posedge clk) begin if (WR_EN) memory[WR_ADDR] <= WR_DATA; RD_ADDR_BUF <= RD_ADDR; RD_DATA_BUF <= memory[RD_ADDR]; end assign RD_DATA = TRANSP ? memory[RD_ADDR_BUF] : RD_DATA_BUF; endmodule class='sub right'>
aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock_link_test.cc
blob: e7c54cc230683de2d5688b00f251cb5c9fda116d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//     * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


// Google Mock - a framework for writing C++ mock classes.
//
// This file is for verifying that various Google Mock constructs do not
// produce linker errors when instantiated in different translation units.
// Please see gmock_link_test.h for details.

#define LinkTest LinkTest1

#include "test/gmock_link_test.h"