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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [rtl/] [verilog/] [openMSP430_undefines.v] - Blame information for rev 117

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 33 olivier.gi
//----------------------------------------------------------------------------
2 117 olivier.gi
// Copyright (C) 2009 , Olivier Girard
3 33 olivier.gi
//
4 117 olivier.gi
// Redistribution and use in source and binary forms, with or without
5
// modification, are permitted provided that the following conditions
6
// are met:
7
//     * Redistributions of source code must retain the above copyright
8
//       notice, this list of conditions and the following disclaimer.
9
//     * Redistributions in binary form must reproduce the above copyright
10
//       notice, this list of conditions and the following disclaimer in the
11
//       documentation and/or other materials provided with the distribution.
12
//     * Neither the name of the authors nor the names of its contributors
13
//       may be used to endorse or promote products derived from this software
14
//       without specific prior written permission.
15 33 olivier.gi
//
16 117 olivier.gi
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
21
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26
// THE POSSIBILITY OF SUCH DAMAGE
27 33 olivier.gi
//
28
//----------------------------------------------------------------------------
29
// 
30
// *File Name: openMSP430_undefines.v
31
// 
32
// *Module Description:
33
//                      openMSP430 Verilog `undef file
34
//
35
// *Author(s):
36
//              - Olivier Girard,    olgirard@gmail.com
37
//
38
//----------------------------------------------------------------------------
39
// $Rev: 23 $
40
// $LastChangedBy: olivier.girard $
41
// $LastChangedDate: 2009-08-30 18:39:26 +0200 (Sun, 30 Aug 2009) $
42
//----------------------------------------------------------------------------
43
 
44
//----------------------------------------------------------------------------
45 111 olivier.gi
// BASIC SYSTEM CONFIGURATION
46 33 olivier.gi
//----------------------------------------------------------------------------
47
 
48 111 olivier.gi
// Program Memory sizes
49 72 olivier.gi
`ifdef PMEM_SIZE_59_KB
50
`undef PMEM_SIZE_59_KB
51
`endif
52
`ifdef PMEM_SIZE_55_KB
53
`undef PMEM_SIZE_55_KB
54
`endif
55
`ifdef PMEM_SIZE_54_KB
56
`undef PMEM_SIZE_54_KB
57
`endif
58
`ifdef PMEM_SIZE_51_KB
59
`undef PMEM_SIZE_51_KB
60
`endif
61
`ifdef PMEM_SIZE_48_KB
62
`undef PMEM_SIZE_48_KB
63
`endif
64
`ifdef PMEM_SIZE_41_KB
65
`undef PMEM_SIZE_41_KB
66
`endif
67
`ifdef PMEM_SIZE_32_KB
68
`undef PMEM_SIZE_32_KB
69
`endif
70
`ifdef PMEM_SIZE_24_KB
71
`undef PMEM_SIZE_24_KB
72
`endif
73
`ifdef PMEM_SIZE_16_KB
74
`undef PMEM_SIZE_16_KB
75
`endif
76
`ifdef PMEM_SIZE_12_KB
77
`undef PMEM_SIZE_12_KB
78
`endif
79
`ifdef PMEM_SIZE_8_KB
80
`undef PMEM_SIZE_8_KB
81
`endif
82
`ifdef PMEM_SIZE_4_KB
83
`undef PMEM_SIZE_4_KB
84
`endif
85
`ifdef PMEM_SIZE_2_KB
86
`undef PMEM_SIZE_2_KB
87
`endif
88
`ifdef PMEM_SIZE_1_KB
89
`undef PMEM_SIZE_1_KB
90
`endif
91 111 olivier.gi
 
