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

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-fw/] [firmware/] [include/] [syncdelay.h] - Blame information for rev 29

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

Line No. Rev Author Line
1 9 nussgipfel
/* -*- c++ -*- */
2
/*
3
 * Copyright 2003 Free Software Foundation, Inc.
4
 *
5
 * This file is part of GNU Radio
6
 *
7
 * GNU Radio is free software; you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation; either version 3, or (at your option)
10
 * any later version.
11
 *
12
 * GNU Radio is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with GNU Radio; see the file COPYING.  If not, write to
19
 * the Free Software Foundation, Inc., 51 Franklin Street,
20
 * Boston, MA 02110-1301, USA.
21
 */
22
 
23
/************************************************************************/
24
/** \file         syncdelay.h
25
 *************************************************************************
26
 *
27
 *  \author       GNU Radio
28
 *
29
 */
30
 
31
#ifndef _SYNCDELAY_H_
32
#define _SYNCDELAY_H_
33
 
34
/**
35
 * \brief Magic delay required between access to certain xdata registers (TRM page 15-106).
36
 *
37
 * For our configuration, 48 MHz FX2 / 48 MHz IFCLK, we need three cycles.  Each
38
 * NOP is a single cycle....
39
 *
40
 * From TRM page 15-105:
41
 *
42
 * Under certain conditions, some read and write access to the FX2 registers must
43
 * be separated by a "synchronization delay".  The delay is necessary only under the
44
 * following conditions:
45
 *
46
 *   - between a write to any register in the 0xE600 - 0xE6FF range and a write to one
47
 *     of the registers listed below.
48
 *
49
 *   - between a write to one of the registers listed below and a read from any register
50
 *     in the 0xE600 - 0xE6FF range.
51
 *
52
 *   Registers which require a synchronization delay:
53
 *
54
 *      FIFORESET                       FIFOPINPOLAR
55
 *      INPKTEND                        EPxBCH:L
56
 *      EPxFIFOPFH:L                    EPxAUTOINLENH:L
57
 *      EPxFIFOCFG                      EPxGPIFFLGSEL
58
 *      PINFLAGSAB                      PINFLAGSCD
59
 *      EPxFIFOIE                       EPxFIFOIRQ
60
 *      GPIFIE                          GPIFIRQ
61
 *      UDMACRCH:L                      GPIFADRH:L
62
 *      GPIFTRIG                        EPxGPIFTRIG
63
 *      OUTPKTEND                       REVCTL
64
 *      GPIFTCB3                        GPIFTCB2
65
 *      GPIFTCB1                        GPIFTCB0
66
 *
67
 *
68
 * FIXME ensure that the peep hole optimizer isn't screwing us
69
 */
70
#define SYNCDELAY       _asm nop; nop; nop; _endasm
71
 
72
/** no operation, idle for ony cycle */
73
#define NOP             _asm nop; _endasm
74
 
75
 
76
#endif /* _SYNCDELAY_H_ */

powered by: WebSVN 2.1.0

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