URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 309 |
Rev 381 |
Line 10... |
Line 10... |
#include <stdlib.h>
|
#include <stdlib.h>
|
#define LONGEST long long
|
#define LONGEST long long
|
|
|
LONGEST acc = 0;
|
LONGEST acc = 0;
|
#define MAC(x,y) {\
|
#define MAC(x,y) {\
|
/*printf ("[%08x,%08x]\t", (unsigned long)(x), (unsigned long)(y));\*/
|
/*printf ("[%08x,%08x]\t", (unsigned long)(x), (unsigned long)(y));*/\
|
acc += (LONGEST)(x) * (LONGEST)(y);\
|
acc += (LONGEST)(x) * (LONGEST)(y);\
|
/*printf ("(%08x,%08x)\n", (unsigned long)(acc >> 32), (unsigned long)(acc & 0xffffffff));\*/
|
/*printf ("(%08x,%08x)\n", (unsigned long)(acc >> 32), (unsigned long)(acc & 0xffffffff));*/\
|
}
|
}
|
#define MACRC (macrc())
|
#define MACRC (macrc())
|
static inline long macrc() {
|
static inline long macrc() {
|
long result = acc >> 28;
|
long result = acc >> 28;
|
//printf ("<%08x>\n", (unsigned long)result);
|
//printf ("<%08x>\n", (unsigned long)result);
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.