92
// Data Memory sizes
93 72 olivier.gi
`ifdef DMEM_SIZE_32_KB
94
`undef DMEM_SIZE_32_KB
95
`endif
96
`ifdef DMEM_SIZE_24_KB
97
`undef DMEM_SIZE_24_KB
98
`endif
99
`ifdef DMEM_SIZE_16_KB
100
`undef DMEM_SIZE_16_KB
101
`endif
102
`ifdef DMEM_SIZE_10_KB
103
`undef DMEM_SIZE_10_KB
104
`endif
105
`ifdef DMEM_SIZE_8_KB
106
`undef DMEM_SIZE_8_KB
107
`endif
108
`ifdef DMEM_SIZE_5_KB
109
`undef DMEM_SIZE_5_KB
110
`endif
111
`ifdef DMEM_SIZE_4_KB
112
`undef DMEM_SIZE_4_KB
113
`endif
114
`ifdef DMEM_SIZE_2p5_KB
115
`undef DMEM_SIZE_2p5_KB
116
`endif
117
`ifdef DMEM_SIZE_2_KB
118
`undef DMEM_SIZE_2_KB
119
`endif
120
`ifdef DMEM_SIZE_1_KB
121
`undef DMEM_SIZE_1_KB
122
`endif
123
`ifdef DMEM_SIZE_512_B
124
`undef DMEM_SIZE_512_B
125
`endif
126
`ifdef DMEM_SIZE_256_B
127
`undef DMEM_SIZE_256_B
128
`endif
129
`ifdef DMEM_SIZE_128_B
130
`undef DMEM_SIZE_128_B
131
`endif
132 111 olivier.gi
 
133
// Include/Exclude Hardware Multiplier
134
`ifdef MULTIPLIER
135
`undef MULTIPLIER
136 33 olivier.gi
`endif
137 111 olivier.gi
 
138
// Include Debug interface
139
`ifdef DBG_EN
140
`undef DBG_EN
141
`endif
142
 
143
 
144
//----------------------------------------------------------------------------
145
// ADVANCED SYSTEM CONFIGURATION (FOR EXPERIENCED USERS)
146
//----------------------------------------------------------------------------
147
 
148
// Peripheral Memory Space:
149
`ifdef PER_SIZE_32_KB
150
`undef PER_SIZE_32_KB
151
`endif
152
`ifdef PER_SIZE_16_KB
153
`undef PER_SIZE_16_KB
154
`endif
155
`ifdef PER_SIZE_8_KB
156
`undef PER_SIZE_8_KB
157
`endif
158
`ifdef PER_SIZE_4_KB
159
`undef PER_SIZE_4_KB
160
`endif
161
`ifdef PER_SIZE_2_KB
162
`undef PER_SIZE_2_KB
163
`endif
164
`ifdef PER_SIZE_1_KB
165
`undef PER_SIZE_1_KB
166
`endif
167
`ifdef PER_SIZE_512_B
168
`undef PER_SIZE_512_B
169
`endif
170
 
171
// Let the CPU break after a PUC occurrence by default
172
`ifdef DBG_RST_BRK_EN
173
`undef DBG_RST_BRK_EN
174
`endif
175
 
176
// Custom user version number
177
`ifdef USER_VERSION
178
`undef USER_VERSION
179
`endif
180
 
181
 
182
//----------------------------------------------------------------------------
183
// EXPERT SYSTEM CONFIGURATION ( !!!! EXPERTS ONLY !!!! )
184
//----------------------------------------------------------------------------
185
 
186
// Number of hardware breakpoint units
187
`ifdef DBG_HWBRK_0
188
`undef DBG_HWBRK_0
189
`endif
190
`ifdef DBG_HWBRK_1
191
`undef DBG_HWBRK_1
192
`endif
193
`ifdef DBG_HWBRK_2
194
`undef DBG_HWBRK_2
195
`endif
196
`ifdef DBG_HWBRK_3
197
`undef DBG_HWBRK_3
198
`endif
199
 
