[llvm-commits] [test-suite] r46436 - in /test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b: ./ Makefile calc.c calc.h input.txt main.c testbench.c testbench.h

Chris Lattner sabre at nondot.org
Sun Jan 27 21:35:04 PST 2008


Author: lattner
Date: Sun Jan 27 23:35:03 2008
New Revision: 46436

URL: http://llvm.org/viewvc/llvm-project?rev=46436&view=rev
Log:
add the 8b10b benchmark, hacked to take enough time to run to be interesting.

Added:
    test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/
    test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/Makefile
    test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.c
    test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.h
    test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/input.txt   (with props)
    test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/main.c
    test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.c
    test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.h

Added: test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/Makefile?rev=46436&view=auto

==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/Makefile (added)
+++ test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/Makefile Sun Jan 27 23:35:03 2008
@@ -0,0 +1,10 @@
+LEVEL = ../../../..
+
+PROG     = 8b10b
+ifdef SMALL_PROBLEM_SIZE
+RUN_OPTIONS = input.txt 2000
+else
+RUN_OPTIONS = input.txt 20000
+endif
+include $(LEVEL)/MultiSource/Makefile.multisrc
+

Added: test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.c?rev=46436&view=auto

==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.c (added)
+++ test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.c Sun Jan 27 23:35:03 2008
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 2002 David Wentzlaff
+ *
+ * Permission  is hereby  granted,  free  of  charge, to  any  person
+ * obtaining a  copy of  this software  and  associated documentation
+ * files   (the  "Software"),  to   deal  in  the   Software  without
+ * restriction, including without  limitation the rights to use, copy,
+ * modify, merge, publish,  distribute, sublicense, and/or sell copies
+ * of  the Software,  and to  permit persons to  whom the  Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above  copyright notice  and this  permission notice  shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE  SOFTWARE IS  PROVIDED "AS IS",  WITHOUT WARRANTY OF  ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING  BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY,   FITNESS   FOR   A   PARTICULAR    PURPOSE    AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM,  DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF  CONTRACT, TORT OR OTHERWISE, ARISING FROM,  OUT OF OR IN
+ * CONNECTION  WITH THE SOFTWARE OR  THE USE OR OTHER  DEALINGS IN THE
+ * SOFTWARE.  
+ */
+
+//This is part of David Wentzlaff's Masters Thesis
+//This file is Copyright David Wentzlaff 2002 All Rights Reserved.
+//
+// Filename : calc.c
+// Date : 07/31/2002
+
+/* Modified by: Rodric M. Rabbah 06-03-04 */
+
+#include <stdio.h>
+
+#include "calc.h"
+
+//note in all of these things, we assume that the K bit is the
+//high order bit
+
+//also note that every thing here is little endian 
+//and the IBM systems journal paper is big endian.
+//so that means that D.1 is 10000 which lives in
+//locattion 16 of the table not 1!
+
+#define ENCODE5B(DATA, FLIP, PLUS, MINUS, X)	(((DATA)<<4)&0x3e0)|(((DATA)<<1)&2)|((((FLIP)<<3)|((PLUS)<<2)|((MINUS)<<1)|((X)))<<16)
+#define ENCODE3B(DATA, FLIP, PLUS, MINUS, X)	((DATA)&1)|(((DATA)<<1)&0x1c)|((((FLIP)<<3)|((PLUS)<<2)|((MINUS)<<1)|((X)))<<16)
+
+#define GET_FLIP_5(DATA)	(((DATA)>>(16+3))&1)
+#define GET_PLUS_5(DATA)	(((DATA)>>(16+2))&1)
+#define GET_MINUS_5(DATA)	(((DATA)>>(16+1))&1)
+#define GET_X_5(DATA)	(((DATA)>>(16))&1)
+
+#define GET_FLIP_3(DATA)	(((DATA)>>(16+3))&1)
+#define GET_PLUS_3(DATA)	(((DATA)>>(16+2))&1)
+#define GET_MINUS_3(DATA)	(((DATA)>>(16+1))&1)
+#define GET_X_3(DATA)	(((DATA)>>(16))&1)
+
+#define B5_MASK	0x3e2
+#define B3_MASK	0x1d
+
+//setup the table for the 5b/6b part
+unsigned int lookupTable5B[64] = 
+{
+   /* 0 */ ENCODE5B(0x18,1,1,0,0),
+   /* 1 */ ENCODE5B(0x1b,1,0,1,0),
+   /* 2 */ ENCODE5B(0x06,1,1,0,0),
+   /* 3 */ ENCODE5B(0x0c,1,1,0,0),
+   /* 4 */ ENCODE5B(0x0a,1,1,0,0),
+   /* 5 */ ENCODE5B(0x0b,0,0,0,1),
+   /* 6 */ ENCODE5B(0x0d,0,0,0,1),
+   /* 7 */ ENCODE5B(0x0e,0,0,0,1),
+   /* 8 */ ENCODE5B(0x12,1,1,0,0),
+   /* 9 */ ENCODE5B(0x13,0,0,0,1),
+   /* 10 */ ENCODE5B(0x15,0,0,0,1),
+   /* 11 */ ENCODE5B(0x16,0,0,0,1),
+   /* 12 */ ENCODE5B(0x19,0,0,0,1),
+   /* 13 */ ENCODE5B(0x1a,0,0,0,1),
+   /* 14 */ ENCODE5B(0x1c,0,0,0,1),
+   /* 15 */ ENCODE5B(0x1e,1,0,1,0),
+   /* 16 */ ENCODE5B(0x22,1,1,0,0),
+   /* 17 */ ENCODE5B(0x23,0,0,0,1),
+   /* 18 */ ENCODE5B(0x25,0,0,0,1),
+   /* 19 */ ENCODE5B(0x26,0,0,0,1),
+   /* 20 */ ENCODE5B(0x29,0,0,0,1),
+   /* 21 */ ENCODE5B(0x2a,0,0,0,1),
+   /* 22 */ ENCODE5B(0x2c,0,0,0,1),
+   /* 23 */ ENCODE5B(0x2e,1,0,1,0),
+   /* 24 */ ENCODE5B(0x31,0,0,0,1),
+   /* 25 */ ENCODE5B(0x32,0,0,0,1),
+   /* 26 */ ENCODE5B(0x34,0,0,0,1),
+   /* 27 */ ENCODE5B(0x36,1,0,1,0),
+   /* 28 */ ENCODE5B(0x38,0,0,1,0),
+   /* 29 */ ENCODE5B(0x3a,1,0,1,0),
+   /* 30 */ ENCODE5B(0x28,1,1,0,0),
+   /* 31 */ ENCODE5B(0x2b,1,0,1,0),
+
+   /* 0 */ ENCODE5B(0x18,1,1,0,0),
+   /* 1 */ ENCODE5B(0x1b,1,0,1,0),
+   /* 2 */ ENCODE5B(0x06,1,1,0,0),
+   /* 3 */ ENCODE5B(0x0c,1,1,0,0),
+   /* 4 */ ENCODE5B(0x0a,1,1,0,0),
+   /* 5 */ ENCODE5B(0x0b,0,0,0,1),
+   /* 6 */ ENCODE5B(0x0d,0,0,0,1),
+   /* 7 */ ENCODE5B(0x0f,1,0,1,0),
+   /* 8 */ ENCODE5B(0x12,1,1,0,0),
+   /* 9 */ ENCODE5B(0x13,0,0,0,1),
+   /* 10 */ ENCODE5B(0x15,0,0,0,1),
+   /* 11 */ ENCODE5B(0x16,0,0,0,1),
+   /* 12 */ ENCODE5B(0x19,0,0,0,1),
+   /* 13 */ ENCODE5B(0x1a,0,0,0,1),
+   /* 14 */ ENCODE5B(0x1c,0,0,0,1),
+   /* 15 */ ENCODE5B(0x1e,1,0,1,0),
+   /* 16 */ ENCODE5B(0x22,1,1,0,0),
+   /* 17 */ ENCODE5B(0x23,0,0,0,1),
+   /* 18 */ ENCODE5B(0x25,0,0,0,1),
+   /* 19 */ ENCODE5B(0x26,0,0,0,1),
+   /* 20 */ ENCODE5B(0x29,0,0,0,1),
+   /* 21 */ ENCODE5B(0x2a,0,0,0,1),
+   /* 22 */ ENCODE5B(0x2c,0,0,0,1),
+   /* 23 */ ENCODE5B(0x2e,1,0,1,0),
+   /* 24 */ ENCODE5B(0x31,0,0,0,1),
+   /* 25 */ ENCODE5B(0x32,0,0,0,1),
+   /* 26 */ ENCODE5B(0x34,0,0,0,1),
+   /* 27 */ ENCODE5B(0x36,1,0,1,0),
+   /* 28 */ ENCODE5B(0x38,0,0,1,0),
+   /* 29 */ ENCODE5B(0x3a,1,0,1,0),
+   /* 30 */ ENCODE5B(0x28,1,1,0,0),
+   /* 31 */ ENCODE5B(0x2b,1,0,1,0)
+};
+
+//setup the table for the 3b/4b part
+unsigned int lookupTable3B[16] = 
+{
+  /* 0 */ ENCODE3B(0x4,1,1,0,0),
+  /* 1 */ ENCODE3B(0x2,1,1,0,0),
+  /* 2 */ ENCODE3B(0x5,0,0,0,1),
+  /* 3 */ ENCODE3B(0x6,0,0,0,1),
+  /* 4 */ ENCODE3B(0x9,0,0,0,1),
+  /* 5 */ ENCODE3B(0xa,0,0,0,1),
+  /* 6 */ ENCODE3B(0xc,0,0,1,0),
+  /* 7 */ ENCODE3B(0xe,1,0,1,0),
+
+  /* 0 */ ENCODE3B(0x4,1,1,0,0),
+  /* 1 */ ENCODE3B(0x2,1,1,0,0),
+  /* 2 */ ENCODE3B(0x5,0,1,0,0),
+  /* 3 */ ENCODE3B(0x6,0,1,0,0),
+  /* 4 */ ENCODE3B(0x9,0,1,0,0),
+  /* 5 */ ENCODE3B(0xa,0,1,0,0),
+  /* 6 */ ENCODE3B(0xc,0,0,1,0),
+  /* 7 */ ENCODE3B(0x7,1,0,1,0)
+};
+
+unsigned int bigTable[1024];
+
+//we are assuming here that 1 equals minus and 0 is plus
+unsigned int disparity0 = 0;
+unsigned int disparity1 = 1;
+
+void calcSetup()
+{
+}
+
+unsigned int calc(unsigned int theWord, unsigned int k)
+{
+	unsigned int index5;
+	unsigned int index3;
+	unsigned int lookup5;
+	unsigned int lookup3;
+	unsigned int result;
+	index5 = ((theWord>>3)&0x1f)|(k<<5);
+	index3 = ((theWord)&0x7)|(k<<3);
+	lookup5 = lookupTable5B[index5];
+	lookup3 = lookupTable3B[index3];
+	if(GET_X_5(lookup5))
+	{
+		//set the output and don't touch the parity
+		result = lookup5 & B5_MASK;
+		disparity1 = disparity0;
+	}
+	else
+	{
+		//ugg I need to think about this one
+		if(disparity0 == GET_PLUS_5(lookup5))
+		{
+			//this means that we are comming in the correct way
+			result = (lookup5 & B5_MASK);
+		}
+		else
+		{
+			//this means that we are comming in the wrong way
+			//and that means that we need to use the alternative
+			//word
+			result = (lookup5 & B5_MASK)^B5_MASK;
+		}
+		if(GET_FLIP_5(lookup5))
+		{
+			disparity1 = disparity0 ^ 1;
+		}
+		else
+		{
+			disparity1 = disparity0;
+		}
+	}
+	if(GET_X_3(lookup3))
+	{
+		//set the output and don't touch the parity
+		result |= lookup3 & B3_MASK;
+		disparity0 = disparity1;
+	}
+	else
+	{
+		//ugg I need to think about this one
+		if(disparity1 == GET_PLUS_3(lookup3))
+		{
+			//this means that we are comming in the correct way
+			result |= (lookup3 & B3_MASK);
+		}
+		else
+		{
+			//this means that we are comming in the wrong way
+			//and that means that we need to use the alternative
+			//word
+			result |= (lookup3 & B3_MASK)^B3_MASK;
+		}
+		if(GET_FLIP_3(lookup3))
+		{
+			disparity0 = disparity1 ^ 1;
+		}
+		else
+		{
+			disparity0 = disparity1;
+		}
+	}
+	return result;
+}
+
+unsigned int bigTableCalc(unsigned int theWord)
+{
+	unsigned int result;
+	result = bigTable[(disparity0<<9)|(theWord)];
+	disparity0 = result >> 16;
+	return (result&0x3ff);
+}
+
+void resetDisparity()
+{
+        disparity0 = 0;
+}
+
+void bigTableSetup()
+{
+	int counter;
+	unsigned int tempResult;
+	for(counter = 0; counter < 1024; counter++)
+	{
+		disparity0 = counter >> 9;
+		tempResult = calc(counter & 0xff, ((counter >>8) & 1));
+		bigTable[counter] = tempResult | disparity0 << 16;
+	}
+	resetDisparity();
+}

