OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_processor/] [new_lm32/] [config/] [lm32_config_gen.v] - Blame information for rev 48

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 48 alirezamon
`ifdef LM32_CONFIG_V
2
`else
3
`define LM32_CONFIG_V
4
 
5
//
6
// EXCEPTION VECTORS BASE ADDRESS
7
//
8
 
9
// Base address for exception vectors
10
`define CFG_EBA_RESET 32'h00000000
11
 
12
// Base address for the debug exception vectors. If the DC_RE flag is
13
// set or the at_debug signal is asserted (see CFG_ALTERNATE_EBA) this
14
// will also be used for normal exception vectors.
15
`define CFG_DEBA_RESET 32'h00000000
16
 
17
// Enable exception vector remapping by external signal
18
//`define CFG_ALTERNATE_EBA
19
 
20
 
21
//
22
// ALU OPTIONS
23
//
24
 
25
// Enable sign-extension instructions  
26
`define CFG_SIGN_EXTEND_${SIGN_EXTEND}
27
 
28
// Shifter
29
// You may either enable the piplined or the multi-cycle barrel
30
// shifter. The multi-cycle shifter will stall the pipeline until
31
// the result is available after 32 cycles.
32
// If both options are disabled, only "right shift by one bit" is
33
// available.
34
 
35
`define CFG_BARREL_SHIFT_${BARREL_SHIFT}
36
 
37
`ifdef CFG_BARREL_SHIFT_MULTI_CYCLE
38
        `define CFG_MC_BARREL_SHIFT_ENABLED
39
 
40
`else
41
        `ifdef  CFG_BARREL_SHIFT_PIPE_LINE
42
                `define CFG_PL_BARREL_SHIFT_ENABLED
43
        `endif
44
`endif
45
 
46
 
47
// Multiplier
48
// The multiplier is available either in a multi-cycle version or
49
// in a pipelined one. The multi-cycle multiplier stalls the pipe
50
// for 32 cycles. If both options are disabled, multiply operations
51
// are not supported.
52
 
53
`define CFG_MULTIPLY_${MULTIPLIER_TYPE}
54
 
55
`ifdef CFG_MULTIPLY_MULTI_CYCLE
56
        `define CFG_MC_MULTIPLY_ENABLED
57
 
58
`else
59
        `ifdef  CFG_MULTIPLY_PIPE_LINE
60
                `define CFG_PL_MULTIPLY_ENABLED
61
        `endif
62
`endif
63
 
64
 
65
 
66
 
67
 
68
// Enable the multi-cycle divider. Stalls the pipe until the result
69
// is ready after 32 cycles. If disabled, the divide operation is not
70
// supported.
71
 
72
`define CFG_DIVIDE_${DIVIDOR_TYPE}
73
 
74
`ifdef CFG_DIVIDE_MULTI_CYCLE
75
        `define CFG_MC_DIVIDE_ENABLED
76
`endif
77
 
78
 
79
//
80
// INTERRUPTS
81
//
82
 
83
// Enable support for 32 hardware interrupts
84
`define CFG_INTERRUPTS_ENABLED
85
 
86
// Enable level-sensitive interrupts. The interrupt line status is
87
// reflected in the IP register, which is then read-only.
88
//`define CFG_LEVEL_SENSITIVE_INTERRUPTS
89
 
90
 
91
//
92
// USER INSTRUCTION
93
//
94
 
95
// Enable support for the user opcode.
96
//`define CFG_USER_ENABLED
97
 
98
 
99
//
100
// MEMORY MANAGEMENT UNIT
101
//
102
 
103
// Enable instruction and data translation lookaside buffers and
104
// restricted user mode.
105
//`define CFG_MMU_ENABLED
106
 
107
 
108
//
109
// CACHE
110
//
111
 
112
// Instruction cache
113
`define CFG_ICACHE_${INSTRUCTION_CACHE}
114
`define CFG_ICACHE_ASSOCIATIVITY   ${ICACHE_ASSOCIATIVITY}
115
`define CFG_ICACHE_SETS            ${ICACHE_SETS}
116
`define CFG_ICACHE_BYTES_PER_LINE  16
117
`define CFG_ICACHE_BASE_ADDRESS    32'h00000000
118
`define CFG_ICACHE_LIMIT           32'h7fffffff
119
 