200
// Enable/Disable the hardware breakpoint RANGE mode
201
`ifdef DBG_HWBRK_RANGE
202
`undef DBG_HWBRK_RANGE
203
`endif
204
 
205
// Input synchronizers
206
`ifdef SYNC_CPU_EN
207
`undef SYNC_CPU_EN
208
`endif
209
`ifdef SYNC_DBG_EN
210
`undef SYNC_DBG_EN
211
`endif
212
`ifdef SYNC_DBG_UART_RXD
213
`undef SYNC_DBG_UART_RXD
214
`endif
215
`ifdef SYNC_NMI
216
`undef SYNC_NMI
217
`endif
218
 
219
 
220
//==========================================================================//
221
//==========================================================================//
222
//==========================================================================//
223
//==========================================================================//
224
//=====        SYSTEM CONSTANTS --- !!!!!!!! DO NOT EDIT !!!!!!!!      =====//
225
//==========================================================================//
226
//==========================================================================//
227
//==========================================================================//
228
//==========================================================================//
229
 
230
// Program Memory Size
231 72 olivier.gi
`ifdef PMEM_AWIDTH
232
`undef PMEM_AWIDTH
233
`endif
234 111 olivier.gi
`ifdef PMEM_SIZE
235
`undef PMEM_SIZE
236 33 olivier.gi
`endif
237 111 olivier.gi
 
238
// Data Memory Size
239 72 olivier.gi
`ifdef DMEM_AWIDTH
240
`undef DMEM_AWIDTH
241
`endif
242 111 olivier.gi
`ifdef DMEM_SIZE
243
`undef DMEM_SIZE
244
`endif
245 33 olivier.gi
 
246 111 olivier.gi
// Peripheral Memory Size
247
`ifdef PER_AWIDTH
248
`undef PER_AWIDTH
249
`endif
250
`ifdef PER_SIZE
251
`undef PER_SIZE
252
`endif
253
 
254 33 olivier.gi
// Data Memory Base Adresses
255
`ifdef DMEM_BASE
256
`undef DMEM_BASE
257
`endif
258
 
259
// Program & Data Memory most significant address bit (for 16 bit words)
260
`ifdef PMEM_MSB
261
`undef PMEM_MSB
262
`endif
263
`ifdef DMEM_MSB
264
`undef DMEM_MSB
265
`endif
266 111 olivier.gi
`ifdef PER_MSB
267
`undef PER_MSB
268
`endif
269 33 olivier.gi
 
270
// Instructions type
271
`ifdef INST_SO
272
`undef INST_SO
273
`endif
274
`ifdef INST_JMP
275
`undef INST_JMP
276
`endif
277
`ifdef INST_TO
278
`undef INST_TO
279
`endif
280
 
281
// Single-operand arithmetic
282
`ifdef RRC
283
`undef RRC
284
`endif
285
`ifdef SWPB
286
`undef SWPB
287
`endif
288
`ifdef RRA
289
`undef RRA
290
`endif
291
`ifdef SXT
292
`undef SXT
293
`endif
294
`ifdef PUSH
295
`undef PUSH
296
`endif
297
`ifdef CALL
298
`undef CALL
299
`endif
300
`ifdef RETI
301
`undef RETI
302
`endif
303
`ifdef IRQ
304
`undef IRQ
305
`endif
306
 
307
// Conditional jump
308
`ifdef JNE
309
`undef JNE
310
`endif
311
`ifdef JEQ
312
`undef JEQ
313
`endif
314
`ifdef JNC
315
`undef JNC
316
`endif
317
`ifdef JC
318
`undef JC
319
`endif
320
`ifdef JN
321
`undef JN
322
`endif
323
`ifdef JGE
324
`undef JGE
325
`endif
326
`ifdef JL
327
`undef JL
328
`endif
329
`ifdef JMP
330
`undef JMP
331
`endif
332
 
333
// Two-operand arithmetic
334
`ifdef MOV
335
`undef MOV
336
`endif
337
`ifdef ADD
338
`undef ADD
339
`endif
340
`ifdef ADDC
341
`undef ADDC
342
`endif
343
`ifdef SUBC
344
`undef SUBC
345
`endif
346
`ifdef SUB
347
`undef SUB
348
`endif
349
`ifdef CMP
350
`undef CMP
351
`endif
352
`ifdef DADD
353
`undef DADD
354
`endif
355
`ifdef BIT
356
`undef BIT
357
`endif
358
`ifdef BIC
359
`undef BIC
360
`endif
361
`ifdef BIS
362
`undef BIS
363
`endif
364
`ifdef XOR
365
`undef XOR
366
`endif
367
`ifdef AND
368
`undef AND
369
`endif
370
 