Added: test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.h?rev=46436&view=auto

==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.h (added)
+++ test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/calc.h Sun Jan 27 23:35:03 2008
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2002 David Wentzlaff
+ *
+ * Permission  is hereby  granted,  free  of  charge, to  any  person
+ * obtaining a  copy of  this software  and  associated documentation
+ * files   (the  "Software"),  to   deal  in  the   Software  without
+ * restriction, including without  limitation the rights to use, copy,
+ * modify, merge, publish,  distribute, sublicense, and/or sell copies
+ * of  the Software,  and to  permit persons to  whom the  Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above  copyright notice  and this  permission notice  shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE  SOFTWARE IS  PROVIDED "AS IS",  WITHOUT WARRANTY OF  ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING  BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY,   FITNESS   FOR   A   PARTICULAR    PURPOSE    AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM,  DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF  CONTRACT, TORT OR OTHERWISE, ARISING FROM,  OUT OF OR IN
+ * CONNECTION  WITH THE SOFTWARE OR  THE USE OR OTHER  DEALINGS IN THE
+ * SOFTWARE.  
+ */
+
+#ifndef CALC_H
+#define CALC_H
+
+void calcSetup();
+unsigned int calc(unsigned int theWord, unsigned int k);
+void bigTableSetup();
+
+unsigned int bigTableCalc(unsigned int theWord);
+void resetDisparity();
+
+#endif

