OpenCores
URL https://opencores.org/ocsvn/amber/amber/trunk

Subversion Repositories amber

[/] [amber/] [trunk/] [hw/] [vlog/] [tb/] [global_defines.vh] - Blame information for rev 82

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 csantifort
//////////////////////////////////////////////////////////////////
2
//                                                              //
3
//  Global testbench defines                                    //
4
//                                                              //
5
//  This file is part of the Amber project                      //
6
//  http://www.opencores.org/project,amber                      //
7
//                                                              //
8
//  Description                                                 //
9
//  Contains a set of defines for each module so if the module  //
10
//  hierarchy changes, hierarchical references to signals       //
11
//  will still work as long as this file is updated.            //
12
//                                                              //
13
//  Author(s):                                                  //
14
//      - Conor Santifort, csantifort.amber@gmail.com           //
15
//                                                              //
16
//////////////////////////////////////////////////////////////////
17
//                                                              //
18
// Copyright (C) 2010 Authors and OPENCORES.ORG                 //
19
//                                                              //
20
// This source file may be used and distributed without         //
21
// restriction provided that this copyright statement is not    //
22
// removed from the file and that any derivative work contains  //
23
// the original copyright notice and the associated disclaimer. //
24
//                                                              //
25
// This source file is free software; you can redistribute it   //
26
// and/or modify it under the terms of the GNU Lesser General   //
27
// Public License as published by the Free Software Foundation; //
28
// either version 2.1 of the License, or (at your option) any   //
29
// later version.                                               //
30
//                                                              //
31
// This source is distributed in the hope that it will be       //
32
// useful, but WITHOUT ANY WARRANTY; without even the implied   //
33
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
34
// PURPOSE.  See the GNU Lesser General Public License for more //
35
// details.                                                     //
36
//                                                              //
37
// You should have received a copy of the GNU Lesser General    //
38
// Public License along with this source; if not, download it   //
39
// from http://www.opencores.org/lgpl.shtml                     //
40
//                                                              //
41
//////////////////////////////////////////////////////////////////
42
 
43
// ---------------------------------------------------------------
44
// Module hierarchy defines
45
// ---------------------------------------------------------------
46
`ifndef _GLOBAL_DEFINES
47
`define _GLOBAL_DEFINES
48
 
49 27 csantifort
`ifndef AMBER_TIMEOUT
50
    `define AMBER_TIMEOUT 0
51
`endif
52 2 csantifort
 
53
`define U_TB                    tb
54
`define U_SYSTEM                `U_TB.u_system
55
 
56
`define U_AMBER                 `U_SYSTEM.u_amber
57
`define U_FETCH                 `U_AMBER.u_fetch
58
`define U_MMU                   `U_FETCH.u_mmu
59
`define U_CACHE                 `U_FETCH.u_cache
60
`define U_COPRO15               `U_AMBER.u_coprocessor
61
`define U_EXECUTE               `U_AMBER.u_execute
62 15 csantifort
`define U_WB                    `U_AMBER.u_write_back
63 2 csantifort
`define U_REGISTER_BANK         `U_EXECUTE.u_register_bank
64
`define U_DECODE                `U_AMBER.u_decode
65
`define U_DECOMPILE             `U_DECODE.u_decompile
66
`define U_L2CACHE               `U_SYSTEM.u_l2cache
67
`define U_TEST_MODULE           `U_SYSTEM.u_test_module
68
 
69 15 csantifort
`ifdef AMBER_A25_CORE
70
    `define U_MEM               `U_AMBER.u_mem
71
    `define U_DCACHE            `U_MEM.u_dcache
72
    `define U_WISHBONE          `U_AMBER.u_wishbone
73 36 csantifort
    `define U_BOOT_MEM          `U_SYSTEM.boot_mem128.u_boot_mem
74 15 csantifort
`else
75
    `define U_WISHBONE          `U_FETCH.u_wishbone
76 36 csantifort
    `define U_BOOT_MEM          `U_SYSTEM.boot_mem32.u_boot_mem
77 15 csantifort
`endif
78 2 csantifort
// ---------------------------------------------------------------
79
 
80
`define TB_DEBUG_MESSAGE        $display("\nDEBUG in %m @ tick %8d ", `U_TB.clk_count );
81
`define TB_WARNING_MESSAGE      $display("\nWARNING in %m @ tick %8d", `U_TB.clk_count );
82
`define TB_ERROR_MESSAGE        $display("\nFATAL ERROR in %m @ tick %8d", `U_TB.clk_count ); force `U_TB.testfail = 1'd1;
83
 
84
 
85
`ifdef XILINX_FPGA
86
// Full DDR3 memory Model
87
`define U_RAM                tb.u_ddr3_model_c3.memory
88
`else
89
// Simplified Main Memory Model
90
`define U_RAM                tb.u_system.u_main_mem.ram
91
`endif
92
 
93
`endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.