1 |
2 |
csantifort |
//////////////////////////////////////////////////////////////////
|
2 |
|
|
// //
|
3 |
|
|
// System Configuration and Debug //
|
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 used to configure and debug //
|
10 |
|
|
// the Amber peripherals. //
|
11 |
|
|
// //
|
12 |
|
|
// Author(s): //
|
13 |
|
|
// - Conor Santifort, csantifort.amber@gmail.com //
|
14 |
|
|
// //
|
15 |
|
|
//////////////////////////////////////////////////////////////////
|
16 |
|
|
// //
|
17 |
|
|
// Copyright (C) 2010 Authors and OPENCORES.ORG //
|
18 |
|
|
// //
|
19 |
|
|
// This source file may be used and distributed without //
|
20 |
|
|
// restriction provided that this copyright statement is not //
|
21 |
|
|
// removed from the file and that any derivative work contains //
|
22 |
|
|
// the original copyright notice and the associated disclaimer. //
|
23 |
|
|
// //
|
24 |
|
|
// This source file is free software; you can redistribute it //
|
25 |
|
|
// and/or modify it under the terms of the GNU Lesser General //
|
26 |
|
|
// Public License as published by the Free Software Foundation; //
|
27 |
|
|
// either version 2.1 of the License, or (at your option) any //
|
28 |
|
|
// later version. //
|
29 |
|
|
// //
|
30 |
|
|
// This source is distributed in the hope that it will be //
|
31 |
|
|
// useful, but WITHOUT ANY WARRANTY; without even the implied //
|
32 |
|
|
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //
|
33 |
|
|
// PURPOSE. See the GNU Lesser General Public License for more //
|
34 |
|
|
// details. //
|
35 |
|
|
// //
|
36 |
|
|
// You should have received a copy of the GNU Lesser General //
|
37 |
|
|
// Public License along with this source; if not, download it //
|
38 |
|
|
// from http://www.opencores.org/lgpl.shtml //
|
39 |
|
|
// //
|
40 |
|
|
//////////////////////////////////////////////////////////////////
|
41 |
|
|
|
42 |
|
|
`ifndef _SYSTEM_CONFIG_DEFINES
|
43 |
|
|
`define _SYSTEM_CONFIG_DEFINES
|
44 |
|
|
|
45 |
15 |
csantifort |
// Select the A23 or A25 version of the core
|
46 |
|
|
// You can also select the A25 core on the command line using the run script
|
47 |
|
|
//`define AMBER_A25_CORE
|
48 |
|
|
|
49 |
|
|
|
50 |
2 |
csantifort |
// Frequency = 800 / AMBER_CLK_DIVIDER
|
51 |
15 |
csantifort |
// 20 = 40.00 MHz
|
52 |
2 |
csantifort |
// 24 = 33.33 MHz
|
53 |
|
|
// 29 = 27.58 MHz
|
54 |
|
|
// 40 = 20.00 MHz
|
55 |
|
|
//
|
56 |
|
|
// Note that for FPGA synthesis this value is overridden
|
57 |
|
|
// by a value specified in $AMBER_BASE/hw/fpga/bin/Makefile
|
58 |
43 |
csantifort |
`ifdef XILINX_VIRTEX6_FPGA
|
59 |
|
|
`define AMBER_CLK_DIVIDER 13
|
60 |
|
|
`else
|
61 |
|
|
`define AMBER_CLK_DIVIDER 20
|
62 |
|
|
`endif
|
63 |
2 |
csantifort |
|
64 |
|
|
// Specify a device, if none defined then the
|
65 |
|
|
// generic library is used which is the fastest for simulations
|
66 |
|
|
// `define XILINX_SPARTAN6_FPGA
|
67 |
|
|
// `define XILINX_VIRTEX6_FPGA
|
68 |
|
|
|
69 |
|
|
// UART Baud rate for both uarts
|
70 |
|
|
// e.g. 921600, 460800, 230400, 57600
|
71 |
15 |
csantifort |
// `define AMBER_UART_BAUD 921600
|
72 |
2 |
csantifort |
`define AMBER_UART_BAUD 921600
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
// --------------------------------------------------------------------
|
76 |
|
|
// Debug switches
|
77 |
|
|
// --------------------------------------------------------------------
|
78 |
|
|
|
79 |
40 |
csantifort |
// Add jitter to wishbone accesses
|
80 |
|
|
//`define AMBER_WISHBONE_DEBUG
|
81 |
|
|
|
82 |
2 |
csantifort |
// Print UART debug messages
|
83 |
|
|
//`define AMBER_UART_DEBUG
|
84 |
|
|
|
85 |
|
|
// Print Interrupt Controller debug messages
|
86 |
|
|
//`define AMBER_IC_DEBUG
|
87 |
|
|
|
88 |
|
|
// Debug the loading of the memory file into memory
|
89 |
|
|
//`define AMBER_LOAD_MEM_DEBUG
|
90 |
|
|
|
91 |
|
|
// Debug main memory interface
|
92 |
|
|
// `define AMBER_MEMIF_DEBUG
|
93 |
|
|
// --------------------------------------------------------------------
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
// --------------------------------------------------------------------
|
97 |
|
|
// Waveform dumping
|
98 |
|
|
// --------------------------------------------------------------------
|
99 |
|
|
|
100 |
|
|
// Normally these defines are fed in via the simulator command line
|
101 |
|
|
|
102 |
|
|
// Create a VCD Dump File
|
103 |
|
|
// `define AMBER_DUMP_VCD
|
104 |
|
|
// Measured in system clock ticks
|
105 |
|
|
//`define AMBER_DUMP_START 25348000
|
106 |
|
|
`define AMBER_DUMP_LENGTH 150000
|
107 |
|
|
|
108 |
|
|
// --------------------------------------------------------------------
|
109 |
|
|
// Xilinx FPGA ?
|
110 |
|
|
// --------------------------------------------------------------------
|
111 |
|
|
`ifdef XILINX_SPARTAN6_FPGA
|
112 |
|
|
`define XILINX_FPGA
|
113 |
|
|
`endif
|
114 |
|
|
`ifdef XILINX_VIRTEX6_FPGA
|
115 |
|
|
`define XILINX_FPGA
|
116 |
|
|
`endif
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
// --------------------------------------------------------------------
|
120 |
|
|
// File Names
|
121 |
|
|
// --------------------------------------------------------------------
|
122 |
|
|
`ifndef AMBER_TEST_NAME
|
123 |
|
|
`define AMBER_TEST_NAME "add"
|
124 |
|
|
`endif
|
125 |
|
|
`ifndef MAIN_MEM_FILE
|
126 |
|
|
`define MAIN_MEM_FILE "not-defined"
|
127 |
|
|
`endif
|
128 |
|
|
`ifndef BOOT_MEM_FILE
|
129 |
|
|
`define BOOT_MEM_FILE "../tests/add.mem"
|
130 |
|
|
`endif
|
131 |
82 |
csantifort |
`ifndef BOOT_MEM32_PARAMS_FILE
|
132 |
|
|
`define BOOT_MEM32_PARAMS_FILE "not-defined"
|
133 |
2 |
csantifort |
`endif
|
134 |
82 |
csantifort |
`ifndef BOOT_MEM128_PARAMS_FILE
|
135 |
|
|
`define BOOT_MEM128_PARAMS_FILE "not-defined"
|
136 |
|
|
`endif
|
137 |
2 |
csantifort |
`ifndef AMBER_LOG_FILE
|
138 |
17 |
csantifort |
`define AMBER_LOG_FILE "tests.log"
|
139 |
2 |
csantifort |
`endif
|
140 |
|
|
`ifndef AMBER_VCD_FILE
|
141 |
|
|
`define AMBER_VCD_FILE "sim.vcd"
|
142 |
|
|
`endif
|
143 |
|
|
|
144 |
|
|
|
145 |
|
|
`endif
|
146 |
|
|
|