Permalink
Browse files

fpvm: new scheduler from Werner (NEEDS REPLACEMENT OF alloca())

  • Loading branch information...
1 parent 7414dca commit 0c4c26d100804c8a6e7e625cecc6e5805ed8c67b @sbourdeauducq sbourdeauducq committed Oct 1, 2011
@@ -44,7 +44,7 @@ boot.o: ../../software/include/net/microudp.h
boot.o: ../../software/include/net/tftp.h ../../software/include/hal/vga.h
boot.o: ../../software/include/hal/usb.h ../../software/include/hw/hpdmc.h
boot.o: ../../software/include/hw/common.h ../../software/include/hw/flash.h
-boot.o: boot.h
+boot.o: unlzma.h boot.h
isr.o: ../../software/include/hw/interrupts.h
isr.o: ../../software/include/base/irq.h ../../software/include/base/uart.h
isr.o: ../../software/include/hal/usb.h ../../software/include/hal/tmu.h
@@ -62,11 +62,12 @@ main.o: ../../software/include/base/version.h
main.o: ../../software/include/net/mdio.h ../../software/include/hw/fmlbrg.h
main.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
main.o: ../../software/include/hw/gpio.h ../../software/include/hw/flash.h
-main.o: ../../software/include/hal/vga.h ../../software/include/hal/tmu.h
-main.o: ../../software/include/hw/tmu.h ../../software/include/hal/brd.h
-main.o: ../../software/include/hal/usb.h ../../software/include/hal/ukb.h
-main.o: boot.h splash.h
+main.o: ../../software/include/hw/minimac.h ../../software/include/hal/vga.h
+main.o: ../../software/include/hal/tmu.h ../../software/include/hw/tmu.h
+main.o: ../../software/include/hal/brd.h ../../software/include/hal/usb.h
+main.o: ../../software/include/hal/ukb.h boot.h splash.h
splash.o: ../../software/include/base/stdio.h
splash.o: ../../software/include/base/stdlib.h
splash.o: ../../software/include/hal/vga.h ../../software/include/hw/flash.h
splash.o: splash.h
+unlzma.o: unlzma.h
@@ -62,7 +62,8 @@ eval.o: ../../software/include/base/stdlib.h
eval.o: ../../software/include/base/string.h ../../software/include/hw/pfpu.h
eval.o: ../../software/include/hw/common.h ../../software/include/hw/tmu.h
eval.o: ../../software/include/hal/pfpu.h ../../software/include/fpvm/fpvm.h
-eval.o: ../../software/include/fpvm/is.h ../../software/include/fpvm/gfpus.h
+eval.o: ../../software/include/fpvm/is.h
+eval.o: ../../software/include/fpvm/schedulers.h
eval.o: ../../software/include/fpvm/pfpu.h eval.h renderer.h
font.o: color.h font.h
isr.o: ../../software/include/hw/interrupts.h
@@ -1,6 +1,6 @@
/*
* Milkymist SoC (Software)
- * Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
+ * Copyright (C) 2007, 2008, 2009, 2010, 2011 Sebastien Bourdeauducq
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
#include <hal/pfpu.h>
#include <fpvm/fpvm.h>
-#include <fpvm/gfpus.h>
+#include <fpvm/schedulers.h>
#include <fpvm/pfpu.h>
#include "eval.h"
@@ -281,7 +281,7 @@ static int finalize_pfv()
static int schedule_pfv()
{
- perframe_prog_length = gfpus_schedule(&pfv_fragment, (unsigned int *)perframe_prog, (unsigned int *)perframe_regs);
+ perframe_prog_length = fpvm_default_schedule(&pfv_fragment, (unsigned int *)perframe_prog, (unsigned int *)perframe_regs);
eval_reinit_all_pfv();
if(perframe_prog_length < 0) {
printf("EVL: per-frame VLIW scheduling failed\n");
@@ -527,7 +527,7 @@ static int finalize_pvv()
static int schedule_pvv()
{
- pervertex_prog_length = gfpus_schedule(&pvv_fragment, (unsigned int *)pervertex_prog, (unsigned int *)pervertex_regs);
+ pervertex_prog_length = fpvm_default_schedule(&pvv_fragment, (unsigned int *)pervertex_prog, (unsigned int *)pervertex_regs);
if(pervertex_prog_length < 0) {
printf("EVL: per-vertex VLIW scheduling failed\n");
return 0;
@@ -1,6 +1,6 @@
/*
* Milkymist SoC (Software)
- * Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
+ * Copyright (C) 2007, 2008, 2009, 2010, 2011 Sebastien Bourdeauducq
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,6 +15,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+#ifndef __FPVM_SCHEDULERS_H
+#define __FPVM_SCHEDULERS_H
+
+#include <fpvm/fpvm.h>
+
+/*
+ * code must be able to hold PFPU_PROGSIZE 32-bit instructions.
+ * registers must be able to hold PFPU_REG_COUNT 32-bit values.
+ */
+
/*
* Greedy Floating Point Unit Scheduler
* This program takes FPVM code and performs greedy VLIW scheduling
@@ -23,17 +34,14 @@
* program and takes the first schedulable instruction, without trying to
* optimize the order of instructions.
*/
-
-#ifndef __FPVM_GFPUS_H
-#define __FPVM_GFPUS_H
-
-#include <fpvm/fpvm.h>
+int gfpus_schedule(struct fpvm_fragment *fragment, unsigned int *code, unsigned int *registers);
/*
- * code must be able to hold PFPU_PROGSIZE 32-bit instructions.
- * registers must be able to hold PFPU_REG_COUNT 32-bit values.
+ * Lean New / Lamely Named Floating Point Unit Scheduler
+ * A smarter, faster, optimizing scheduler by Werner Almesberger.
*/
+int lnfpus_schedule(struct fpvm_fragment *fragment, unsigned int *code, unsigned int *registers);
-int gfpus_schedule(struct fpvm_fragment *fragment, unsigned int *code, unsigned int *registers);
+#define fpvm_default_schedule lnfpus_schedule
-#endif /* __FPVM_GFPUS_H */
+#endif /* __FPVM_SCHEDULERS_H */
@@ -1,7 +1,7 @@
MMDIR=../..
include $(MMDIR)/software/include.mak
-OBJECTS=fpvm.o parser_helper.o scanner.o parser.o gfpus.o pfpu.o
+OBJECTS=fpvm.o parser_helper.o scanner.o parser.o gfpus.o lnfpus.o pfpu.o
all: libfpvm.a
@@ -39,8 +39,16 @@ gfpus.o: ../../software/include/base/stdio.h
gfpus.o: ../../software/include/base/stdlib.h
gfpus.o: ../../software/include/fpvm/is.h ../../software/include/fpvm/fpvm.h
gfpus.o: ../../software/include/fpvm/pfpu.h
-gfpus.o: ../../software/include/fpvm/gfpus.h ../../software/include/hw/pfpu.h
-gfpus.o: ../../software/include/hw/common.h
+gfpus.o: ../../software/include/fpvm/schedulers.h
+gfpus.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
+lnfpus.o: ../../software/include/base/stdlib.h
+lnfpus.o: ../../software/include/base/stdio.h
+lnfpus.o: ../../software/include/base/string.h
+lnfpus.o: ../../software/include/base/assert.h
+lnfpus.o: ../../software/include/fpvm/is.h ../../software/include/fpvm/fpvm.h
+lnfpus.o: ../../software/include/fpvm/pfpu.h
+lnfpus.o: ../../software/include/fpvm/schedulers.h
+lnfpus.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
parser.o: ../../software/include/base/stdio.h
parser.o: ../../software/include/base/stdlib.h
parser.o: ../../software/include/base/assert.h
@@ -1,6 +1,6 @@
/*
* Milkymist SoC (Software)
- * Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
+ * Copyright (C) 2007, 2008, 2009, 2010, 2011 Sebastien Bourdeauducq
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
#include <fpvm/is.h>
#include <fpvm/fpvm.h>
#include <fpvm/pfpu.h>
-#include <fpvm/gfpus.h>
+#include <fpvm/schedulers.h>
#include <hw/pfpu.h>
Oops, something went wrong.

0 comments on commit 0c4c26d

Please sign in to comment.