371
// Addressing modes
372
`ifdef DIR
373
`undef DIR
374
`endif
375
`ifdef IDX
376
`undef IDX
377
`endif
378
`ifdef INDIR
379
`undef INDIR
380
`endif
381
`ifdef INDIR_I
382
`undef INDIR_I
383
`endif
384
`ifdef SYMB
385
`undef SYMB
386
`endif
387
`ifdef IMM
388
`undef IMM
389
`endif
390
`ifdef ABS
391
`undef ABS
392
`endif
393
`ifdef CONST
394
`undef CONST
395
`endif
396
 
397 111 olivier.gi
// Instruction state machine
398
`ifdef I_IRQ_FETCH
399
`undef I_IRQ_FETCH
400
`endif
401
`ifdef I_IRQ_DONE
402
`undef I_IRQ_DONE
403
`endif
404
`ifdef I_DEC
405
`undef I_DEC
406
`endif
407
`ifdef I_EXT1
408
`undef I_EXT1
409
`endif
410
`ifdef I_EXT2
411
`undef I_EXT2
412
`endif
413
`ifdef I_IDLE
414
`undef I_IDLE
415
`endif
416
 
417 33 olivier.gi
// Execution state machine
418
`ifdef E_IRQ_0
419
`undef E_IRQ_0
420
`endif
421
`ifdef E_IRQ_1
422
`undef E_IRQ_1
423
`endif
424
`ifdef E_IRQ_2
425
`undef E_IRQ_2
426
`endif
427
`ifdef E_IRQ_3
428
`undef E_IRQ_3
429
`endif
430
`ifdef E_IRQ_4
431
`undef E_IRQ_4
432
`endif
433
`ifdef E_SRC_AD
434
`undef E_SRC_AD
435
`endif
436
`ifdef E_SRC_RD
437
`undef E_SRC_RD
438
`endif
439
`ifdef E_SRC_WR
440
`undef E_SRC_WR
441
`endif
442
`ifdef E_DST_AD
443
`undef E_DST_AD
444
`endif
445
`ifdef E_DST_RD
446
`undef E_DST_RD
447
`endif
448
`ifdef E_DST_WR
449
`undef E_DST_WR
450
`endif
451
`ifdef E_EXEC
452
`undef E_EXEC
453
`endif
454
`ifdef E_JUMP
455
`undef E_JUMP
456
`endif
457
`ifdef E_IDLE
458
`undef E_IDLE
459
`endif
460
 
461
// ALU control signals
462
`ifdef ALU_SRC_INV
463
`undef ALU_SRC_INV
464
`endif
465
`ifdef ALU_INC
466
`undef ALU_INC
467
`endif
468
`ifdef ALU_INC_C
469
`undef ALU_INC_C
470
`endif
471
`ifdef ALU_ADD
472
`undef ALU_ADD
473
`endif
474
`ifdef ALU_AND
475
`undef ALU_AND
476
`endif
477
`ifdef ALU_OR
478
`undef ALU_OR
479
`endif
480
`ifdef ALU_XOR
481
`undef ALU_XOR
482
`endif
483
`ifdef ALU_DADD
484
`undef ALU_DADD
485
`endif
486
`ifdef ALU_STAT_7
487
`undef ALU_STAT_7
488
`endif
489
`ifdef ALU_STAT_F
490
`undef ALU_STAT_F
491
`endif
492
`ifdef ALU_SHIFT
493
`undef ALU_SHIFT
494
`endif
495
`ifdef EXEC_NO_WR
496
`undef EXEC_NO_WR
497
`endif
498
 
