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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.hwp.communication/] [n2h2/] [1.0/] [tb/] [system/] [src_cpu2/] [N2H_registers_and_macros.h] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
// *****************************************************************************
2
// File             : N2H_registers_and_macros.h
3
// Author           : Tero Arpinen
4
// Date             : 22.12.2004
5
// Decription       : This file contains customizable register address 
6
//                    definitions
7
//                    for N2H interface and some needed macros
8
// 
9
// Version history  : 22.12.2004    tar    Original version 
10
//                  : 06.07.2005    tar    Modified to work with N2H2
11
//                  : 02.10.2009    tko    Removed unneeded macros
12
// *****************************************************************************
13
 
14
#ifndef N2H_REGISTERS_AND_MACROS_H
15
#define N2H_REGISTERS_AND_MACROS_H
16
 
17
// DEFINE FOLLOWING REGISTERS ACCORDING TO NIOS OR NIOS II HARDWARE 
18
// CONFIGURATION
19
 
20
// N2H2 Avalon slave base address
21
#define N2H_REGISTERS_BASE_ADDRESS            ((void*) N2H2_CHAN_2_BASE)
22
 
23
// Buffer start address in cpu's memory
24
#define N2H_REGISTERS_BUFFER_START            (SHARED_MEM_2_BASE)
25
 
26
// Writeable registers
27
// set bit 31 to 1 so that writes and reads bypass cache
28
#define N2H_REGISTERS_TX_BUFFER_START         (0x80000000 | SHARED_MEM_2_BASE)
29
 
30
#define N2H_REGISTERS_TX_BUFFER_BYTE_LENGTH (0x00000400)
31
#define N2H_REGISTERS_TX_BUFFER_END (N2H_REGISTERS_TX_BUFFER_START + \
32
                                     N2H_REGISTERS_TX_BUFFER_BYTE_LENGTH - 1)
33
 
34
// Readable registers
35
#define N2H_REGISTERS_RX_BUFFER_START       (N2H_REGISTERS_TX_BUFFER_START + N2H_REGISTERS_TX_BUFFER_BYTE_LENGTH)
36
#define N2H_REGISTERS_RX_BUFFER_BYTE_LENGTH (0x00000C00)
37
#define N2H_REGISTERS_RX_BUFFER_END         (N2H_REGISTERS_RX_BUFFER_START + \
38
                                           N2H_REGISTERS_RX_BUFFER_BYTE_LENGTH \
39
                                           - 1)
40
// N2H Interrupt registers, numbers and priorities
41
#define N2H_RX_IRQ                      (2)
42
#define N2H_RX_IRQ_PRI                  (3)
43
 
44
// N2H Channels
45
#define N2H_NUMBER_OF_CHANNELS              (8)
46
 
47
#endif // N2H_REGISTERS_AND_MACROS_H

powered by: WebSVN 2.1.0

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