120
// Data cache
121
`define CFG_DCACHE_${DATA_CACHE}
122
`define CFG_DCACHE_ASSOCIATIVITY   ${DCACHE_ASSOCIATIVITY}
123
`define CFG_DCACHE_SETS            ${DCACHE_SETS}
124
`define CFG_DCACHE_BYTES_PER_LINE  16
125
`define CFG_DCACHE_BASE_ADDRESS    32'h00000000
126
`define CFG_DCACHE_LIMIT           32'h7fffffff
127
 
128
 
129
//
130
// DEBUG OPTION
131
//
132
 
133
// Globally enable debugging
134
//`define CFG_DEBUG_ENABLED
135
 
136
// Enable the hardware JTAG debugging interface.
137
// Note: to use this, there must be a special JTAG module for your
138
//       device. At the moment, there is only support for the
139
//       Spartan-6.
140
//`define CFG_JTAG_ENABLED
141
 
142
// JTAG UART is a communication chanel which uses JTAG to transmit
143
// and receive bytes to and from the host computer.
144
//`define CFG_JTAG_UART_ENABLED
145
 
146
// Enable reading and writing to the memory and writing CSRs using
147
// the JTAG interface.
148
//`define CFG_HW_DEBUG_ENABLED
149
 
150
// Number of hardware watchpoints, max. 4
151
//`define CFG_WATCHPOINTS 32'h4
152
 
153
// Enable hardware breakpoints
154
//`define CFG_ROM_DEBUG_ENABLED
155
 
156
// Number of hardware breakpoints, max. 4
157
//`define CFG_BREAKPOINTS 32'h4
158
 
159
// Put the processor into debug mode by an external signal. That is,
160
// raise a breakpoint exception. This is useful if you have a debug
161
// monitor and a serial line and you want to trap into the monitor on a
162
// BREAK symbol on the serial line.
163
//`define CFG_EXTERNAL_BREAK_ENABLED
164
 
165
 
166
//
167
// REGISTER FILE
168
//
169
 
170
// The following option explicitly infers block RAM for the register
171
// file. There is extra logic to avoid parallel writes and reads.
172
// Normally, if your synthesizer is smart enough, this should not be
173
// necessary because it will automatically infer block RAM for you.
174
//`define CFG_EBR_POSEDGE_REGISTER_FILE
175
 
176
// Explicitly infers block RAM, too. But it uses two different clocks,
177
// one being shifted by 180deg, for the read and write port. Therefore,
178
// no additional logic to avoid the parallel write/reads.
179
//`define CFG_EBR_NEGEDGE_REGISTER_FILE
180
 
181
 
182
//
183
// MISCELLANEOUS
184
//
185
 
186
// Exceptions on wishbone bus errors
187
//`define CFG_BUS_ERRORS_ENABLED
188
 
189
// Enable the cycle counter
190
`define CFG_CYCLE_COUNTER_ENABLED
191
 
192
// Embedded instruction ROM using on-chip block RAM
193
//`define CFG_IROM_ENABLED
194
//`define CFG_IROM_INIT_FILE     "NONE"
195
//`define CFG_IROM_BASE_ADDRESS  32'h10000000
196
//`define CFG_IROM_LIMIT         32'h10000fff
197
 
198
// Embedded data RAM using on-chip block RAM
199
//`define CFG_DRAM_ENABLED
200
//`define CFG_DRAM_INIT_FILE     "NONE"
201
//`define CFG_DRAM_BASE_ADDRESS  32'h20000000
202
//`define CFG_DRAM_LIMIT         32'h20000fff
203
 
204
// Trace unit
205
//`define CFG_TRACE_ENABLED
206
 
207
// Resolve unconditional branches already in the X stage (UNTESTED!)
208
//`define CFG_FAST_UNCONDITIONAL_BRANCH
209
 
210
// log2 function
211
// If your simulator/synthesizer does not support the $clog2 system
212
// function you can use a constant function instead.
213
 
214
//function integer clog2;
215
//  input integer value;
216
//  begin
217
//    value = value - 1;
218
//    for (clog2 = 0; value > 0; clog2 = clog2 + 1)
219
//      value = value >> 1;
220
//  end
221
//endfunction
222
//
223
//`define CLOG2 clog2
224
 
225
`define CLOG2 $clog2
226
 
227
`endif

powered by: WebSVN 2.1.0

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