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

Subversion Repositories turbo8051

[/] [turbo8051/] [trunk/] [verif/] [sw/] [C/] [gmac_loopback.c] - Blame information for rev 53

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

Line No. Rev Author Line
1 53 dinesha
/*
2
 * Copyright (c) 1999-2001 Tony Givargis.  Permission to copy is granted
3
 * provided that this header remains intact.  This software is provided
4
 * with no warranties.
5
 *
6
 * Version : 2.9
7
 */
8
 
9
/*---------------------------------------------------------------------------*/
10
 
11
#include <8051.h>
12
 
13
char cErrCnt;
14
/*---------------------------------------------------------------------------*/
15
 
16
__xdata __at (0x30) unsigned int read_data;
17
__xdata __at (0x34) unsigned int tx_des_base;
18
__xdata __at (0x38) unsigned int rx_des_base;
19
 
20
void main() {
21
 
22
    unsigned int cFrameCnt = 0;
23
    unsigned int desc_ptr   =0;
24
 
25
    while(1) {
26
       if((read_data & 0xF) != 0) { // Check the Rx Q Counter
27
          // Read the Receive Descriptor
28
          // tb_top.cpu_read('h4,{desc_rx_qbase,desc_ptr},read_data); 
29
          // Write the Tx Descriptor
30
          rx_des_base = tx_des_base;
31
          // tb_top.cpu_write('h4,{desc_tx_qbase,desc_ptr},read_data); 
32
          desc_ptr = desc_ptr+1;
33
          cFrameCnt  = cFrameCnt+1;
34
         }
35
    }
36
}

powered by: WebSVN 2.1.0

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