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_cpu1/] [support.h] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
/*
2
 *
3
 * Author            : Lasse Lehtonen
4
 * Last modification : 29.03.2011
5
 *
6
 * N2H support functions
7
 *
8
 */
9
 
10
/* NB
11
 *
12
 *  Remember to modify below
13
 *     #define N2H2_CHAN_BASE
14
 *     #define N2H2_CHAN_IRQ_INTERRUPT_CONTROLLER_ID
15
 *     #define N2H2_CHAN_IRQ
16
 *
17
 */
18
 
19
#ifndef SUPPORT_H
20
#define SUPPORT_H
21
 
22
#include "n2h_isr_fifo.h"
23
#include "system.h"
24
#include "N2H_registers_and_macros.h"
25
#include "tut_n2h_regs.h"
26
 
27
 
28
#define N2H2_CHAN_BASE N2H2_CHAN_1_BASE
29
#define N2H2_CHAN_IRQ_INTERRUPT_CONTROLLER_ID N2H2_CHAN_1_IRQ_INTERRUPT_CONTROLLER_ID
30
#define N2H2_CHAN_IRQ N2H2_CHAN_1_IRQ
31
 
32
 
33
/*            where to read      how much    target address */
34
void n2h_send(int data_src_addr, int amount, int hibi_addr);
35
 
36
/*               which channel  where to store,    amount   address to match*/
37
void n2h_init_rx(int rx_channel, int rx_addr, int rx_amount, int hibi_addr);
38
 
39
/* Returns the position of the first occurrence of '1' from LSB (rigth)*/
40
int onehot2int(int num);
41
 
42
/* ISR handler*/
43
void n2h2_isr(void* context);
44
 
45
/* Init interrupt service */
46
void n2h_isr_init(N2H_isr_fifo* n2h_isr_fifo);
47
 
48
 
49
#endif
50
 

powered by: WebSVN 2.1.0

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