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

Subversion Repositories heap_sorter

[/] [heap_sorter/] [trunk/] [HLS_implementation/] [Fig5/] [wz_hsort.h] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 wzab
typedef struct{
2
  short unsigned int key;
3
  char payload[4];
4
} sort_data;
5
 
6
int inline kcmp(short unsigned int v1, short unsigned int v2)
7
{
8
#pragma HLS LATENCY min=0 max=0
9
        if(v1==v2) return 0;
10
        if((v1-v2) & (1<<15)) return -1;
11
        return 1;
12
}
13
 
14
#define NM 11
15
#define SORT_LEN (1<<NM)
16
#define MAX_DEL (SORT_LEN)
17
#define TEST_LEN (MAX_DEL*100)
18
extern sort_data sort_mem[NM][SORT_LEN];
19
sort_data heap_sort (sort_data val);

powered by: WebSVN 2.1.0

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