Added: test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/input.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/input.txt?rev=46436&view=auto

==============================================================================
Binary file - no diff available.

Propchange: test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/input.txt

------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/main.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/main.c?rev=46436&view=auto

==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/main.c (added)
+++ test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/main.c Sun Jan 27 23:35:03 2008
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2002 David Wentzlaff
+ *
+ * Permission  is hereby  granted,  free  of  charge, to  any  person
+ * obtaining a  copy of  this software  and  associated documentation
+ * files   (the  "Software"),  to   deal  in  the   Software  without
+ * restriction, including without  limitation the rights to use, copy,
+ * modify, merge, publish,  distribute, sublicense, and/or sell copies
+ * of  the Software,  and to  permit persons to  whom the  Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above  copyright notice  and this  permission notice  shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE  SOFTWARE IS  PROVIDED "AS IS",  WITHOUT WARRANTY OF  ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING  BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY,   FITNESS   FOR   A   PARTICULAR    PURPOSE    AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM,  DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF  CONTRACT, TORT OR OTHERWISE, ARISING FROM,  OUT OF OR IN
+ * CONNECTION  WITH THE SOFTWARE OR  THE USE OR OTHER  DEALINGS IN THE
+ * SOFTWARE.  
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "testbench.h"
+#include "calc.h"
+
+int main (int argc, char **argv)
+{
+	int numberOfWords;
+	if(argc == 3)
+	{
+		calcSetup();
+#ifdef BIG_CALC
+		bigTableSetup();
+#endif
+		numberOfWords = atoi(argv[2]);
+		runTestbench(numberOfWords, argv[1], 0);
+		return 0;
+	}
+	else
+	{
+		printf("Usage: input_name output_0_name number_of_bytes\n");
+		return -1;
+	}
+}
+

