Permalink
Browse files

Merge branch 'hid' of github.com:milkymist/milkymist into hid

  • Loading branch information...
2 parents b05e7e7 + f0f9e93 commit 7696bf902dc8569ad3a774d6b77e6d35bc8e7be5 @wpwrak wpwrak committed Mar 4, 2012
View
@@ -16,16 +16,16 @@ SW_DIRS=${SDK_DIRS} libhpdmc libfpvm libfpvm/x86-linux libfpvm/lm32-linux bios
CORE_DIRS=ac97 bt656cap conbus dmx fmlbrg fmlmeter hpdmc_ddr32 \
memcard pfpu rc5 softusb sysctl tmu2 uart vgafb
-host:
+tools:
make -C ${BASEDIR}/tools
-bios: host
+bios: tools
make -C ${BASEDIR}/software/bios
-bitstream: host
+bitstream: tools
make -C ${BASEDIR}/boards/${BOARD}/synthesis -f Makefile.${SYNTOOL}
-sdk: host
+sdk: tools
for d in $(SDK_DIRS); do make -C ${BASEDIR}/software/$$d || exit 1; done
load-bitstream: bitstream
@@ -35,7 +35,14 @@ docs:
make -C ${BASEDIR}/doc
for d in $(CORE_DIRS); do make -C ${BASEDIR}/cores/$$d/doc || exit 1; done
-.PHONY: clean load-bitstream
+sdk-install: sdk
+ make -C ${BASEDIR}/software/libfpvm install
+ make -C ${BASEDIR}/softusb-input install
+
+tools-install: tools
+ make -C ${BASEDIR}/tools install
+
+.PHONY: clean load-bitstream tools
clean:
make -C ${BASEDIR}/boards/milkymist-one/synthesis -f common.mak clean
make -C ${BASEDIR}/boards/milkymist-one/standby clean
View
65 README
@@ -10,13 +10,11 @@ For the latest releases, documentation, more information, or to buy a Milkymist
[> Directory Structure
/cores/ Cores library, with Verilog sources, test benches and documentation.
- /boards/ Top-level design files, constraint files and Makefiles
- for supported FPGA boards.
- /software/ Software for the SoC: libraries, bootloader and proof-of-concept renderer.
+ /boards/ Top-level design files, constraint files and glue logic.
+ /software/ Basic software for the SoC: libraries + BIOS.
/softusb-input/ AVR firmware to implement input device support on the softusb core.
/doc/ System documentation.
/tools/ Small tools for developers.
- /patches/ Example patches.
[> Building tools
@@ -45,9 +43,9 @@ loading over the serial line (SFL boot) is provided in the /tools/ directory.
[> Credits
-Most of the work is (C) Copyright 2007, 2008, 2009, 2010, 2011 Sebastien Bourdeauducq.
+Most of the work is (C) Copyright 2007-2012 Sebastien Bourdeauducq.
For this work:
- - The hardware design is licensed under GNU GPLv3.
+ - The gateware design is licensed under GNU GPLv3.
See the LICENSE.GPL file for more information.
- The software (software/*) is licensed under GNU GPLv3, except the SDRAM
initialization runtime (libHPDMC) which is under GNU LGPLv3.
@@ -64,15 +62,14 @@ The SoC design uses:
The directory organization and build scripts were inspired by soc-lm32 by the German
hackerspace Das Labor. Some of the UART and timer code also comes from there.
-The software and software library include:
- - the SoftFloat IEC/IEEE Floating-point Arithmetic Package, Release 2,
- written by John R. Hauser. See source files headers for license.
- - fundamental functions library by Jesus Calvino-Fraga. See the LICENSE.LGPL file.
- - line drawing code from the GD library. See the LICENSE.GD file.
+The software and software library include the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2, written by John R. Hauser.
+See source files headers for license.
Special thanks to the people who did significant things which made this project possible:
- Wolfgang Spraul and Adam Wang for the manufacturing,
- - Michael Walle for QEMU, UrJTAG and OpenOCD,
+ - Werner Almesberger for USB, MIDI and many other improvements,
+ - Michael Walle for QEMU, UrJTAG and OCD,
- Joachim Steiger for the case design,
- Yanjun Luo for the JTAG daughterboard design,
- Yann Sionneau for his work on RTEMS,
@@ -89,47 +86,3 @@ Special thanks to the people who did significant things which made this project
The mailing list devel at lists dot milkymist dot org is the preferred means of contact.
However, if you wish to contact privately the founder of this project:
E-mail: sebastien at milkymist daaht org
-Phone: +33(0)606644335
-PGP: 0x9277FCF2
-
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.9 (GNU/Linux)
-
-mQGiBEnPSIoRBADK2T3lN98btWazmH8Wz8YX6ZY38l9ouq5CgucTYWgljUTB6WMI
-P3LPAKjp+LpaeeHC3C9cJcWqI1AmrcoemqUjeeez1Y9TIPSL4Qy5mp3pEQ/evxYy
-xQ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XL/WSd/zybSEAniuiaCR/7aYk94u06jiQ
-lRHoJGwiAJ9JnmgPtl71/XVNcFxNQqUxVTOvjg==
-=NnZi
------END PGP PUBLIC KEY BLOCK-----
@@ -18,7 +18,7 @@ load: $(BUILDDIR)/system.bit
# Sometimes different options are needed to meet timing
build/system.ncd: build/system.ngd
- cd build && map -ol high -t 2 -w system.ngd
+ cd build && map -ol high -t 20 -w system.ngd
build/system-routed.ncd: build/system.ncd
cd build && par -ol high -w system.ncd system-routed.ncd
@@ -88,9 +88,9 @@ always @(posedge sys_clk) begin
hscan <= 10'd799;
vres <= 10'd480;
- vsync_start <= 10'd491;
- vsync_end <= 10'd493;
- vscan <= 10'd523;
+ vsync_start <= 10'd492;
+ vsync_end <= 10'd494;
+ vscan <= 10'd524;
baseaddress <= {fml_depth{1'b0}};
View
@@ -1,14 +1,23 @@
SOURCES=crt0.S main.c debug.c crc.c libc.c
+INCLUDES=comloc.h crc.h debug.h host.h io.h libc.h progmem.h sie.h timer.h
-all: softusb-input.bin
+all: softusb-input.h
+
+softusb-input.elf: $(SOURCES) $(INCLUDES)
+ avr-gcc -o $@ -mmcu=avr2 -mno-interrupts -Wall -Os $(SOURCES) $(CFLAGS) -nostdlib -Wl,-T -Wl,navre.ld
%.bin: %.elf
avr-objcopy -O binary $< $@
-softusb-input.elf: $(SOURCES) $(wildcard *.h)
- avr-gcc -o softusb-input.elf -mmcu=avr2 -mno-interrupts -Wall -Os $(SOURCES) $(CFLAGS) -nostdlib -Wl,-T -Wl,navre.ld
+softusb-input.h: softusb-input.bin
+ cat $< | xxd -i - $@
+
+install: softusb-input.h
+ test -n "$(RTEMS_MAKEFILE_PATH)"
+ mkdir -p $(RTEMS_MAKEFILE_PATH)/lib/include
+ cp $< $(RTEMS_MAKEFILE_PATH)/lib/include
.PHONY: clean
clean:
- rm -f softusb-input.bin softusb-input.elf
+ rm -f softusb-input.elf softusb-input.bin softusb-input.h
View
@@ -35,7 +35,7 @@ endif
# Toolchain options
#
INCLUDES_NOLIBC ?= -nostdinc -I$(MMDIR)/software/include/base
-INCLUDES = $(INCLUDES_NOLIBC) -I$(MMDIR)/software/include -I$(MMDIR)/tools
+INCLUDES = $(INCLUDES_NOLIBC) -I$(MMDIR) -I$(MMDIR)/software/include -I$(MMDIR)/tools
ASFLAGS = $(INCLUDES) -nostdinc
# later: -Wmissing-prototypes
CFLAGS = -O9 -Wall -Wstrict-prototypes -Wold-style-definition -Wshadow \
View
@@ -48,6 +48,7 @@ static int force_sync;
void uart_isr(void)
{
unsigned int stat = CSR_UART_STAT;
+ CSR_UART_STAT = stat;
if(stat & UART_STAT_RX_EVT) {
rx_buf[rx_produce] = CSR_UART_RXTX;
@@ -62,7 +63,6 @@ void uart_isr(void)
tx_cts = 1;
}
- CSR_UART_STAT = stat;
irq_ack(IRQ_UART);
}
View
@@ -4,7 +4,7 @@ include $(MMDIR)/software/include.mak
OBJECTS=fpvm.o gfpus.o lnfpus.o pfpu.o
-.PHONY: all clean depend install
+.PHONY: all clean install
all: libfpvm.a
@@ -18,27 +18,6 @@ install: all
mkdir -p $(RTEMS_MAKEFILE_PATH)/lib/include/fpvm
cp ../include/fpvm/* $(RTEMS_MAKEFILE_PATH)/lib/include/fpvm
-depend:
- makedepend -Y -- $(CFLAGS) -- *.c
-
clean:
rm -f $(OBJECTS) libfpvm.a
rm -f .*~ *~ Makefile.bak
-
-# DO NOT DELETE
-
-fpvm.o: ../../software/include/base/version.h
-fpvm.o: ../../software/include/fpvm/is.h ../../software/include/fpvm/fpvm.h
-fpvm.o: ../../software/include/fpvm/ast.h
-gfpus.o: ../../software/include/fpvm/is.h ../../software/include/fpvm/fpvm.h
-gfpus.o: ../../software/include/fpvm/ast.h ../../software/include/fpvm/pfpu.h
-gfpus.o: ../../software/include/fpvm/schedulers.h
-gfpus.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
-lnfpus.o: ../../software/include/fpvm/is.h ../../software/include/fpvm/fpvm.h
-lnfpus.o: ../../software/include/fpvm/ast.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
-pfpu.o: ../../software/include/hw/pfpu.h ../../software/include/hw/common.h
-pfpu.o: ../../software/include/fpvm/fpvm.h ../../software/include/fpvm/is.h
-pfpu.o: ../../software/include/fpvm/ast.h ../../software/include/fpvm/pfpu.h
View
@@ -5,19 +5,16 @@ OBJECTS=brd.o dmx.o font8x16.o mem.o pfpu.o snd.o time.o tmu.o ukb.o usb.o vga.o
all: libhal.a
-libhal.a: $(OBJECTS) softusb-input.h
+libhal.a: $(OBJECTS)
$(AR) clr libhal.a $(OBJECTS)
$(RANLIB) libhal.a
-$(MMDIR)/softusb-input/softusb-input.bin:
+$(MMDIR)/softusb-input/softusb-input.h:
$(MAKE) -C $(MMDIR)/softusb-input
-softusb-input.h: $(MMDIR)/softusb-input/softusb-input.bin
- cat $(MMDIR)/softusb-input/softusb-input.bin | xxd -i - softusb-input.h
-
.PHONY: clean depend $(MMDIR)/softusb-input/softusb-input.bin
-depend: softusb-input.h
+depend: $(MMDIR)/softusb-input/softusb-input.h
makedepend -Y -- $(CFLAGS) -- *.c
clean:
@@ -59,7 +56,7 @@ time.o: ../../software/include/base/stdlib.h
time.o: ../../software/include/base/irq.h ../../software/include/base/board.h
time.o: ../../software/include/hw/sysctl.h ../../software/include/hw/common.h
time.o: ../../software/include/hw/interrupts.h
-time.o: ../../software/include/hal/brd.h ../../software/include/hal/time.h
+time.o: ../../software/include/hal/time.h
tmu.o: ../../software/include/base/stdio.h
tmu.o: ../../software/include/base/stdlib.h ../../software/include/base/irq.h
tmu.o: ../../software/include/base/board.h
@@ -79,7 +76,7 @@ usb.o: ../../software/include/hw/interrupts.h
usb.o: ../../software/include/base/uart.h ../../software/include/base/irq.h
usb.o: ../../software/include/base/stdio.h
usb.o: ../../software/include/base/stdlib.h ../../software/include/hal/usb.h
-usb.o: input-comloc.h softusb-input.h
+usb.o: input-comloc.h ../../softusb-input/softusb-input.h
vga.o: ../../software/include/base/stdio.h
vga.o: ../../software/include/base/stdlib.h
vga.o: ../../software/include/base/string.h
View
@@ -1,6 +1,6 @@
/*
* Milkymist SoC (Software)
- * Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
+ * Copyright (C) 2007, 2008, 2009, 2010, 2012 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
@@ -27,7 +27,7 @@
#include "input-comloc.h"
static const unsigned char input_firmware[] = {
-#include "softusb-input.h"
+#include <softusb-input/softusb-input.h>
};
static int debug_enable;
@@ -173,4 +173,3 @@ void usb_isr(void)
keyboard_consume = (keyboard_consume + 1) & 0x07;
}
}
-
View
@@ -276,9 +276,9 @@ void vga_set_mode(int mode)
CSR_VGA_HSYNC_END = 752;
CSR_VGA_HSCAN = 799;
CSR_VGA_VRES = 480;
- CSR_VGA_VSYNC_START = 491;
- CSR_VGA_VSYNC_END = 493;
- CSR_VGA_VSCAN = 523;
+ CSR_VGA_VSYNC_START = 492;
+ CSR_VGA_VSYNC_END = 494;
+ CSR_VGA_VSCAN = 524;
CSR_VGA_CLKSEL = 0;
break;
case VGA_MODE_800_600: // Pixel clock: 50MHz
@@ -289,9 +289,9 @@ void vga_set_mode(int mode)
CSR_VGA_HSYNC_END = 976;
CSR_VGA_HSCAN = 1040;
CSR_VGA_VRES = 600;
- CSR_VGA_VSYNC_START = 637;
- CSR_VGA_VSYNC_END = 643;
- CSR_VGA_VSCAN = 666;
+ CSR_VGA_VSYNC_START = 636;
+ CSR_VGA_VSYNC_END = 642;
+ CSR_VGA_VSCAN = 665;
CSR_VGA_CLKSEL = 1;
break;
case VGA_MODE_1024_768: // Pixel clock: 65MHz
@@ -302,9 +302,9 @@ void vga_set_mode(int mode)
CSR_VGA_HSYNC_END = 1184;
CSR_VGA_HSCAN = 1344;
CSR_VGA_VRES = 768;
- CSR_VGA_VSYNC_START = 771;
- CSR_VGA_VSYNC_END = 777;
- CSR_VGA_VSCAN = 806;
+ CSR_VGA_VSYNC_START = 772;
+ CSR_VGA_VSYNC_END = 778;
+ CSR_VGA_VSCAN = 807;
CSR_VGA_CLKSEL = 2;
break;
}
@@ -2,6 +2,5 @@
make -C libbase depend
make -C libhal depend
-make -C libfpvm depend
make -C libnet depend
make -C bios depend

0 comments on commit 7696bf9

Please sign in to comment.