Explorar el Código

fpga: Add missing files

Samuel Thibault hace 4 años
padre
commit
5125c55d90
Se han modificado 3 ficheros con 72 adiciones y 0 borrados
  1. 24 0
      tests/fpga/Task1.maxj
  2. 24 0
      tests/fpga/Task2.maxj
  3. 24 0
      tests/fpga/Task3.maxj

+ 24 - 0
tests/fpga/Task1.maxj

@@ -0,0 +1,24 @@
+package fpga;
+
+import com.maxeler.maxcompiler.v2.kernelcompiler.Kernel;
+import com.maxeler.maxcompiler.v2.kernelcompiler.KernelParameters;
+import com.maxeler.maxcompiler.v2.kernelcompiler.types.base.DFEType;
+import com.maxeler.maxcompiler.v2.kernelcompiler.types.base.DFEVar;
+
+class Task1 extends Kernel
+{
+	private static final DFEType type = dfeInt(32);
+
+	protected Task1(KernelParameters parameters)
+	{
+		super(parameters);
+
+                DFEVar inAT1 = io.input("inAT1", type);
+                DFEVar inBT1 = io.input("inBT1", type);
+                DFEVar oDataT1;
+
+                oDataT1 = inAT1+inBT1;
+
+                io.output("oDataT1", oDataT1, type);
+	}
+}

+ 24 - 0
tests/fpga/Task2.maxj

@@ -0,0 +1,24 @@
+package fpga;
+
+import com.maxeler.maxcompiler.v2.kernelcompiler.Kernel;
+import com.maxeler.maxcompiler.v2.kernelcompiler.KernelParameters;
+import com.maxeler.maxcompiler.v2.kernelcompiler.types.base.DFEType;
+import com.maxeler.maxcompiler.v2.kernelcompiler.types.base.DFEVar;
+
+class Task2 extends Kernel
+{
+	private static final DFEType type = dfeInt(32);
+
+	protected Task2(KernelParameters parameters)
+	{
+		super(parameters);
+
+                DFEVar inAT2 = io.input("inAT2", type);
+                DFEVar inBT2 = io.input("inBT2", type);
+                DFEVar oDataT2;
+
+                oDataT2 = inAT2*inBT2;
+
+                io.output("oDataT2", oDataT2, type);
+	}
+}

+ 24 - 0
tests/fpga/Task3.maxj

@@ -0,0 +1,24 @@
+package fpga;
+
+import com.maxeler.maxcompiler.v2.kernelcompiler.Kernel;
+import com.maxeler.maxcompiler.v2.kernelcompiler.KernelParameters;
+import com.maxeler.maxcompiler.v2.kernelcompiler.types.base.DFEType;
+import com.maxeler.maxcompiler.v2.kernelcompiler.types.base.DFEVar;
+
+class Task3 extends Kernel
+{
+	private static final DFEType type = dfeInt(32);
+
+	protected Task3(KernelParameters parameters)
+	{
+		super(parameters);
+
+                DFEVar inAT3 = io.input("inAT3", type);
+                DFEVar inBT3 = io.input("inBT3", type);
+                DFEVar oDataT3;
+
+                oDataT3 = inAT3+inBT3;
+
+                io.output("oDataT3", oDataT3, type);
+	}
+}