Added: test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.c?rev=46436&view=auto

==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.c (added)
+++ test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.c Sun Jan 27 23:35:03 2008
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2002 David Wentzlaff
+ *
+ * Permission  is hereby  granted,  free  of  charge, to  any  person
+ * obtaining a  copy of  this software  and  associated documentation
+ * files   (the  "Software"),  to   deal  in  the   Software  without
+ * restriction, including without  limitation the rights to use, copy,
+ * modify, merge, publish,  distribute, sublicense, and/or sell copies
+ * of  the Software,  and to  permit persons to  whom the  Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above  copyright notice  and this  permission notice  shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE  SOFTWARE IS  PROVIDED "AS IS",  WITHOUT WARRANTY OF  ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING  BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY,   FITNESS   FOR   A   PARTICULAR    PURPOSE    AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM,  DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF  CONTRACT, TORT OR OTHERWISE, ARISING FROM,  OUT OF OR IN
+ * CONNECTION  WITH THE SOFTWARE OR  THE USE OR OTHER  DEALINGS IN THE
+ * SOFTWARE.  
+ */
+
+//This is part of David Wentzlaff's Masters Thesis
+//This file is Copyright David Wentzlaff 2002 All Rights Reserved.
+//
+// Filename : testbench.c
+// Date : 07/09/2002
+
+/* Modified by: Rodric M. Rabbah 06-03-04 */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "calc.h"
+#include "testbench.h"
+
+void runTestbench(int numberOfWords, char* inputFileName, char* outputFileName0)
+{
+	unsigned int * theBigAllocatedThing;
+	unsigned int * theInputArray;
+	unsigned int * theOutputArray0;
+	FILE * inputFile;
+	FILE * outputFile0;
+	unsigned int readData;
+	unsigned int bits0;
+	int counter;
+  int tmp;
+	//first, make the needed space
+	//hmm we will put it on the heap for now becasue that
+	//will be contiguous.  
+	theBigAllocatedThing = (unsigned int *) malloc((numberOfWords * sizeof(unsigned int) * 2));
+	theInputArray = theBigAllocatedThing;
+	theOutputArray0 = theBigAllocatedThing + numberOfWords;
+
+	
+	//read the input into the input array from a file
+	inputFile = fopen(inputFileName, "r");
+	fread(theInputArray, numberOfWords, sizeof(unsigned int), inputFile);
+	fclose(inputFile);
+
+	/*** VERSABENCH START ***/
+	//run calc for numberOfWords times
+  for (tmp = 0; tmp < numberOfWords; ++tmp)  // LLVM: increase execution time.
+	for(counter = 0; counter < numberOfWords; counter ++)
+	{
+#ifdef BIG_CALC
+		bits0 = theInputArray[counter];
+		theOutputArray0[counter] = bigTableCalc(bits0);
+#else
+		bits0 = theInputArray[counter];
+		theOutputArray0[counter] = calc(bits0&0xff, bits0>>8);
+#endif
+	}
+	/*** VERSABENCH END ***/
+	
+	//dump the outputs to a files
+	outputFile0 = stdout;
+	for(counter = 0; counter < (numberOfWords); counter+= 128)
+	{
+		bits0 = theOutputArray0[counter];
+		fprintf(outputFile0, "%8.8X\n", bits0);
+	}
+
+	free(theBigAllocatedThing);
+}
+
+#if 0
+	for(counter = 0; counter < (numberOfWords); counter++)
+	{
+		fscanf(inputFile, "%X\n", &readData);
+		theInputArray[counter] = readData;
+	}
+
+	//touch both of the output arrays so that they are in the L2
+	for(counter = 0; counter < numberOfWords; counter ++)
+	{
+		theOutputArray0[counter] = counter;
+	}
+#endif

