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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_58/] [or1ksim/] [testbench/] [mul.c] - Diff between revs 309 and 381

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);

powered by: WebSVN 2.1.0

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