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/] [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 #define N2H2_CHAN_BASE as N2H's base address
13
 *  Also #define N2H2_CHAN_IRQ_INTERRUPT_CONTROLLER_ID and
14
 *  #define N2H2_CHAN_IRQ
15
 *
16
 */
17
 
18
#ifndef SUPPORT_H
19
#define SUPPORT_H
20
 
21
#include "n2h_isr_fifo.h"
22
#include "system.h"
23
#include "N2H_registers_and_macros.h"
24
#include "tut_n2h_regs.h"
25
 
26
#define N2H2_CHAN_BASE N2H2_CHAN_2_BASE
27
#define N2H2_CHAN_IRQ_INTERRUPT_CONTROLLER_ID N2H2_CHAN_2_IRQ_INTERRUPT_CONTROLLER_ID
28
#define N2H2_CHAN_IRQ N2H2_CHAN_2_IRQ
29
 
30
 
31
/*            where to read      how much    target address */
32
void n2h_send(int data_src_addr, int amount, int hibi_addr);
33
 
34
/*               which channel  where to store,    amount   address to match*/
35
void n2h_init_rx(int rx_channel, int rx_addr, int rx_amount, int hibi_addr);
36
 
37
/* Returns the position of the first occurrence of '1' from LSB (rigth)*/
38
int onehot2int(int num);
39
 
40
/* ISR handler */
41
void n2h2_isr(void* context);
42
 
43
/* Init interrupt service */
44
void n2h_isr_init(N2H_isr_fifo* n2h_isr_fifo);
45
 
46
 
47
#endif
48
 

powered by: WebSVN 2.1.0

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