Added: test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.h?rev=46436&view=auto

==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.h (added)
+++ test-suite/trunk/MultiSource/Benchmarks/VersaBench/8b10b/testbench.h Sun Jan 27 23:35:03 2008
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2002 David Wentzlaff
+ *
+ * Permission  is hereby  granted,  free  of  charge, to  any  person
+ * obtaining a  copy of  this software  and  associated documentation
+ * files   (the  "Software"),  to   deal  in  the   Software  without
+ * restriction, including without  limitation the rights to use, copy,
+ * modify, merge, publish,  distribute, sublicense, and/or sell copies
+ * of  the Software,  and to  permit persons to  whom the  Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above  copyright notice  and this  permission notice  shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE  SOFTWARE IS  PROVIDED "AS IS",  WITHOUT WARRANTY OF  ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING  BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY,   FITNESS   FOR   A   PARTICULAR    PURPOSE    AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM,  DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF  CONTRACT, TORT OR OTHERWISE, ARISING FROM,  OUT OF OR IN
+ * CONNECTION  WITH THE SOFTWARE OR  THE USE OR OTHER  DEALINGS IN THE
+ * SOFTWARE.  
+ */
+
+//This is part of David Wentzlaff's Masters Thesis
+//This file is Copyright David Wentzlaff 2002 All Rights Reserved.
+//
+// Filename : testbench.h
+// Date : 07/10/2002
+
+#ifndef TESTBENCH_H
+#define TESTBENCH_H
+
+void runTestbench(int numberOfBits, char* inputFileName, char* outputFileName0);
+#endif





More information about the llvm-commits mailing list