1 |
412 |
julius |
//////////////////////////////////////////////////////////////////////
|
2 |
|
|
//// ////
|
3 |
|
|
//// orpsoc-params ////
|
4 |
|
|
//// ////
|
5 |
|
|
//// Top level ORPSoC parameters file ////
|
6 |
|
|
//// ////
|
7 |
|
|
//// Included in toplevel and testbench ////
|
8 |
|
|
//// ////
|
9 |
|
|
//////////////////////////////////////////////////////////////////////
|
10 |
|
|
//// ////
|
11 |
|
|
//// Copyright (C) 2009, 2010 Authors and OPENCORES.ORG ////
|
12 |
|
|
//// ////
|
13 |
|
|
//// This source file may be used and distributed without ////
|
14 |
|
|
//// restriction provided that this copyright statement is not ////
|
15 |
|
|
//// removed from the file and that any derivative work contains ////
|
16 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
17 |
|
|
//// ////
|
18 |
|
|
//// This source file is free software; you can redistribute it ////
|
19 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
20 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
21 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
22 |
|
|
//// later version. ////
|
23 |
|
|
//// ////
|
24 |
|
|
//// This source is distributed in the hope that it will be ////
|
25 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
26 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
27 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
28 |
|
|
//// details. ////
|
29 |
|
|
//// ////
|
30 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
31 |
|
|
//// Public License along with this source; if not, download it ////
|
32 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
33 |
|
|
//// ////
|
34 |
|
|
//////////////////////////////////////////////////////////////////////
|
35 |
|
|
|
36 |
|
|
///////////////////////////
|
37 |
|
|
// //
|
38 |
|
|
// Peripheral parameters //
|
39 |
|
|
// //
|
40 |
|
|
///////////////////////////
|
41 |
|
|
|
42 |
|
|
// SPI 0 params
|
43 |
|
|
parameter spi0_ss_width = 1;
|
44 |
|
|
parameter spi0_wb_adr = 8'hb0;
|
45 |
|
|
parameter wbs_d_spi0_data_width = 8;
|
46 |
|
|
parameter spi0_wb_adr_width = 3;
|
47 |
|
|
|
48 |
|
|
// i2c master slave params
|
49 |
|
|
// Slave addresses
|
50 |
|
|
parameter HV0_SADR = 8'h44;
|
51 |
|
|
parameter HV1_SADR = 8'h45;
|
52 |
|
|
parameter HV2_SADR = 8'h46;
|
53 |
|
|
parameter HV3_SADR = 8'h47;
|
54 |
|
|
|
55 |
|
|
// i2c 0 params
|
56 |
|
|
parameter i2c_0_wb_adr = 8'ha0;
|
57 |
|
|
parameter i2c_0_wb_adr_width = 3;
|
58 |
|
|
parameter wbs_d_i2c0_data_width = 8;
|
59 |
|
|
|
60 |
|
|
// i2c 1 params
|
61 |
|
|
parameter i2c_1_wb_adr = 8'ha1;
|
62 |
|
|
parameter i2c_1_wb_adr_width = 3;
|
63 |
|
|
parameter wbs_d_i2c1_data_width = 8;
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
// GPIO 0 params
|
67 |
|
|
parameter wbs_d_gpio0_data_width = 8;
|
68 |
|
|
parameter gpio0_wb_adr_width = 3;
|
69 |
|
|
parameter gpio0_io_width = 24;
|
70 |
|
|
parameter gpio0_wb_adr = 8'h91;
|
71 |
|
|
parameter gpio0_dir_reset_val = 0;
|
72 |
|
|
parameter gpio0_o_reset_val = 0;
|
73 |
|
|
|
74 |
|
|
// UART 0 params
|
75 |
|
|
parameter wbs_d_uart0_data_width = 8;
|
76 |
|
|
parameter uart0_wb_adr = 8'h90;
|
77 |
|
|
parameter uart0_data_width = 8;
|
78 |
|
|
parameter uart0_addr_width = 3;
|
79 |
|
|
|
80 |
|
|
// ROM
|
81 |
|
|
parameter wbs_i_rom0_data_width = 32;
|
82 |
|
|
parameter wbs_i_rom0_addr_width = 6;
|
83 |
655 |
julius |
parameter rom0_wb_adr = 4'he;
|
84 |
412 |
julius |
|
85 |
655 |
julius |
// CFI flash
|
86 |
|
|
parameter wbs_i_flash_data_width = 32;
|
87 |
|
|
parameter wbs_i_flash_addr_width = 32;
|
88 |
|
|
parameter wbs_d_flash_data_width = 32;
|
89 |
|
|
parameter wbs_d_flash_addr_width = 32;
|
90 |
|
|
parameter flash_wb_adr = 4'hf;
|
91 |
|
|
|
92 |
412 |
julius |
// MC0 (SDRAM, or other)
|
93 |
|
|
parameter wbs_i_mc0_data_width = 32;
|
94 |
|
|
parameter wbs_d_mc0_data_width = 32;
|
95 |
|
|
|
96 |
|
|
// ETH0 defines
|
97 |
|
|
parameter eth0_wb_adr = 8'h92;
|
98 |
|
|
parameter wbs_d_eth0_data_width = 32;
|
99 |
|
|
parameter wbs_d_eth0_addr_width = 12;
|
100 |
|
|
parameter wbm_eth0_data_width = 32;
|
101 |
|
|
parameter wbm_eth0_addr_width = 32;
|
102 |
|
|
|
103 |
|
|
// Memory sizing for synthesis (small)
|
104 |
655 |
julius |
//parameter internal_sram_mem_span = 32'h0200_0000; /* 32MB */
|
105 |
|
|
//parameter internal_sram_adr_width_for_span = 25;
|
106 |
|
|
//parameter internal_sram_mem_span = 32'h0080_0000; /* 8MB */
|
107 |
|
|
//parameter internal_sram_adr_width_for_span = 23;
|
108 |
|
|
parameter internal_sram_mem_span = 32'h0001_0000; /* 64KB */
|
109 |
|
|
parameter internal_sram_adr_width_for_span = 17;
|
110 |
412 |
julius |
|
111 |
655 |
julius |
|
112 |
412 |
julius |
//////////////////////////////////////////////////////
|
113 |
|
|
// //
|
114 |
|
|
// Wishbone bus parameters //
|
115 |
|
|
// //
|
116 |
|
|
//////////////////////////////////////////////////////
|
117 |
|
|
|
118 |
|
|
////////////////////////
|
119 |
|
|
// //
|
120 |
|
|
// Arbiter parameters //
|
121 |
|
|
// //
|
122 |
|
|
////////////////////////
|
123 |
|
|
|
124 |
|
|
parameter wb_dw = 32; // Default Wishbone full word width
|
125 |
|
|
parameter wb_aw = 32; // Default Wishbone full address width
|
126 |
|
|
|
127 |
|
|
///////////////////////////
|
128 |
|
|
// //
|
129 |
|
|
// Instruction bus //
|
130 |
|
|
// //
|
131 |
|
|
///////////////////////////
|
132 |
|
|
parameter ibus_arb_addr_match_width = 4;
|
133 |
|
|
// Slave addresses
|
134 |
655 |
julius |
parameter ibus_arb_slave0_adr = rom0_wb_adr; // ROM
|
135 |
412 |
julius |
parameter ibus_arb_slave1_adr = 4'h0; // Main memory (SDRAM/FPGA SRAM)
|
136 |
655 |
julius |
parameter ibus_arb_slave2_adr = flash_wb_adr; // Flash
|
137 |
412 |
julius |
|
138 |
|
|
///////////////////////////
|
139 |
|
|
// //
|
140 |
|
|
// Data bus //
|
141 |
|
|
// //
|
142 |
|
|
///////////////////////////
|
143 |
|
|
// Has auto foward to last slave when no address hits
|
144 |
|
|
parameter dbus_arb_wb_addr_match_width = 8;
|
145 |
|
|
parameter dbus_arb_wb_num_slaves = 5;
|
146 |
|
|
// Slave addresses
|
147 |
|
|
parameter dbus_arb_slave0_adr = 4'h0; // Main memory (SDRAM/FPGA SRAM)
|
148 |
|
|
parameter dbus_arb_slave1_adr = eth0_wb_adr; // Ethernet 0
|
149 |
655 |
julius |
parameter dbus_arb_slave2_adr = flash_wb_adr; // Flash
|
150 |
412 |
julius |
|
151 |
|
|
///////////////////////////////
|
152 |
|
|
// //
|
153 |
|
|
// Byte-wide peripheral bus //
|
154 |
|
|
// //
|
155 |
|
|
///////////////////////////////
|
156 |
|
|
parameter bbus_arb_wb_addr_match_width = 8;
|
157 |
|
|
parameter bbus_arb_wb_num_slaves = 5; // Update this when changing slaves!
|
158 |
|
|
// Slave addresses
|
159 |
|
|
parameter bbus_arb_slave0_adr = uart0_wb_adr;
|
160 |
|
|
parameter bbus_arb_slave1_adr = gpio0_wb_adr;
|
161 |
|
|
parameter bbus_arb_slave2_adr = i2c_0_wb_adr;
|
162 |
|
|
parameter bbus_arb_slave3_adr = i2c_1_wb_adr;
|
163 |
|
|
parameter bbus_arb_slave4_adr = spi0_wb_adr;
|
164 |
|
|
parameter bbus_arb_slave5_adr = 0 /* UNASSIGNED */;
|
165 |
|
|
parameter bbus_arb_slave6_adr = 0 /* UNASSIGNED */;
|
166 |
|
|
parameter bbus_arb_slave7_adr = 0 /* UNASSIGNED */;
|
167 |
|
|
parameter bbus_arb_slave8_adr = 0 /* UNASSIGNED */;
|
168 |
|
|
parameter bbus_arb_slave9_adr = 0 /* UNASSIGNED */;
|
169 |
|
|
parameter bbus_arb_slave10_adr = 0 /* UNASSIGNED */;
|
170 |
|
|
parameter bbus_arb_slave11_adr = 0 /* UNASSIGNED */;
|
171 |
|
|
parameter bbus_arb_slave12_adr = 0 /* UNASSIGNED */;
|
172 |
|
|
parameter bbus_arb_slave13_adr = 0 /* UNASSIGNED */;
|
173 |
|
|
parameter bbus_arb_slave14_adr = 0 /* UNASSIGNED */;
|
174 |
|
|
parameter bbus_arb_slave15_adr = 0 /* UNASSIGNED */;
|
175 |
|
|
parameter bbus_arb_slave16_adr = 0 /* UNASSIGNED */;
|
176 |
|
|
|
177 |
|
|
|
178 |
|
|
|
179 |
|
|
|