499
// Debug interface
500
`ifdef DBG_UART_WR
501
`undef DBG_UART_WR
502
`endif
503
`ifdef DBG_UART_BW
504
`undef DBG_UART_BW
505
`endif
506
`ifdef DBG_UART_ADDR
507
`undef DBG_UART_ADDR
508
`endif
509
 
510
// Debug interface CPU_CTL register
511
`ifdef HALT
512
`undef HALT
513
`endif
514
`ifdef RUN
515
`undef RUN
516
`endif
517
`ifdef ISTEP
518
`undef ISTEP
519
`endif
520
`ifdef SW_BRK_EN
521
`undef SW_BRK_EN
522
`endif
523
`ifdef FRZ_BRK_EN
524
`undef FRZ_BRK_EN
525
`endif
526
`ifdef RST_BRK_EN
527
`undef RST_BRK_EN
528
`endif
529
`ifdef CPU_RST
530
`undef CPU_RST
531
`endif
532
 
533
// Debug interface CPU_STAT register
534
`ifdef HALT_RUN
535
`undef HALT_RUN
536
`endif
537
`ifdef PUC_PND
538
`undef PUC_PND
539
`endif
540
`ifdef SWBRK_PND
541
`undef SWBRK_PND
542
`endif
543
`ifdef HWBRK0_PND
544
`undef HWBRK0_PND
545
`endif
546
`ifdef HWBRK1_PND
547
`undef HWBRK1_PND
548
`endif
549
 
550
// Debug interface BRKx_CTL register
551
`ifdef BRK_MODE_RD
552
`undef BRK_MODE_RD
553
`endif
554
`ifdef BRK_MODE_WR
555
`undef BRK_MODE_WR
556
`endif
557
`ifdef BRK_MODE
558
`undef BRK_MODE
559
`endif
560
`ifdef BRK_EN
561
`undef BRK_EN
562
`endif
563
`ifdef BRK_I_EN
564
`undef BRK_I_EN
565
`endif
566
`ifdef BRK_RANGE
567
`undef BRK_RANGE
568
`endif
569
 
570
// Basic clock module: BCSCTL1 Control Register
571
`ifdef DIVAx
572
`undef DIVAx
573
`endif
574
 
575
// Basic clock module: BCSCTL2 Control Register
576
`ifdef SELS
577
`undef SELS
578
`endif
579
`ifdef DIVSx
580
`undef DIVSx
581
`endif
582
 
583
 
584
//
585
// DEBUG INTERFACE EXTRA CONFIGURATION
586
//======================================
587
 
588 111 olivier.gi
// Debug interface: CPU version
589
`ifdef CPU_VERSION
590
`undef CPU_VERSION
591
`endif
592
 
593 33 olivier.gi
// Debug interface: Software breakpoint opcode
594
`ifdef DBG_SWBRK_OP
595
`undef DBG_SWBRK_OP
596
`endif
597
 
598
// Debug UART interface auto data synchronization
599
`ifdef DBG_UART_AUTO_SYNC
600
`undef DBG_UART_AUTO_SYNC
601
`endif
602
 
603
// Debug UART interface data rate
604
`ifdef DBG_UART_BAUD
605
`undef DBG_UART_BAUD
606
`endif
607
`ifdef DBG_DCO_FREQ
608
`undef DBG_DCO_FREQ
609
`endif
610
`ifdef DBG_UART_CNT
611
`undef DBG_UART_CNT
612
`endif
613 57 olivier.gi
 
614 111 olivier.gi
// Debug interface selection
615
`ifdef DBG_UART
616
`undef DBG_UART
617
`endif
618
`ifdef DBG_JTAG
619
`undef DBG_JTAG
620
`endif
621
 
622 57 olivier.gi
// Enable/Disable the hardware breakpoint RANGE mode
623
`ifdef HWBRK_RANGE
624
`undef HWBRK_RANGE
625 67 olivier.gi
`endif
626
 
627 74 olivier.gi
// Counter width for the debug interface UART
628
`ifdef DBG_UART_XFER_CNT_W
629
`undef DBG_UART_XFER_CNT_W
630
`endif
631
 
632 67 olivier.gi
//
633
// MULTIPLIER CONFIGURATION
634
//======================================
635
 
636
`ifdef MPY_16x16
637
`undef MPY_16x16
638
`endif

powered by: WebSVN 2.1.0

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