armadeus-commitlog Mailing List for armadeus (Page 150)
Brought to you by:
sszy
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(8) |
Mar
(7) |
Apr
(8) |
May
(14) |
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(18) |
Oct
(19) |
Nov
(52) |
Dec
(30) |
| 2008 |
Jan
(6) |
Feb
(6) |
Mar
(15) |
Apr
(22) |
May
(13) |
Jun
(11) |
Jul
(41) |
Aug
(10) |
Sep
(14) |
Oct
(21) |
Nov
(4) |
Dec
(66) |
| 2009 |
Jan
(67) |
Feb
(57) |
Mar
(90) |
Apr
(54) |
May
(64) |
Jun
(76) |
Jul
(14) |
Aug
(18) |
Sep
(18) |
Oct
(20) |
Nov
(15) |
Dec
(36) |
| 2010 |
Jan
(28) |
Feb
(25) |
Mar
(32) |
Apr
(23) |
May
(22) |
Jun
(62) |
Jul
(36) |
Aug
(16) |
Sep
(12) |
Oct
(20) |
Nov
(44) |
Dec
(25) |
| 2011 |
Jan
(36) |
Feb
(49) |
Mar
(28) |
Apr
(38) |
May
(26) |
Jun
(52) |
Jul
(33) |
Aug
(32) |
Sep
(19) |
Oct
(26) |
Nov
(13) |
Dec
(32) |
| 2012 |
Jan
(38) |
Feb
(34) |
Mar
(91) |
Apr
(35) |
May
(31) |
Jun
(72) |
Jul
(23) |
Aug
(13) |
Sep
(33) |
Oct
(47) |
Nov
(18) |
Dec
(22) |
| 2013 |
Jan
(31) |
Feb
(22) |
Mar
(26) |
Apr
(11) |
May
(38) |
Jun
(15) |
Jul
(37) |
Aug
(68) |
Sep
(34) |
Oct
(11) |
Nov
(26) |
Dec
(31) |
| 2014 |
Jan
(60) |
Feb
(55) |
Mar
(21) |
Apr
(31) |
May
(17) |
Jun
(35) |
Jul
(24) |
Aug
(17) |
Sep
(11) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(15) |
Feb
(34) |
Mar
(46) |
Apr
(23) |
May
(12) |
Jun
(14) |
Jul
(18) |
Aug
(22) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(6) |
| 2016 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
(10) |
May
(17) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
(22) |
Oct
(8) |
Nov
(9) |
Dec
(5) |
| 2017 |
Jan
(11) |
Feb
(12) |
Mar
(27) |
Apr
(9) |
May
(1) |
Jun
(5) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
(10) |
Nov
(4) |
Dec
(6) |
| 2018 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(7) |
May
(10) |
Jun
(9) |
Jul
(21) |
Aug
(13) |
Sep
(10) |
Oct
(4) |
Nov
(6) |
Dec
(1) |
| 2019 |
Jan
(6) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(19) |
Jun
(14) |
Jul
(18) |
Aug
(3) |
Sep
(5) |
Oct
(7) |
Nov
(8) |
Dec
(4) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(7) |
May
(2) |
Jun
(18) |
Jul
(3) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
| 2021 |
Jan
(9) |
Feb
(6) |
Mar
(4) |
Apr
(11) |
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(9) |
Nov
(5) |
Dec
|
| 2022 |
Jan
(2) |
Feb
(12) |
Mar
(3) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2023 |
Jan
(5) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(11) |
Dec
(7) |
| 2025 |
Jan
(3) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2026 |
Jan
(3) |
Feb
(7) |
Mar
(3) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ar...@us...> - 2007-06-04 09:11:20
|
Revision: 604
http://armadeus.svn.sourceforge.net/armadeus/?rev=604&view=rev
Author: artemys
Date: 2007-06-04 02:11:13 -0700 (Mon, 04 Jun 2007)
Log Message:
-----------
[BUILDROOT] Adding Lua package, thanks to Benoit
Added Paths:
-----------
trunk/buildroot/package/lua/
trunk/buildroot/package/lua/Config.in
trunk/buildroot/package/lua/lua.mk
trunk/patches/019-buildroot-lua.diff
Added: trunk/buildroot/package/lua/Config.in
===================================================================
--- trunk/buildroot/package/lua/Config.in (rev 0)
+++ trunk/buildroot/package/lua/Config.in 2007-06-04 09:11:13 UTC (rev 604)
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LUA
+ bool "lua"
+ default n
+ select BR2_READLINE
+ select BR2_PACKAGE_NCURSES
+ help
+ Build Lua which is a powerful, fast, light-weight, embeddable scripting language.
+ http://www.lua.org/
+
Added: trunk/buildroot/package/lua/lua.mk
===================================================================
--- trunk/buildroot/package/lua/lua.mk (rev 0)
+++ trunk/buildroot/package/lua/lua.mk 2007-06-04 09:11:13 UTC (rev 604)
@@ -0,0 +1,48 @@
+#############################################################
+#
+# Lua scripting language
+#
+#############################################################
+LUA_VER=-5.1.2
+LUA_SOURCE=lua$(LUA_VER).tar.gz
+LUA_SITE=http://www.lua.org/ftp/
+LUA_DIR:=$(BUILD_DIR)/lua$(LUA_VER)
+LUA_BINARY:=lua
+LUA_TARGET_BINARY:=usr/bin/lua
+
+$(DL_DIR)/$(LUA_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LUA_SITE)/$(LUA_SOURCE)
+
+lua-source: $(DL_DIR)/$(LUA_SOURCE)
+
+$(LUA_DIR)/.unpacked: $(DL_DIR)/$(LUA_SOURCE)
+ rm -rf $(LUA_DIR)
+ zcat $(DL_DIR)/$(LUA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@
+
+$(LUA_DIR)/.configured: $(LUA_DIR)/.unpacked
+ touch $@
+
+$(LUA_DIR)/$(LUA_BINARY): $(LUA_DIR)/.configured
+ $(MAKE) linux -C $(LUA_DIR) ARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS) CFLAGS=-I$(STAGING_DIR)/usr/include MYLDFLAGS=-Wl,-E,-L$(TARGET_DIR)/lib/ CC=$(TARGET_CROSS)gcc
+
+$(TARGET_DIR)/$(LUA_TARGET_BINARY): $(LUA_DIR)/$(LUA_BINARY)
+ cp -f $(BUILD_DIR)/lua$(LUA_VER)/src/lua $@
+
+lua: uclibc readline-target ncurses $(TARGET_DIR)/$(LUA_TARGET_BINARY)
+
+lua-clean:
+ -$(MAKE) -C $(LUA_DIR) clean
+
+lua-dirclean:
+ rm -rf $(LUA_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LUA)),y)
+TARGETS+=lua
+endif
+
Added: trunk/patches/019-buildroot-lua.diff
===================================================================
--- trunk/patches/019-buildroot-lua.diff (rev 0)
+++ trunk/patches/019-buildroot-lua.diff 2007-06-04 09:11:13 UTC (rev 604)
@@ -0,0 +1,10 @@
+--- buildroot/package/Config.in.old 2007-06-04 11:01:58.000000000 +0200
++++ buildroot/package/Config.in 2007-06-04 11:02:46.000000000 +0200
+@@ -86,6 +86,7 @@
+ source "package/ltp-testsuite/Config.in"
+ source "package/ltrace/Config.in"
+ source "package/ltt/Config.in"
++source "package/lua/Config.in"
+ source "package/lvm2/Config.in"
+ source "package/lzo/Config.in"
+ source "package/lzma/Config.in"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-19 21:31:40
|
Revision: 603
http://armadeus.svn.sourceforge.net/armadeus/?rev=603&view=rev
Author: artemys
Date: 2007-05-19 14:31:41 -0700 (Sat, 19 May 2007)
Log Message:
-----------
[BUILDROOT] Allegro integration part 2 (still needs to be static library)
Modified Paths:
--------------
trunk/buildroot/package/allegro/allegro.mk
trunk/patches/004-Buildroot-defconfig.diff
Added Paths:
-----------
trunk/patches/018-buildroot-allegro.diff
Modified: trunk/buildroot/package/allegro/allegro.mk
===================================================================
--- trunk/buildroot/package/allegro/allegro.mk 2007-05-16 20:19:34 UTC (rev 602)
+++ trunk/buildroot/package/allegro/allegro.mk 2007-05-19 21:31:41 UTC (rev 603)
@@ -5,12 +5,12 @@
#############################################################
ALLEGRO_VERSION:=4.2.1
ALLEGRO_SOURCE:=allegro-$(ALLEGRO_VERSION).tar.gz
-ALLEGRO_SITE:=http://prdownloads.sourceforge.net/alleg/
+ALLEGRO_SITE:=http://dfn.dl.sourceforge.net/sourceforge/alleg/
ALLEGRO_CAT:=zcat
ALLEGRO_DIR:=$(BUILD_DIR)/allegro-$(ALLEGRO_VERSION)
$(DL_DIR)/$(ALLEGRO_SOURCE):
- $(WGET) -P $(DL_DIR) $(ALLEGRO_SITE)/$(ALLEGRO_SOURCE)?download
+ $(WGET) -P $(DL_DIR) $(ALLEGRO_SITE)/$(ALLEGRO_SOURCE)
allegro-source: $(DL_DIR)/$(ALLEGRO_SOURCE)
@@ -44,19 +44,19 @@
# --disable-color24 \
# --disable-color32 \
-$(ALLEGRO_DIR)/.compiled: $(ALLEGRO_DIR)/.configured
+$(ALLEGRO_DIR)/lib/unix/liballeg.a: $(ALLEGRO_DIR)/.configured
$(MAKE) -C $(ALLEGRO_DIR) CROSSCOMPILE=1
touch $@
-# $(STAGING_DIR)/usr/lib/libSDL_net.so: $(ALLEGRO_DIR)/.compiled
-# $(MAKE) -C $(ALLEGRO_DIR) install
-# touch -c $@
+#$(STAGING_DIR)/usr/lib/liballeg.so: $(ALLEGRO_DIR)/lib/unix/liballeg.a
+# $(MAKE) -C $(ALLEGRO_DIR) install
+# touch -c $@
#
-# $(TARGET_DIR)/usr/lib/libSDL_net.so: $(STAGING_DIR)/usr/lib/libSDL_net.so
-# cp -dpf $(STAGING_DIR)/usr/lib/libSDL_net*.so* $(TARGET_DIR)/usr/lib/
-# -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_net.so
+# $(TARGET_DIR)/usr/lib/liballeg.so.so: $(STAGING_DIR)/usr/lib/liballeg.so
+# cp -dpf $(STAGING_DIR)/usr/lib/liballeg*.so* $(TARGET_DIR)/usr/lib/
+# -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/liballeg.so
-ALLEGRO allegro: uclibc $(ALLEGRO_DIR)/.compiled
+ALLEGRO allegro: $(ALLEGRO_DIR)/lib/unix/liballeg.a
allegro-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(ALLEGRO_DIR) uninstall
Modified: trunk/patches/004-Buildroot-defconfig.diff
===================================================================
--- trunk/patches/004-Buildroot-defconfig.diff 2007-05-16 20:19:34 UTC (rev 602)
+++ trunk/patches/004-Buildroot-defconfig.diff 2007-05-19 21:31:41 UTC (rev 603)
@@ -1,6 +1,6 @@
--- buildroot/.defconfig.ori 2006-10-20 09:15:14.000000000 +0200
+++ buildroot/.defconfig 2006-10-24 22:15:00.000000000 +0200
-@@ -2,55 +2,426 @@
+@@ -2,55 +2,427 @@
# Automatically generated make config: don't edit
#
BR2_HAVE_DOT_CONFIG=y
@@ -224,6 +224,7 @@
+# Other stuff
+#
+# BR2_PACKAGE_ACPID is not set
++# BR2_PACKAGE_ALLEGRO is not set
+# BR2_PACKAGE_ASTERISK is not set
+# BR2_PACKAGE_AT is not set
+# BR2_PACKAGE_AUTOCONF is not set
Added: trunk/patches/018-buildroot-allegro.diff
===================================================================
--- trunk/patches/018-buildroot-allegro.diff (rev 0)
+++ trunk/patches/018-buildroot-allegro.diff 2007-05-19 21:31:41 UTC (rev 603)
@@ -0,0 +1,10 @@
+--- buildroot.ori/package/Config.in 2007-05-19 19:06:19.000000000 +0200
++++ buildroot/package/Config.in 2007-05-19 19:06:46.000000000 +0200
+@@ -25,6 +25,7 @@
+
+ comment "Other stuff"
+ source "package/acpid/Config.in"
++source "package/allegro/Config.in"
+ source "package/asterisk/Config.in"
+ source "package/at/Config.in"
+ source "package/autoconf/Config.in"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-16 20:20:06
|
Revision: 602
http://armadeus.svn.sourceforge.net/armadeus/?rev=602&view=rev
Author: artemys
Date: 2007-05-16 13:19:34 -0700 (Wed, 16 May 2007)
Log Message:
-----------
[LINUX] Remove flickering for Microtips LCD
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-16 09:05:33 UTC (rev 601)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-16 20:19:34 UTC (rev 602)
@@ -1225,7 +1225,7 @@
+ .lower_margin = 23,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
-+ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
++ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(6),
+ .pwmr = 0x000001ff, // Contrast with PWM @ Line_Pulse, max by default
+ .dmacr = DMACR_BURST | DMACR_HM(8) | DMACR_TM(4),
+ .backlight_power = apf9328_lcd_backlight_power,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ca...@us...> - 2007-05-16 09:05:34
|
Revision: 601
http://armadeus.svn.sourceforge.net/armadeus/?rev=601&view=rev
Author: carbure
Date: 2007-05-16 02:05:33 -0700 (Wed, 16 May 2007)
Log Message:
-----------
PDF outputs for our boards datasheet
Modified Paths:
--------------
trunk/software/demos/ApfDacClientServer/src/Client/ApfClient.qrc
trunk/software/demos/ApfDacClientServer/src/Client/ApfHostSelectDialog.ui
trunk/software/demos/ApfDacClientServer/src/Client/Vmeters.ui
Modified: trunk/software/demos/ApfDacClientServer/src/Client/ApfClient.qrc
===================================================================
--- trunk/software/demos/ApfDacClientServer/src/Client/ApfClient.qrc 2007-05-13 19:13:43 UTC (rev 600)
+++ trunk/software/demos/ApfDacClientServer/src/Client/ApfClient.qrc 2007-05-16 09:05:33 UTC (rev 601)
@@ -1 +1,5 @@
-<RCC/>
+<RCC>
+ <qresource prefix="/new/prefix1" >
+ <file>vmeter.png</file>
+ </qresource>
+</RCC>
Modified: trunk/software/demos/ApfDacClientServer/src/Client/ApfHostSelectDialog.ui
===================================================================
--- trunk/software/demos/ApfDacClientServer/src/Client/ApfHostSelectDialog.ui 2007-05-13 19:13:43 UTC (rev 600)
+++ trunk/software/demos/ApfDacClientServer/src/Client/ApfHostSelectDialog.ui 2007-05-16 09:05:33 UTC (rev 601)
@@ -1,7 +1,4 @@
<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
<class>ApfHostSelectDialog</class>
<widget class="QDialog" name="ApfHostSelectDialog" >
<property name="geometry" >
@@ -58,6 +55,9 @@
<property name="text" >
<string>&Ok</string>
</property>
+ <property name="default" >
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item>
@@ -130,7 +130,7 @@
</item>
<item>
<property name="text" >
- <string>192.168.1.30</string>
+ <string>192.168.2.30</string>
</property>
</item>
</widget>
@@ -142,7 +142,6 @@
</item>
</layout>
</widget>
- <pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>
Modified: trunk/software/demos/ApfDacClientServer/src/Client/Vmeters.ui
===================================================================
--- trunk/software/demos/ApfDacClientServer/src/Client/Vmeters.ui 2007-05-13 19:13:43 UTC (rev 600)
+++ trunk/software/demos/ApfDacClientServer/src/Client/Vmeters.ui 2007-05-16 09:05:33 UTC (rev 601)
@@ -71,7 +71,7 @@
<enum>Qt::RichText</enum>
</property>
<property name="pixmap" >
- <pixmap>../../../../../../../fred/LocalProjects/ApfQtDemos/Client/bin/vmeter.png</pixmap>
+ <pixmap>vmeter.png</pixmap>
</property>
<property name="scaledContents" >
<bool>true</bool>
@@ -126,7 +126,7 @@
<string/>
</property>
<property name="pixmap" >
- <pixmap>../../../../../../../fred/LocalProjects/ApfQtDemos/Client/bin/vmeter.png</pixmap>
+ <pixmap>vmeter.png</pixmap>
</property>
<property name="scaledContents" >
<bool>true</bool>
@@ -207,7 +207,6 @@
</item>
</layout>
</widget>
- <includes/>
<resources>
<include location="ApfClient.qrc" />
</resources>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-13 19:13:47
|
Revision: 600
http://armadeus.svn.sourceforge.net/armadeus/?rev=600&view=rev
Author: artemys
Date: 2007-05-13 12:13:43 -0700 (Sun, 13 May 2007)
Log Message:
-----------
[LINUX] Adding of backlight support for i.MXL (part2)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
trunk/target/linux/modules/Kconfig
trunk/target/linux/modules/backlight/Makefile
trunk/target/linux/modules/backlight/imx_bl.c
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/072-linux-2.6.18-add-backlight-imxfb.diff
trunk/target/linux/modules/backlight/Kconfig
trunk/target/linux/modules/backlight/test/
trunk/target/linux/modules/backlight/test/test_backlight.sh
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-13 12:37:23 UTC (rev 599)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-13 19:13:43 UTC (rev 600)
@@ -810,7 +810,7 @@
diff -urN linux-2.6.18.1/arch/arm/mach-imx/apf9328.c linux-2.6.18.1.mod/arch/arm/mach-imx/apf9328.c
--- linux-2.6.18.1/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.18.1.mod/arch/arm/mach-imx/apf9328.c 2007-01-07 21:39:30.000000000 +0100
-@@ -0,0 +1,326 @@
+@@ -0,0 +1,349 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -842,7 +842,7 @@
+
+#include <asm/system.h>
+#include <asm/hardware.h>
-+#include <asm/irq.h>
++#include <linux/irq.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+
@@ -865,6 +865,9 @@
+#ifdef CONFIG_SPI_IMX_MODULE
+#define CONFIG_SPI_IMX 1
+#endif
++#ifdef CONFIG_IMX_BACKLIGHT_MODULE
++#define CONFIG_IMX_BACKLIGHT 1
++#endif
+
+// --- ETHERNET RESSOURCE ---
+#ifdef CONFIG_DM9000
@@ -1012,7 +1015,7 @@
+};
+#endif //CONFIG_SPI_IMX
+
-+#ifdef CONFIG_SENSORS_MAX1027_MODULE
++#ifdef CONFIG_SENSORS_MAX1027
+#define IMX_SPI1_SS_PIN 15
+#define IMX_SPI1_SS (1<<15)
+static void max1027_init_cs(void)
@@ -1044,7 +1047,7 @@
+ .mode = 0,
+},
+};
-+#endif // CONFIG_SENSORS_MAX1027_MODULE
++#endif // CONFIG_SENSORS_MAX1027
+
+// --- LCD RESSOURCE ---
+#ifdef CONFIG_FB_IMX
@@ -1053,6 +1056,23 @@
+#define IMX_FB_PHYS (0x0C000000 - 0x40000)
+#endif // CONFIG_FB_IMX
+
++#ifdef CONFIG_IMX_BACKLIGHT
++static struct imxbl_machinfo imx_bl_machinfo = {
++ .max_intensity = 0xff,
++ .default_intensity = 0x90,
++ .limit_mask = 0x7f, // When battery is low
++// set_bl_intensity = put a function here if you want to overload default one,
++};
++//extern struct platform_device imxfb_device; // filled in generic.c
++static struct platform_device imxbl_device = {
++ .name = "imxl-bl",
++ .dev = {
++// .parent = &imxfb_device.dev, crash kernel even if EXPORT_SYMBOL() is done in generic.c
++ .platform_data = &imx_bl_machinfo,
++ },
++ .id = 0,
++};
++#endif // CONFIG_IMX_BACKLIGHT
+
+static struct platform_device *devices[] __initdata = {
+ &imx_uart1_device,
@@ -1064,6 +1084,9 @@
+ &imx_spi,
+#endif //CONFIG_SPI_IMX
+ &imx_pwm_device,
++#ifdef CONFIG_IMX_BACKLIGHT
++ &imxbl_device,
++#endif // CONFIG_IMX_BACKLIGHT
+};
+
+static void __init apf9328_init(void)
@@ -1081,14 +1104,14 @@
+ imx_fb_set_gpios();
+#endif // CONFIG_FB_IMX
+
-+#ifdef CONFIG_SENSORS_MAX1027_MODULE
++#ifdef CONFIG_SENSORS_MAX1027
+ max1027_init_cs();
-+#endif //CONFIG_SENSORS_MAX1027_MODULE
++#endif //CONFIG_SENSORS_MAX1027
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
-+#ifdef CONFIG_SENSORS_MAX1027_MODULE
++#ifdef CONFIG_SENSORS_MAX1027
+ spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
-+#endif // CONFIG_SENSORS_MAX1027_MODULE
++#endif // CONFIG_SENSORS_MAX1027
+ printk("--- APF9328 ressources registered\n");
+}
+
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/072-linux-2.6.18-add-backlight-imxfb.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/072-linux-2.6.18-add-backlight-imxfb.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/072-linux-2.6.18-add-backlight-imxfb.diff 2007-05-13 19:13:43 UTC (rev 600)
@@ -0,0 +1,15 @@
+--- linux-2.6.18.1/include/asm-arm/arch-imx/imxfb.h 2006-10-14 05:34:03.000000000 +0200
++++ linux-2.6.18.1.backlight/include/asm-arm/arch-imx/imxfb.h 2007-05-12 17:29:30.000000000 +0200
+@@ -34,3 +34,12 @@
+ void (*backlight_power)(int);
+ };
+ void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info);
++
++// --- Backlight handling ---
++struct imxbl_machinfo {
++ int max_intensity;
++ int default_intensity;
++ int limit_mask; // When battery is low
++ void (*set_bl_intensity)(int intensity);
++};
++extern void imxbl_limit_intensity(int limit);
Modified: trunk/target/linux/modules/Kconfig
===================================================================
--- trunk/target/linux/modules/Kconfig 2007-05-13 12:37:23 UTC (rev 599)
+++ trunk/target/linux/modules/Kconfig 2007-05-13 19:13:43 UTC (rev 600)
@@ -28,7 +28,12 @@
source "drivers/armadeus/ps2keyboard/Kconfig"
+comment "Handheld related"
+ depends on ARMADEUS_DRIVERS
+
source "drivers/armadeus/pwm/Kconfig"
+source "drivers/armadeus/backlight/Kconfig"
+
endmenu
Added: trunk/target/linux/modules/backlight/Kconfig
===================================================================
--- trunk/target/linux/modules/backlight/Kconfig (rev 0)
+++ trunk/target/linux/modules/backlight/Kconfig 2007-05-13 19:13:43 UTC (rev 600)
@@ -0,0 +1,11 @@
+#
+#
+
+config IMX_BACKLIGHT
+ tristate "i.MXL backlight driver"
+ default n
+ depends on ARMADEUS_DRIVERS && BACKLIGHT_LCD_SUPPORT
+ ---help---
+ This driver allows you to control the backlight of your graphic LCD, if it's
+ connected to the i.MXL "CONTRAST" pin.
+
Modified: trunk/target/linux/modules/backlight/Makefile
===================================================================
--- trunk/target/linux/modules/backlight/Makefile 2007-05-13 12:37:23 UTC (rev 599)
+++ trunk/target/linux/modules/backlight/Makefile 2007-05-13 19:13:43 UTC (rev 600)
@@ -5,10 +5,8 @@
# Part executed when called from kernel build system:
ifneq ($(KERNELRELEASE),)
-obj-m += imx_bl.o
+obj-$(CONFIG_IMX_BACKLIGHT) += imx_bl.o
-#watchdog-objs := imx_watchdog.o
-
# Part executed when called from standard make in this directory:
# (preferably use Makefile in parent directory)
else
Modified: trunk/target/linux/modules/backlight/imx_bl.c
===================================================================
--- trunk/target/linux/modules/backlight/imx_bl.c 2007-05-13 12:37:23 UTC (rev 599)
+++ trunk/target/linux/modules/backlight/imx_bl.c 2007-05-13 19:13:43 UTC (rev 600)
@@ -18,10 +18,10 @@
#include <linux/mutex.h>
#include <linux/fb.h>
#include <linux/backlight.h>
-#include <asm/arch/sharpsl.h> --> do the same in asm-arm/arch-imx !!
+#include <asm/arch/imxfb.h> // Backlight machinfo struct is defined here
#include <asm/arch/imx-regs.h>
-// #include <asm/hardware/sharpsl_pm.h>
+
static int imxbl_intensity;
static DEFINE_MUTEX(bl_mutex);
static struct backlight_properties imxbl_data;
@@ -34,8 +34,8 @@
static int imxbl_send_intensity(struct backlight_device *bd)
{
- void (*imx_kick_batt)(void);
int intensity = bd->props->brightness;
+ unsigned long shadow = 0;
if (bd->props->power != FB_BLANK_UNBLANK)
intensity = 0;
@@ -47,18 +47,19 @@
intensity &= bl_machinfo->limit_mask;
mutex_lock(&bl_mutex);
- //bl_machinfo->set_bl_intensity(intensity);
- //LCDC_PWMR = ....;
+ if( bl_machinfo->set_bl_intensity ) {
+ bl_machinfo->set_bl_intensity(intensity);
+ } else {
+ shadow = LCDC_PWMR;
+ shadow &= 0xffffff00;
+ shadow |= PWMR_PW(intensity);
+ LCDC_PWMR = shadow;
+ printk("Setting backlight intensity to %d\n", intensity);
+ }
mutex_unlock(&bl_mutex);
imxbl_intensity = intensity;
-/* imx_kick_batt = symbol_get(sharpsl_battery_kick);
- if (imx_kick_batt) {
- imx_kick_batt();
- symbol_put(sharpsl_battery_kick);
- }
-*/
return 0;
}
@@ -113,7 +114,7 @@
.update_status = imxbl_set_intensity,
};
-static int __init imxbl_probe(struct platform_device *pdev)
+static int imxbl_probe(struct platform_device *pdev)
{
struct imxbl_machinfo *machinfo = pdev->dev.platform_data;
@@ -125,7 +126,10 @@
imx_backlight_device = backlight_device_register ("imxl-bl",
NULL, &imxbl_data);
if (IS_ERR (imx_backlight_device))
+ {
+ printk("Error imxBL\n");
return PTR_ERR (imx_backlight_device);
+ }
imxbl_data.power = FB_BLANK_UNBLANK;
imxbl_data.brightness = machinfo->default_intensity;
@@ -155,12 +159,12 @@
static int __init imxbl_init(void)
{
- return platform_driver_register(&imxbl_driver);
+ return platform_driver_register(&imxbl_driver);
}
static void __exit imxbl_exit(void)
{
- platform_driver_unregister(&imxbl_driver);
+ platform_driver_unregister(&imxbl_driver);
}
module_init(imxbl_init);
@@ -168,4 +172,4 @@
MODULE_AUTHOR("Julien Boibessot <jul...@ar...>");
MODULE_DESCRIPTION("i.MXL Backlight Driver");
-MODULE_LICENSE("GPLv2");
+MODULE_LICENSE("GPL");
Added: trunk/target/linux/modules/backlight/test/test_backlight.sh
===================================================================
--- trunk/target/linux/modules/backlight/test/test_backlight.sh (rev 0)
+++ trunk/target/linux/modules/backlight/test/test_backlight.sh 2007-05-13 19:13:43 UTC (rev 600)
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+failed()
+{
+ echo "Test FAILED !"
+ exit 1
+}
+
+BL_SYS_DIR="/sys/class/backlight/imxl-bl/"
+
+# Save actual brightness
+ACTUAL=`cat "$BL_SYS_DIR/actual_brightness"`
+for INTENSITY in 300 255 200 150 100 50 25 0; do
+ echo "Setting brightness to: $INTENSITY"
+ echo "$INTENSITY" > "$BL_SYS_DIR/brightness"
+ SET=`cat "$BL_SYS_DIR/actual_brightness"`
+ if [ "$SET" != "$INTENSITY" ]; then
+ echo "Values differ, written: $INTENSITY read: $SET"
+ if [ "$INTENSITY" != "300" ]; then
+ failed
+ fi
+ fi
+ sleep 1
+done
+# Restore brightness
+echo "$ACTUAL" > "$BL_SYS_DIR/brightness"
+
+exit 0
\ No newline at end of file
Property changes on: trunk/target/linux/modules/backlight/test/test_backlight.sh
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-13 12:37:21
|
Revision: 599
http://armadeus.svn.sourceforge.net/armadeus/?rev=599&view=rev
Author: artemys
Date: 2007-05-13 05:37:23 -0700 (Sun, 13 May 2007)
Log Message:
-----------
[LINUX] Should correct Bug 1701141: iMX SPI driver does not work when compiled as module
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-13 09:04:12 UTC (rev 598)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-13 12:37:23 UTC (rev 599)
@@ -810,7 +810,7 @@
diff -urN linux-2.6.18.1/arch/arm/mach-imx/apf9328.c linux-2.6.18.1.mod/arch/arm/mach-imx/apf9328.c
--- linux-2.6.18.1/arch/arm/mach-imx/apf9328.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.18.1.mod/arch/arm/mach-imx/apf9328.c 2007-01-07 21:39:30.000000000 +0100
-@@ -0,0 +1,319 @@
+@@ -0,0 +1,326 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -859,6 +859,13 @@
+
+#include "generic.h"
+
++#ifdef CONFIG_SENSORS_MAX1027_MODULE
++#define CONFIG_SENSORS_MAX1027 1
++#endif
++#ifdef CONFIG_SPI_IMX_MODULE
++#define CONFIG_SPI_IMX 1
++#endif
++
+// --- ETHERNET RESSOURCE ---
+#ifdef CONFIG_DM9000
+static struct resource dm9000_resources[] = {
@@ -1008,7 +1015,7 @@
+#ifdef CONFIG_SENSORS_MAX1027_MODULE
+#define IMX_SPI1_SS_PIN 15
+#define IMX_SPI1_SS (1<<15)
-+static void max1027_init_cs()
++static void max1027_init_cs(void)
+{
+ // SPI CSn is used as chip select but in GPIO mode
+ OCR1(2) |= 3<<(IMX_SPI1_SS_PIN*2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-13 09:04:12
|
Revision: 598
http://armadeus.svn.sourceforge.net/armadeus/?rev=598&view=rev
Author: artemys
Date: 2007-05-13 02:04:12 -0700 (Sun, 13 May 2007)
Log Message:
-----------
[FIRMWARE] Add 400k gates Spartan3 bitfile for PS/2 controller
Added Paths:
-----------
trunk/firmware/PS2/ps2_top_400k.bit
Added: trunk/firmware/PS2/ps2_top_400k.bit
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/PS2/ps2_top_400k.bit
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-11 17:11:57
|
Revision: 597
http://armadeus.svn.sourceforge.net/armadeus/?rev=597&view=rev
Author: artemys
Date: 2007-05-11 10:11:58 -0700 (Fri, 11 May 2007)
Log Message:
-----------
[LINUX] First step in i.MXL backlight driver integration
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/050-linux-2.6.18-armadeus-kconfig.diff
trunk/target/linux/modules/Makefile
Added Paths:
-----------
trunk/target/linux/modules/backlight/
trunk/target/linux/modules/backlight/Makefile
trunk/target/linux/modules/backlight/imx_bl.c
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/050-linux-2.6.18-armadeus-kconfig.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/050-linux-2.6.18-armadeus-kconfig.diff 2007-05-11 16:40:58 UTC (rev 596)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/050-linux-2.6.18-armadeus-kconfig.diff 2007-05-11 17:11:58 UTC (rev 597)
@@ -11,7 +11,7 @@
--- linux-2.6.18.1/drivers/Makefile.org 2007-05-09 10:48:51.000000000 +0200
+++ linux-2.6.18.1/drivers/Makefile 2007-05-09 10:57:09.000000000 +0200
@@ -76,3 +76,4 @@
- obj-$(CONFIG_SUPERH) += sh/
- obj-$(CONFIG_GENERIC_TIME) += clocksource/
- obj-$(CONFIG_DMA_ENGINE) += dma/
-+obj-y += armadeus/
+ obj-$(CONFIG_SUPERH) += sh/
+ obj-$(CONFIG_GENERIC_TIME) += clocksource/
+ obj-$(CONFIG_DMA_ENGINE) += dma/
++obj-$(CONFIG_ARMADEUS_DRIVERS) += armadeus/
Modified: trunk/target/linux/modules/Makefile
===================================================================
--- trunk/target/linux/modules/Makefile 2007-05-11 16:40:58 UTC (rev 596)
+++ trunk/target/linux/modules/Makefile 2007-05-11 17:11:58 UTC (rev 597)
@@ -7,7 +7,7 @@
# Part executed when called from kernel build system:
ifneq ($(KERNELRELEASE),)
-obj-m += gpio/ ps2keyboard/ fpga_devtools/ pwm/
+obj-$(CONFIG_ARMADEUS_DRIVERS) += gpio/ ps2keyboard/ fpga_devtools/ pwm/ backlight/
# Part execute when called from standard make in this directory:
else
Added: trunk/target/linux/modules/backlight/Makefile
===================================================================
--- trunk/target/linux/modules/backlight/Makefile (rev 0)
+++ trunk/target/linux/modules/backlight/Makefile 2007-05-11 17:11:58 UTC (rev 597)
@@ -0,0 +1,31 @@
+#
+# Makefile for the i.MXL backlight driver
+#
+
+# Part executed when called from kernel build system:
+ifneq ($(KERNELRELEASE),)
+
+obj-m += imx_bl.o
+
+#watchdog-objs := imx_watchdog.o
+
+# Part executed when called from standard make in this directory:
+# (preferably use Makefile in parent directory)
+else
+
+BASE_DIR="../../../../buildroot/"
+REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
+ sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
+ARMADEUS_KERNEL_DIR=$(BASE_DIR)build_arm_nofpu/linux-$(REL)
+KDIR := $(ARMADEUS_KERNEL_DIR)
+PWD := $(shell pwd)
+
+default:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+
+clean:
+ rm -f *.*o \
+ rm -f Module.symvers
+
+endif
+
Added: trunk/target/linux/modules/backlight/imx_bl.c
===================================================================
--- trunk/target/linux/modules/backlight/imx_bl.c (rev 0)
+++ trunk/target/linux/modules/backlight/imx_bl.c 2007-05-11 17:11:58 UTC (rev 597)
@@ -0,0 +1,171 @@
+/*
+ * Backlight Driver for i.MXL based platform
+ *
+ * Copyright (c) 2007 Armadeus Project
+ *
+ * Based on Sharp's 2.4 Backlight Driver
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mutex.h>
+#include <linux/fb.h>
+#include <linux/backlight.h>
+#include <asm/arch/sharpsl.h> --> do the same in asm-arm/arch-imx !!
+#include <asm/arch/imx-regs.h>
+// #include <asm/hardware/sharpsl_pm.h>
+
+static int imxbl_intensity;
+static DEFINE_MUTEX(bl_mutex);
+static struct backlight_properties imxbl_data;
+static struct backlight_device *imx_backlight_device;
+static struct imxbl_machinfo *bl_machinfo;
+
+static unsigned long imxbl_flags;
+#define IMXBL_SUSPENDED 0x01
+#define IMXBL_BATTLOW 0x02
+
+static int imxbl_send_intensity(struct backlight_device *bd)
+{
+ void (*imx_kick_batt)(void);
+ int intensity = bd->props->brightness;
+
+ if (bd->props->power != FB_BLANK_UNBLANK)
+ intensity = 0;
+ if (bd->props->fb_blank != FB_BLANK_UNBLANK)
+ intensity = 0;
+ if (imxbl_flags & IMXBL_SUSPENDED)
+ intensity = 0;
+ if (imxbl_flags & IMXBL_BATTLOW)
+ intensity &= bl_machinfo->limit_mask;
+
+ mutex_lock(&bl_mutex);
+ //bl_machinfo->set_bl_intensity(intensity);
+ //LCDC_PWMR = ....;
+ mutex_unlock(&bl_mutex);
+
+ imxbl_intensity = intensity;
+
+/* imx_kick_batt = symbol_get(sharpsl_battery_kick);
+ if (imx_kick_batt) {
+ imx_kick_batt();
+ symbol_put(sharpsl_battery_kick);
+ }
+*/
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static int imxbl_suspend(struct platform_device *dev, pm_message_t state)
+{
+ imxbl_flags |= IMXBL_SUSPENDED;
+ imxbl_send_intensity(imx_backlight_device);
+ return 0;
+}
+
+static int imxbl_resume(struct platform_device *dev)
+{
+ imxbl_flags &= ~IMXBL_SUSPENDED;
+ imxbl_send_intensity(imx_backlight_device);
+ return 0;
+}
+#else
+#define imxbl_suspend NULL
+#define imxbl_resume NULL
+#endif
+
+static int imxbl_get_intensity(struct backlight_device *bd)
+{
+ return imxbl_intensity;
+}
+
+static int imxbl_set_intensity(struct backlight_device *bd)
+{
+ imxbl_send_intensity(imx_backlight_device);
+ return 0;
+}
+
+/*
+ * Called when the battery is low to limit the backlight intensity.
+ * If limit==0 clear any limit, otherwise limit the intensity
+ */
+void imxbl_limit_intensity(int limit)
+{
+ if (limit)
+ imxbl_flags |= IMXBL_BATTLOW;
+ else
+ imxbl_flags &= ~IMXBL_BATTLOW;
+ imxbl_send_intensity(imx_backlight_device);
+}
+EXPORT_SYMBOL(imxbl_limit_intensity);
+
+
+static struct backlight_properties imxbl_data = {
+ .owner = THIS_MODULE,
+ .get_brightness = imxbl_get_intensity,
+ .update_status = imxbl_set_intensity,
+};
+
+static int __init imxbl_probe(struct platform_device *pdev)
+{
+ struct imxbl_machinfo *machinfo = pdev->dev.platform_data;
+
+ bl_machinfo = machinfo;
+ imxbl_data.max_brightness = machinfo->max_intensity;
+ if (!machinfo->limit_mask)
+ machinfo->limit_mask = -1;
+
+ imx_backlight_device = backlight_device_register ("imxl-bl",
+ NULL, &imxbl_data);
+ if (IS_ERR (imx_backlight_device))
+ return PTR_ERR (imx_backlight_device);
+
+ imxbl_data.power = FB_BLANK_UNBLANK;
+ imxbl_data.brightness = machinfo->default_intensity;
+ imxbl_send_intensity(imx_backlight_device);
+
+ printk("i.MXL Backlight Driver Initialized.\n");
+ return 0;
+}
+
+static int imxbl_remove(struct platform_device *dev)
+{
+ backlight_device_unregister(imx_backlight_device);
+
+ printk("i.MXL Backlight Driver Unloaded\n");
+ return 0;
+}
+
+static struct platform_driver imxbl_driver = {
+ .probe = imxbl_probe,
+ .remove = imxbl_remove,
+ .suspend = imxbl_suspend,
+ .resume = imxbl_resume,
+ .driver = {
+ .name = "imxl-bl",
+ },
+};
+
+static int __init imxbl_init(void)
+{
+ return platform_driver_register(&imxbl_driver);
+}
+
+static void __exit imxbl_exit(void)
+{
+ platform_driver_unregister(&imxbl_driver);
+}
+
+module_init(imxbl_init);
+module_exit(imxbl_exit);
+
+MODULE_AUTHOR("Julien Boibessot <jul...@ar...>");
+MODULE_DESCRIPTION("i.MXL Backlight Driver");
+MODULE_LICENSE("GPLv2");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-11 16:40:59
|
Revision: 596
http://armadeus.svn.sourceforge.net/armadeus/?rev=596&view=rev
Author: artemys
Date: 2007-05-11 09:40:58 -0700 (Fri, 11 May 2007)
Log Message:
-----------
[BUILDROOT] First step in Allegro integration
Added Paths:
-----------
trunk/buildroot/package/allegro/
trunk/buildroot/package/allegro/Config.in
trunk/buildroot/package/allegro/allegro.mk
Added: trunk/buildroot/package/allegro/Config.in
===================================================================
--- trunk/buildroot/package/allegro/Config.in (rev 0)
+++ trunk/buildroot/package/allegro/Config.in 2007-05-11 16:40:58 UTC (rev 596)
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_ALLEGRO
+ bool "Allegro"
+ default n
+ help
+
+ Allegro is a game programming library for C/C++ developers distributed freely and
+ supporting the following platforms: DOS, Unix (Linux, FreeBSD, Irix, Solaris, Darwin),
+ Windows, QNX, BeOS and MacOS X.
+ It provides many functions for graphics, sounds, player input (keyboard, mouse and joystick)
+ and timers. It also provides fixed and floating point mathematical functions, 3d functions,
+ file management functions, compressed datafile and a GUI.
+
+ http://alleg.sourceforge.net/
Added: trunk/buildroot/package/allegro/allegro.mk
===================================================================
--- trunk/buildroot/package/allegro/allegro.mk (rev 0)
+++ trunk/buildroot/package/allegro/allegro.mk 2007-05-11 16:40:58 UTC (rev 596)
@@ -0,0 +1,75 @@
+#############################################################
+#
+# Allegro: a game programming library
+#
+#############################################################
+ALLEGRO_VERSION:=4.2.1
+ALLEGRO_SOURCE:=allegro-$(ALLEGRO_VERSION).tar.gz
+ALLEGRO_SITE:=http://prdownloads.sourceforge.net/alleg/
+ALLEGRO_CAT:=zcat
+ALLEGRO_DIR:=$(BUILD_DIR)/allegro-$(ALLEGRO_VERSION)
+
+$(DL_DIR)/$(ALLEGRO_SOURCE):
+ $(WGET) -P $(DL_DIR) $(ALLEGRO_SITE)/$(ALLEGRO_SOURCE)?download
+
+allegro-source: $(DL_DIR)/$(ALLEGRO_SOURCE)
+
+$(ALLEGRO_DIR)/.unpacked: $(DL_DIR)/$(ALLEGRO_SOURCE)
+ $(ALLEGRO_CAT) $(DL_DIR)/$(ALLEGRO_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@
+
+$(ALLEGRO_DIR)/.configured: $(ALLEGRO_DIR)/.unpacked
+ (cd $(ALLEGRO_DIR); \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ CROSSCOMPILE=1 \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --without-svgalib \
+ --enable-modules=no \
+ --enable-static=yes \
+ --enable-shared=no \
+ --disable-asm \
+ --disable-mmx \
+ --disable-sse \
+ --disable-color24 \
+ --disable-color32 \
+ --without-x );
+ touch $@
+# allegro doesn't seem to build as shared library
+# --disable-color24 \
+# --disable-color32 \
+
+$(ALLEGRO_DIR)/.compiled: $(ALLEGRO_DIR)/.configured
+ $(MAKE) -C $(ALLEGRO_DIR) CROSSCOMPILE=1
+ touch $@
+
+# $(STAGING_DIR)/usr/lib/libSDL_net.so: $(ALLEGRO_DIR)/.compiled
+# $(MAKE) -C $(ALLEGRO_DIR) install
+# touch -c $@
+#
+# $(TARGET_DIR)/usr/lib/libSDL_net.so: $(STAGING_DIR)/usr/lib/libSDL_net.so
+# cp -dpf $(STAGING_DIR)/usr/lib/libSDL_net*.so* $(TARGET_DIR)/usr/lib/
+# -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_net.so
+
+ALLEGRO allegro: uclibc $(ALLEGRO_DIR)/.compiled
+
+allegro-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(ALLEGRO_DIR) uninstall
+ -$(MAKE) -C $(ALLEGRO_DIR) clean
+
+allegro-dirclean:
+ rm -rf $(ALLEGRO_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_ALLEGRO)),y)
+TARGETS+=allegro
+endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-10 21:49:23
|
Revision: 595
http://armadeus.svn.sourceforge.net/armadeus/?rev=595&view=rev
Author: artemys
Date: 2007-05-10 14:49:22 -0700 (Thu, 10 May 2007)
Log Message:
-----------
[DEMOS] Improve Armanoid Makefile
Modified Paths:
--------------
trunk/target/demos/armanoid/Makefile
Modified: trunk/target/demos/armanoid/Makefile
===================================================================
--- trunk/target/demos/armanoid/Makefile 2007-05-09 08:58:32 UTC (rev 594)
+++ trunk/target/demos/armanoid/Makefile 2007-05-10 21:49:22 UTC (rev 595)
@@ -1,19 +1,19 @@
-ifeq ($(TARGET),arm)
-INCLUDE_PATH="../../../buildroot/build_arm_nofpu/SDL-1.2.9/include/"
-LIBRARY_PATH="../../../buildroot/build_arm_nofpu/root/usr/lib/"
+ifeq ($(TARGET),)
INSTALL_DIR="../../../buildroot/build_arm_nofpu/root/usr/bin/"
CC=arm-linux-gcc
DEFINES=TARGET
+CFLAGS:=`sh ../../../buildroot/build_arm_nofpu/SDL-1.2.11/sdl-config --cflags`
+LIBS=`sh ../../../buildroot/build_arm_nofpu/SDL-1.2.11/sdl-config --libs`
else
-INCLUDE_PATH="/usr/include/SDL"
-LIBRARY_PATH="/usr/lib/"
INSTALL_DIR="."
+CFLAGS:=`/usr/bin/sdl-config --cflags`
+LIBS=`/usr/bin/sdl-config --libs`
CC=gcc
DEFINES=HOST
endif
-CFLAGS="-g"
+CFLAGS+="-g"
default: armanoid
@@ -21,19 +21,19 @@
armanoid.o: armanoid.c
- $(CC) -I$(INCLUDE_PATH) $(CFLAGS) -c -o $@ $^
+ $(CC) $(CFLAGS) -c -o $@ $^
collide.o: collide.c
- $(CC) -I$(INCLUDE_PATH) $(CFLAGS) -c -o $@ $^
+ $(CC) $(CFLAGS) -c -o $@ $^
#timer.o: timer.cpp
-# $(CC) -I$(INCLUDE_PATH) $(CFLAGS) -c -o $@ $^
+# $(CC) $(CFLAGS) -c -o $@ $^
buzzer.o: buzzer.c
- $(CC) -I$(INCLUDE_PATH) $(CFLAGS) -D$(DEFINES) -c -o $@ $^
+ $(CC) $(CFLAGS) -D$(DEFINES) -c -o $@ $^
armanoid: armanoid.o collide.o buzzer.o
- $(CC) -I$(INCLUDE_PATH) -L$(LIBRARY_PATH) -o $@ $^ -lSDL
+ $(CC) $(LIBS) -o $@ $^
install: armanoid
cp armanoid $INSTALL_DIR
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-09 08:58:30
|
Revision: 594
http://armadeus.svn.sourceforge.net/armadeus/?rev=594&view=rev
Author: artemys
Date: 2007-05-09 01:58:32 -0700 (Wed, 09 May 2007)
Log Message:
-----------
[LINUX] Add possibility to have the Armadeus custom drivers built in kernel
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/050-linux-2.6.18-armadeus-kconfig.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/050-linux-2.6.18-armadeus-kconfig.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/050-linux-2.6.18-armadeus-kconfig.diff 2007-05-08 13:51:38 UTC (rev 593)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/050-linux-2.6.18-armadeus-kconfig.diff 2007-05-09 08:58:32 UTC (rev 594)
@@ -1,3 +1,5 @@
+This patch adds the possibility to have custom Armadeus drivers built in kernel or compiled as modules
+
--- linux-2.6.18.1.ori/drivers/usb/Kconfig 2006-10-14 05:34:03.000000000 +0200
+++ linux-2.6.18.1/drivers/usb/Kconfig 2006-12-06 22:28:32.000000000 +0100
@@ -134,3 +134,5 @@
@@ -6,3 +8,10 @@
+source "drivers/armadeus/Kconfig"
+
+--- linux-2.6.18.1/drivers/Makefile.org 2007-05-09 10:48:51.000000000 +0200
++++ linux-2.6.18.1/drivers/Makefile 2007-05-09 10:57:09.000000000 +0200
+@@ -76,3 +76,4 @@
+ obj-$(CONFIG_SUPERH) += sh/
+ obj-$(CONFIG_GENERIC_TIME) += clocksource/
+ obj-$(CONFIG_DMA_ENGINE) += dma/
++obj-y += armadeus/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-08 13:51:37
|
Revision: 593
http://armadeus.svn.sourceforge.net/armadeus/?rev=593&view=rev
Author: artemys
Date: 2007-05-08 06:51:38 -0700 (Tue, 08 May 2007)
Log Message:
-----------
[LINUX] Add possibility for 16bits TFT to display 8bpp applications (without doing 16bpp->8bpp software conversion)
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/071-linux-2.6.18-framebuffer-8bpp-switch.diff
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/071-linux-2.6.18-framebuffer-8bpp-switch.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/071-linux-2.6.18-framebuffer-8bpp-switch.diff (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/071-linux-2.6.18-framebuffer-8bpp-switch.diff 2007-05-08 13:51:38 UTC (rev 593)
@@ -0,0 +1,41 @@
+This patch activates 8/16 bpp switching in framebuffer on 16 Bits TFT
+
+--- linux-2.6.18.1/drivers/video/imxfb.c 2007-04-05 22:31:12.000000000 +0200
++++ linux-2.6.18.1.fb8bits/drivers/video/imxfb.c 2007-05-08 12:40:31.000000000 +0200
+@@ -350,6 +350,7 @@
+ pr_debug("var: yres=%d vslen=%d um=%d bm=%d\n",
+ var->yres, var->vsync_len,
+ var->upper_margin, var->lower_margin);
++ pr_debug("var: bpp=%d\n", var->bits_per_pixel);
+
+ #if DEBUG_VAR
+ if (var->xres < 16 || var->xres > 1024)
+@@ -387,7 +388,17 @@
+ VCR_V_WAIT_2(var->lower_margin);
+
+ LCDC_SIZE = SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres);
+- LCDC_PCR = fbi->pcr;
++ // On TFT LCD i.MXL can support 16, 12, 8, 4bpp with the same hardware interface (12 to 16 bits)
++ // So if userspace app wants a 8bpp screen switch to 8bpp (can save ressources, with SDL for ex)
++ if( (var->bits_per_pixel == 8) && (fbi->pcr & PCR_TFT) )
++ {
++ pr_debug("Switching imxfb to 8bpp\n");
++ LCDC_PCR = (fbi->pcr & (~PCR_BPIX_MASK)) | PCR_BPIX_8 | PCR_END_BYTE_SWAP;
++ }
++ else
++ LCDC_PCR = fbi->pcr;
++
++ LCDC_VPW = VPW_VPW(var->xres * var->bits_per_pixel / 8 / 4);
+ LCDC_PWMR = fbi->pwmr;
+ LCDC_LSCR1 = fbi->lscr1;
+ LCDC_DMACR = fbi->dmacr;
+--- linux-2.6.18.1/include/asm-arm/arch-imx/imx-regs.h 2007-04-05 22:31:12.000000000 +0200
++++ linux-2.6.18.1.fb8bits/include/asm-arm/arch-imx/imx-regs.h 2007-05-08 12:38:19.000000000 +0200
+@@ -411,6 +411,7 @@
+ #define PCR_BPIX_8 (3<<25)
+ #define PCR_BPIX_12 (4<<25)
+ #define PCR_BPIX_16 (4<<25)
++#define PCR_BPIX_MASK (7<<25)
+ #define PCR_PIXPOL (1<<24)
+ #define PCR_FLMPOL (1<<23)
+ #define PCR_LPPOL (1<<22)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-08 08:02:09
|
Revision: 592
http://armadeus.svn.sourceforge.net/armadeus/?rev=592&view=rev
Author: artemys
Date: 2007-05-08 01:02:08 -0700 (Tue, 08 May 2007)
Log Message:
-----------
[ROOTFS] Adding of /etc/fb.modes framebuffer config file (used by SDL for example)
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fb.modes
Added: trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fb.modes
===================================================================
--- trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fb.modes (rev 0)
+++ trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fb.modes 2007-05-08 08:02:08 UTC (rev 592)
@@ -0,0 +1,15 @@
+# Armadeus default LCD (Microtips):
+mode "320x240-145"
+ # D: 16.000 MHz, H: 38.835 kHz, V: 145.449 Hz
+ geometry 320 240 320 240 16
+ timings 62500 24 38 1 23 30 3
+ rgba 5/11,6/5,5/0,0/0
+endmode
+
+# Sharp LQ057:
+# mode "320x240-176"
+# # D: 16.000 MHz, H: 43.836 kHz, V: 176.047 Hz
+# geometry 320 240 320 240 16
+# timings 62500 9 27 0 7 9 2
+# rgba 5/11,6/5,5/0,0/0
+# endmode
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-07 21:32:41
|
Revision: 591
http://armadeus.svn.sourceforge.net/armadeus/?rev=591&view=rev
Author: artemys
Date: 2007-05-07 14:31:17 -0700 (Mon, 07 May 2007)
Log Message:
-----------
[LINUX] Backlight for Microtips part1 again
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-07 21:06:42 UTC (rev 590)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-07 21:31:17 UTC (rev 591)
@@ -1175,9 +1175,9 @@
+static void apf9328_lcd_backlight_power(int on)
+{
+ if(on)
-+ PWMR |= 0x000000ff;
++ LCDC_PWMR |= 0x000000ff;
+ else
-+ PWMR &= 0xffffff00;
++ LCDC_PWMR &= 0xffffff00;
+}
+
+#ifdef CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-05-07 21:08:56
|
Revision: 590
http://armadeus.svn.sourceforge.net/armadeus/?rev=590&view=rev
Author: artemys
Date: 2007-05-07 14:06:42 -0700 (Mon, 07 May 2007)
Log Message:
-----------
[LINUX] Add backlight control for Microtips LCD (part1)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-04-28 12:08:37 UTC (rev 589)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/021-linux-2.6.18-apf9328.diff 2007-05-07 21:06:42 UTC (rev 590)
@@ -1133,7 +1133,7 @@
diff -urN linux-2.6.18.1/arch/arm/mach-imx/apf9328_lcd_config.h linux-2.6.18.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h
--- linux-2.6.18.1/arch/arm/mach-imx/apf9328_lcd_config.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.18.1.mod/arch/arm/mach-imx/apf9328_lcd_config.h 2007-01-07 21:40:59.000000000 +0100
-@@ -0,0 +1,136 @@
+@@ -0,0 +1,146 @@
+/*
+ *
+ * Armadeus LCD configuration file
@@ -1161,47 +1161,57 @@
+ DR(3) |= 0x00000080; //rev line
+ else
+ DR(3) &= ~0x00000080; // rev line
++#elif CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
++ // No LCD powerdown yet
+#else
+ if(on)
+ /* use Port_D CONTRAST pin to control LCD power down mode */
-+ DR(3) &= ~0x00000800;
++ DR(3) &= ~0x00000800;
+ else
+ DR(3) |= 0x00000800;
+#endif // CONFIG_FB_IMX_OPTREX_F51900_CSTN
+}
+
++static void apf9328_lcd_backlight_power(int on)
++{
++ if(on)
++ PWMR |= 0x000000ff;
++ else
++ PWMR &= 0xffffff00;
++}
++
+#ifdef CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
++ .pixclock = 62500,
+ .bpp = 16,
-+ .xres = 320,
++ .xres = 320,
+ .yres = 240,
+
-+ .hsync_len = 30,
++ .hsync_len = 30,
+ .vsync_len = 3,
-+ .left_margin = 24,
++ .left_margin = 24,
+ .upper_margin = 1,
-+ .right_margin = 38,
++ .right_margin = 38,
+ .lower_margin = 23,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_FLMPOL | PCR_LPPOL |
+ PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
-+ .pwmr = 0, // No contrast management
++ .pwmr = 0x000001ff, // Contrast with PWM @ Line_Pulse, max by default
+ .dmacr = DMACR_BURST | DMACR_HM(8) | DMACR_TM(4),
-+ .lcd_power = apf9328_lcd_power,
++ .backlight_power = apf9328_lcd_backlight_power,
+};
+#elif CONFIG_FB_IMX_SHARP_LQ057_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
++ .pixclock = 62500,
+ .bpp = 16,
-+ .xres = 320,
++ .xres = 320,
+ .yres = 240,
+
-+ .hsync_len = 9,
++ .hsync_len = 9,
+ .vsync_len = 2,
-+ .left_margin = 9,
++ .left_margin = 9,
+ .upper_margin = 0,
-+ .right_margin = 27,
++ .right_margin = 27,
+ .lower_margin = 7,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | /*PCR_CLKPOL |*/
@@ -1212,16 +1222,16 @@
+};
+#elif CONFIG_FB_IMX_OPTREX_F51900_CSTN
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
++ .pixclock = 62500,
+ .bpp = 8,
-+ .xres = 320,
++ .xres = 320,
+ .yres = 240,
+
-+ .hsync_len = 2,
++ .hsync_len = 2,
+ .vsync_len = 2,
-+ .left_margin = 2,
++ .left_margin = 2,
+ .upper_margin = 2,
-+ .right_margin = 2,
++ .right_margin = 2,
+ .lower_margin = 2,
+
+ .pcr = PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_8 | PCR_ACD(5) | PCR_END_BYTE_SWAP | PCR_PCD(3),
@@ -1230,16 +1240,16 @@
+};
+#elif CONFIG_FB_IMX_MOTOROLA_A910_TFT
+static struct imxfb_mach_info apf9328_fb_info __initdata = {
-+ .pixclock = 62500,
++ .pixclock = 62500,
+ .bpp = 16,
-+ .xres = 240,
++ .xres = 240,
+ .yres = 320,
+
-+ .hsync_len = 9,
++ .hsync_len = 9,
+ .vsync_len = 2,
-+ .left_margin = 9,
++ .left_margin = 9,
+ .upper_margin = 2,
-+ .right_margin = 27,
++ .right_margin = 27,
+ .lower_margin = 4,
+
+ .pcr = PCR_TFT | PCR_COLOR | PCR_PBSIZ_8 | PCR_BPIX_16 | PCR_CLKPOL | PCR_SCLKIDLE | PCR_SCLK_SEL | PCR_PCD(9),
@@ -1254,16 +1264,16 @@
+static void imx_fb_set_gpios(void)
+{
+#ifdef CONFIG_FB_IMX_OPTREX_F51900_CSTN
-+ OCR1(3) = 0x0000C000 ;
++ OCR1(3) = 0x0000C000;
+ DR(3) |= 0x00000080;
+ DDIR(3) |= 0x00000080;
+ GIUS(3) &= ~0x00000080;
+ GPR(3) &= ~0x00000080;
+#else
-+ OCR1(3) = 0x00C00000 ;
-+ DR(3) |= 0x00000800;
++ OCR1(3) = 0x00C00000;
++ DR(3) |= 0x00000800;
+ DDIR(3) |= 0x00000800;
-+ GIUS(3) &= ~0x00000800;
++ GIUS(3) |= 0x00000800; // GPIO Function for CONTRAST pin (changed in imxfb if contrast is activated)
+ GPR(3) &= ~0x00000800;
+#endif
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-04-28 12:08:38
|
Revision: 589
http://armadeus.svn.sourceforge.net/armadeus/?rev=589&view=rev
Author: thom25
Date: 2007-04-28 05:08:37 -0700 (Sat, 28 Apr 2007)
Log Message:
-----------
add uboot_recover tool
Added Paths:
-----------
trunk/software/uboot_recover/
trunk/software/uboot_recover/INSTALL
trunk/software/uboot_recover/bootloader.py
trunk/software/uboot_recover/flashprogrammer.bin
trunk/software/uboot_recover/ramprogrammer.bin
trunk/software/uboot_recover/u-boot.bin
trunk/software/uboot_recover/uboot_recover.py
Added: trunk/software/uboot_recover/INSTALL
===================================================================
--- trunk/software/uboot_recover/INSTALL (rev 0)
+++ trunk/software/uboot_recover/INSTALL 2007-04-28 12:08:37 UTC (rev 589)
@@ -0,0 +1,20 @@
+---------------------------------------------------------------
+Here are the instructions to install and run uboot recover tool:
+---------------------------------------------------------------
+
+Pyhton 2.4 has to be installed on your system. If not, take a look at here:
+www.python.org/download/releases/2.4.4/
+
+For the windows users:
+Install the win32 extension package for python 2.4 (pywin32).
+http://sourceforge.net/projects/pywin32/
+
+For all users
+Install the serial port package for python (pyserial).
+http://sourceforge.net/projects/pyserial/
+
+Usage
+Simply connect the APF to the serial port of the host and run the uboot_recover tool.
+->python uboot_recover.py
+Then indicate which port is used to communicate with the APF (ttySx or COMx)
+That's all
Added: trunk/software/uboot_recover/bootloader.py
===================================================================
--- trunk/software/uboot_recover/bootloader.py (rev 0)
+++ trunk/software/uboot_recover/bootloader.py 2007-04-28 12:08:37 UTC (rev 589)
@@ -0,0 +1,248 @@
+#
+# APF9328 bootloader
+#
+# Copyright (2006) ARMADEUS
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# author: nic...@ar...
+#
+
+import sys
+import time
+from struct import *
+import os
+import serial
+
+class imxlBootloader:
+
+ def __init__(self, serialport, sizeofRam=16 ):
+ self.port = serialport
+ self.ramSize = sizeofRam #default APF
+
+ def sync(self):
+ sync_done = False
+ print "Re-synchronizing...\n"
+ self.port.write('a')
+ while sync_done <> True:
+ if self.port.inWaiting():
+ if self.port.read(1) == ':':
+ sync_done = True
+ print "Connection with target bootstrap done !"
+ else:
+ self.port.write('a')
+ print "Please reset your board in bootstrap mode"
+ self.port.flush()
+ time.sleep(1)
+ if sync_done:
+ self.__initRam()
+ return sync_done
+
+ def __displayProgress( self, text ):
+ sys.stdout.write(chr(13))
+ print text,
+
+ def __initRam( self ):
+ if self.ramSize == 16:
+ self.put("221000","910A9267","l")
+ self.get("8000000", "4","b")
+ self.put("221000","A10A9267","l")
+ self.get("8000000", "4","b")
+ self.get("8000000", "4","b")
+ self.get("8000000", "4","b")
+ self.get("8000000", "4","b")
+ self.get("8000000", "4","b")
+ self.get("8000000", "4","b")
+ self.get("8000000", "4","b")
+ self.get("8000000", "4","b")
+ self.put("221000","B10A9267","l")
+ self.get("8023000", "4","b")
+ self.put("221000","810A9267","l")
+ else:
+ print "Warning ramSize %d not supported" % self.ramSize
+ #--------------------------------------------------------------
+ # WaitFlashReady Test. Wait until the flash is ready to process next command
+ def waitFlashReady(self) :
+ flashStatus = 0
+ while flashStatus < 0x0080 :
+ flashStatus = (int( self.get('10000000', '1', 'w'),16) & 0x0080)
+
+
+ #----------------------------------------------------------------
+ # Erase the Flash block containing the given (hexa ASCII) address
+ def eraseFlashBlock( self, address ):
+ self.put(address, "70", 'w')
+ self.waitFlashReady()
+ self.put(address, "20", 'w')
+ self.put(address, "D0", 'w')
+ self.waitFlashReady()
+
+
+ #--------------------------------------------------------------
+ # Write a word in Flash at the given (hexa ASCII) address
+ # The block (64kWords) containing the address must have been previously cleared
+ def writeFlashWord( self, address, word ):
+ self.put(address, "70", 'w')
+ self.waitFlashReady()
+ self.put(address, "40", 'w')
+ self.put(address, word, 'w')
+ self.waitFlashReady()
+
+ def fastloadRam( self, fileName, address ) :
+ # load RamLoader program at end of 4Mbytes ram (min RAM on APD9328)
+ self.loadbin( "ramprogrammer.bin","08400000")
+ f=open(fileName, 'rb')
+ # store file size at address 0x08000000 for RamLoader program
+ fsize = "%08x" % os.path.getsize(fileName) #os.stat(filesize)[6]
+ self.put("08000000", fsize, "l")
+ # store file destination address at address 0x08000004 for RamLoader program
+ self.put("08000004", address, 'l')
+ self.execute("08400000")
+ print "Loading file %s. Please wait..." % fileName
+ cin = ' '
+ while cin <> '%' : # wait start of RamLoader
+ time.sleep(1)
+ cin = self.port.read(1)
+
+ data = f.read(16)
+ count = 16
+ b = 0
+ while len(data):
+ n = len(data)
+ b = 16-n # ensure always 4 bytes
+ str = unpack('B'*n,data)
+ self.port.write(data)
+ count = count + 16
+ if (count % 1024) == 0:
+ self.__displayProgress( "%d octets" % count )
+ data = f.read(16)
+ self.__displayProgress( "%d octets" % count )
+
+ cin = ' '
+ while cin <> '%' : # wait end of RamLoader
+ time.sleep(1)
+ cin = self.port.read(1)
+ print ""
+ f.close()
+
+ def execute( self, address ) :
+ assert len(address) <= 8, 'address too long'
+ try:
+ self.write(address[0:(len(address)-1)].zfill(7)+"000")
+ except:
+ pass
+
+ def loadFlashbin( self, fileName, address ) :
+ #a=glob.glob(fileName)[0]
+ self.fastloadRam( fileName,"08001000");
+ self.Flashbin(address, '%x' % os.path.getsize(fileName),"08001000")
+ #self.Flashbin(address, '%x' % os.stat(a)[6],"08001000")
+
+ def Flashbin( self, address, size, fileRamPosition ):
+ # initialize flash interface by programming the imx bus controller
+ self.put("00220004", "00000D01", 'l')
+ # load FlashBurner program
+ self.loadbin( "flashprogrammer.bin","08000400")
+ # store file size at address 0x08000000 for FlashBurner program
+ self.put("08000000", size, 'l')
+ # store file destination address at address 0x08000004 for FlashBurner program
+ self.put("08000004", address, 'l')
+ # store file position in RAM address 0x08000008 for FlashBurner program
+ self.put("08000008", fileRamPosition, 'l')
+ self.execute( "08000400")
+ print "Flashing please wait..."
+ data = self.port.read(1)
+ while data <> '%':
+ if self.port.inWaiting():
+ data = self.port.read(1)
+ if data == '.':
+ print ".",
+ print ""
+
+ def loadbin( self, fileName, addr ):
+ f=open(fileName, 'rb')
+ bytecount = 0
+ currAddr = int(addr,16)
+ data = f.read(16)
+ print "loading file %s. Please wait..." % fileName
+ while len(data):
+ n = len(data)
+ bytecount = bytecount + n
+ str = unpack('B'*n,data)
+ self.put( '%08x' % currAddr, '%02X'*n % str, 'b')
+ currAddr = currAddr + 16
+ data = f.read(16)
+ if (bytecount % 1024) == 0:
+ self.__displayProgress( "%d octets" % bytecount )
+ self.__displayProgress( "%d octets" % bytecount )
+ print ""
+ f.close()
+
+ def read( self, count ):
+ result = self.port.read(count+1) # trailer /
+ return result[0:len(result)-1] # remove trailer
+
+ def write( self, text2write ):
+ self.port.write(text2write.upper())
+ self.port.read(len(text2write))
+
+ def get( self, addr, count, mode ):
+ countmode = 0x20
+ addrmask = int(addr[len(addr)-1],16) & 0x0f
+
+ assert len(addr) <= 8, 'address too long'
+ assert len(count) > 0, 'zero length get'
+ assert len(count) < 32, 'Too long get, should be < 31 bytes'
+
+ nbbyte = 1
+ if mode == 'w':
+ countmode = 0x60
+ addrmask = int(addr[len(addr)-1],16) & 0x0e
+ nbbyte = 2
+ if mode == 'l':
+ countmode = 0xe0
+ addrmask = int(addr[len(addr)-1],16) & 0x0c
+ nbbyte = 4
+
+ nbbyte = nbbyte * int(count)
+ addr2write = addr[0:(len(addr)-1)].zfill(7) + (hex(addrmask)[2])
+ cmbyte2write = '%02x' % (countmode + nbbyte)
+ self.write( addr2write + cmbyte2write )
+ return self.read(nbbyte*2) # read n char
+
+ def put( self, addr, data, mode ):
+ countmode = 0
+ addrmask = int(addr[len(addr)-1],16) & 0x0f
+ nbchar = 2
+ data2write = data
+
+ assert len(data) > 0, 'zero length put'
+ assert len(addr) <= 8, 'address too long'
+
+ if mode == 'w':
+ countmode = 0x40
+ addrmask = int(addr[len(addr)-1],16) & 0x0e
+ nbchar = 4
+ if mode == 'l':
+ countmode = 0xC0
+ addrmask = int(addr[len(addr)-1],16) & 0x0c
+ nbchar = 8
+
+ data2write = data.zfill(((nbchar-(len(data)%nbchar))%nbchar) + len(data) )
+ addr2write = addr[0:(len(addr)-1)].zfill(7) + (hex(addrmask)[2])
+ cmbyte2write = '%02x' % (countmode + len(data2write)/2)
+ self.write( addr2write + cmbyte2write + data2write )
+ self.port.read(1)
+
Added: trunk/software/uboot_recover/flashprogrammer.bin
===================================================================
(Binary files differ)
Property changes on: trunk/software/uboot_recover/flashprogrammer.bin
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/software/uboot_recover/ramprogrammer.bin
===================================================================
(Binary files differ)
Property changes on: trunk/software/uboot_recover/ramprogrammer.bin
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/software/uboot_recover/u-boot.bin
===================================================================
(Binary files differ)
Property changes on: trunk/software/uboot_recover/u-boot.bin
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/software/uboot_recover/uboot_recover.py
===================================================================
--- trunk/software/uboot_recover/uboot_recover.py (rev 0)
+++ trunk/software/uboot_recover/uboot_recover.py 2007-04-28 12:08:37 UTC (rev 589)
@@ -0,0 +1,51 @@
+#
+# APF9328 boot revovery tool
+#
+# Copyright (2006) ARMADEUS
+#
+# 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# author: nic...@ar...
+#
+
+from bootloader import *
+import sys
+import serial
+
+ser = 0 #serial port
+
+if __name__ == "__main__":
+ SPEED = 57600
+ ramSize = 16
+ print "APF Recover Tool"
+ print "Do not forget to place the bootstrap jumper !!"
+ print "and be sure to have a u-boot.bin file in current dir"
+ port = raw_input('Enter serial port number or name to use (ttySx under Linux and COMx under Windows: ')
+ input = raw_input('Enter RAM size (default 16): ')
+ if input.isdigit():
+ ramSize = int( input )
+ try:
+ ser = serial.Serial(port, SPEED, timeout=1)
+ except Exception, msg:
+ print "unable to open serial port %s" % port
+ print msg
+ sys.exit()
+ ser.flush()
+ apfBootloader = imxlBootloader(ser, ramSize)
+ apfBootloader.sync()
+ apfBootloader.loadFlashbin("u-boot.bin", "10000000")
+ print "uBoot successfully recovered !"
+ del ser
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-04-18 20:49:27
|
Revision: 588
http://armadeus.svn.sourceforge.net/armadeus/?rev=588&view=rev
Author: thom25
Date: 2007-04-18 13:49:27 -0700 (Wed, 18 Apr 2007)
Log Message:
-----------
add header
Modified Paths:
--------------
trunk/firmware/BRAMTest/BRAMTest.vhdl
Modified: trunk/firmware/BRAMTest/BRAMTest.vhdl
===================================================================
--- trunk/firmware/BRAMTest/BRAMTest.vhdl 2007-04-17 21:33:28 UTC (rev 587)
+++ trunk/firmware/BRAMTest/BRAMTest.vhdl 2007-04-18 20:49:27 UTC (rev 588)
@@ -1,3 +1,23 @@
+----------------------------------------------------------------------------------
+-- Company: Armadeus Project
+-- Engineer: michael lerjen
+--
+-- Create Date: 22:04:02 04/12/2006
+-- Design Name:
+-- Module Name:
+-- Project Name:
+-- Target Devices:
+-- Tool versions:
+-- Description:
+--
+-- Dependencies:
+--
+-- Revision:
+-- Revision 0.01 - File Created
+-- Additional Comments:
+--
+----------------------------------------------------------------------------------
+
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-04-17 21:33:28
|
Revision: 587
http://armadeus.svn.sourceforge.net/armadeus/?rev=587&view=rev
Author: artemys
Date: 2007-04-17 14:33:28 -0700 (Tue, 17 Apr 2007)
Log Message:
-----------
[BUILD] Add buildauto target to main Makefile in order to setup automatic builds
Modified Paths:
--------------
trunk/Makefile
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2007-04-15 17:19:36 UTC (rev 586)
+++ trunk/Makefile 2007-04-17 21:33:28 UTC (rev 587)
@@ -32,7 +32,7 @@
PATCH_DIR=patches
PATCH_CYGWIN_DIR=$(PATCH_DIR)/cygwin
-TAR_OPTIONS=--exclude=.svn -xvf
+TAR_OPTIONS=--exclude=.svn -xf
#used only by cygwin to restore the rights on some rootfs directories
BUILDROOT_ROOT_DIR=$(BUILDROOT_DIR)/build_arm_nofpu/root
@@ -100,6 +100,14 @@
fi;
@$(MAKE) -C $(BUILDROOT_DIR)
+# To be called only one time if one wants to make an automatic build
+buildauto: $(BUILDROOT_DIR)/.unpacked
+ # Be sure that /local/downloads exists if you want to use automated build
+ sed -e 's/BR2_DL_DIR/BR2_DL_DIR=\"\/local\/downloads\" #/g' $(BUILDROOT_DIR)/.defconfig > $(BUILDROOT_DIR)/.defconfig_new ; \
+ mv -f $(BUILDROOT_DIR)/.defconfig_new $(BUILDROOT_DIR)/.defconfig
+ echo "ey" | $(MAKE) -C $(BUILDROOT_DIR) menuconfig
+ $(MAKE) -C $(BUILDROOT_DIR)
+
menuconfig: $(BUILDROOT_DIR)/.unpacked
@$(MAKE) -C $(BUILDROOT_DIR) menuconfig
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-04-15 17:19:38
|
Revision: 586
http://armadeus.svn.sourceforge.net/armadeus/?rev=586&view=rev
Author: thom25
Date: 2007-04-15 10:19:36 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
add simulation files
Added Paths:
-----------
trunk/firmware/led/clock_divider_tbw.ant
trunk/firmware/led/clock_divider_tbw.jhd
trunk/firmware/led/clock_divider_tbw.vhw
trunk/firmware/led/clock_divider_tbw.xwv
trunk/firmware/led/clock_divider_tbw_beh.prj
trunk/firmware/led/clock_divider_tbw_bencher.prj
trunk/firmware/led/clock_divider_tbw_par.prj
trunk/firmware/led/debouncer_tbw.ant
trunk/firmware/led/debouncer_tbw.jhd
trunk/firmware/led/debouncer_tbw.xwv
trunk/firmware/led/debouncer_tbw_beh.prj
trunk/firmware/led/flip_flop_tbw.ant
trunk/firmware/led/flip_flop_tbw.jhd
trunk/firmware/led/flip_flop_tbw.xwv
trunk/firmware/led/flip_flop_tbw_beh.prj
trunk/firmware/led/flip_flop_tbw_bencher.prj
trunk/firmware/led/led_top_tbw.ant
trunk/firmware/led/led_top_tbw.jhd
trunk/firmware/led/led_top_tbw.xwv
trunk/firmware/led/led_top_tbw_beh.prj
trunk/firmware/led/led_top_tbw_bencher.prj
trunk/firmware/led/led_top_tbw_gen.prj
trunk/firmware/led/led_top_tbw_par.prj
trunk/firmware/led/led_top_tbw_selfcheck.ant
trunk/firmware/led/led_top_tbw_selfcheck.vhw
trunk/firmware/led/led_top_tbw_selfcheck_beh_beh.prj
Added: trunk/firmware/led/clock_divider_tbw.ant
===================================================================
--- trunk/firmware/led/clock_divider_tbw.ant (rev 0)
+++ trunk/firmware/led/clock_divider_tbw.ant 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,113 @@
+--------------------------------------------------------------------------------
+-- Copyright (c) 1995-2003 Xilinx, Inc.
+-- All Right Reserved.
+--------------------------------------------------------------------------------
+-- ____ ____
+-- / /\/ /
+-- /___/ \ / Vendor: Xilinx
+-- \ \ \/ Version : 9.1i
+-- \ \ Application : ISE
+-- / / Filename : clock_divider_tbw.ant
+-- /___/ /\ Timestamp : Fri Apr 13 23:07:43 2007
+-- \ \ / \
+-- \___\/\___\
+--
+--Command:
+--Design Name: clock_divider_tbw
+--Device: Xilinx
+--
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+USE IEEE.STD_LOGIC_TEXTIO.ALL;
+USE STD.TEXTIO.ALL;
+
+ENTITY clock_divider_tbw IS
+END clock_divider_tbw;
+
+ARCHITECTURE testbench_arch OF clock_divider_tbw IS
+ FILE RESULTS: TEXT OPEN WRITE_MODE IS "/home/benoit/armadeus/trunk/firmware/led/clock_divider_tbw.ano";
+
+ COMPONENT clock_divider
+ PORT (
+ clk_in : In std_logic;
+ clk_out : Out std_logic
+ );
+ END COMPONENT;
+
+ SIGNAL clk_in : std_logic := '0';
+ SIGNAL clk_out : std_logic := '0';
+
+ SHARED VARIABLE TX_ERROR : INTEGER := 0;
+ SHARED VARIABLE TX_OUT : LINE;
+
+ constant PERIOD : time := 20 ns;
+ constant DUTY_CYCLE : real := 0.5;
+ constant OFFSET : time := 100 ns;
+
+ BEGIN
+ UUT : clock_divider
+ PORT MAP (
+ clk_in => clk_in,
+ clk_out => clk_out
+ );
+
+ PROCESS -- clock process for clk_in
+ BEGIN
+ WAIT for OFFSET;
+ CLOCK_LOOP : LOOP
+ clk_in <= '0';
+ WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
+ clk_in <= '1';
+ WAIT FOR (PERIOD * DUTY_CYCLE);
+ END LOOP CLOCK_LOOP;
+ END PROCESS;
+
+ PROCESS -- Annotation process for clk_in
+ VARIABLE TX_TIME : INTEGER := 0;
+
+ PROCEDURE ANNOTATE_clk_out(
+ TX_TIME : INTEGER
+ ) IS
+ VARIABLE TX_STR : String(1 to 4096);
+ VARIABLE TX_LOC : LINE;
+ BEGIN
+ STD.TEXTIO.write(TX_LOC, string'("Annotate["));
+ STD.TEXTIO.write(TX_LOC, TX_TIME);
+ STD.TEXTIO.write(TX_LOC, string'(", clk_out, "));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, clk_out);
+ STD.TEXTIO.write(TX_LOC, string'("]"));
+ TX_STR(TX_LOC.all'range) := TX_LOC.all;
+ STD.TEXTIO.writeline(RESULTS, TX_LOC);
+ STD.TEXTIO.Deallocate(TX_LOC);
+ END;
+ BEGIN
+ WAIT for 1 fs;
+ ANNOTATE_clk_out(0);
+ WAIT for OFFSET;
+ TX_TIME := TX_TIME + 100;
+ ANNO_LOOP : LOOP
+ --Rising Edge
+ WAIT for 11 ns;
+ TX_TIME := TX_TIME + 11;
+ ANNOTATE_clk_out(TX_TIME);
+ WAIT for 9 ns;
+ TX_TIME := TX_TIME + 9;
+ END LOOP ANNO_LOOP;
+ END PROCESS;
+
+ PROCESS
+ BEGIN
+ WAIT FOR 1020 ns;
+
+ STD.TEXTIO.write(TX_OUT, string'("Total[]"));
+ STD.TEXTIO.writeline(RESULTS, TX_OUT);
+ ASSERT (FALSE) REPORT
+ "Success! Simulation for annotation completed"
+ SEVERITY FAILURE;
+ END PROCESS;
+
+ END testbench_arch;
+
Added: trunk/firmware/led/clock_divider_tbw.jhd
===================================================================
--- trunk/firmware/led/clock_divider_tbw.jhd (rev 0)
+++ trunk/firmware/led/clock_divider_tbw.jhd 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,3 @@
+MODULE clock_divider_tbw
+SUBMODULE clock_divider
+INSTANCE UUT
Added: trunk/firmware/led/clock_divider_tbw.vhw
===================================================================
--- trunk/firmware/led/clock_divider_tbw.vhw (rev 0)
+++ trunk/firmware/led/clock_divider_tbw.vhw 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,70 @@
+--------------------------------------------------------------------------------
+-- Copyright (c) 1995-2003 Xilinx, Inc.
+-- All Right Reserved.
+--------------------------------------------------------------------------------
+-- ____ ____
+-- / /\/ /
+-- /___/ \ / Vendor: Xilinx
+-- \ \ \/ Version : 9.1i
+-- \ \ Application : ISE
+-- / / Filename : clock_divider_tbw.vhw
+-- /___/ /\ Timestamp : Fri Apr 13 23:07:43 2007
+-- \ \ / \
+-- \___\/\___\
+--
+--Command:
+--Design Name: clock_divider_tbw
+--Device: Xilinx
+--
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+USE IEEE.STD_LOGIC_TEXTIO.ALL;
+USE STD.TEXTIO.ALL;
+
+ENTITY clock_divider_tbw IS
+END clock_divider_tbw;
+
+ARCHITECTURE testbench_arch OF clock_divider_tbw IS
+ COMPONENT clock_divider
+ PORT (
+ clk_in : In std_logic;
+ clk_out : Out std_logic
+ );
+ END COMPONENT;
+
+ SIGNAL clk_in : std_logic := '0';
+ SIGNAL clk_out : std_logic := '0';
+
+ constant PERIOD : time := 20 ns;
+ constant DUTY_CYCLE : real := 0.5;
+ constant OFFSET : time := 100 ns;
+
+ BEGIN
+ UUT : clock_divider
+ PORT MAP (
+ clk_in => clk_in,
+ clk_out => clk_out
+ );
+
+ PROCESS -- clock process for clk_in
+ BEGIN
+ WAIT for OFFSET;
+ CLOCK_LOOP : LOOP
+ clk_in <= '0';
+ WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
+ clk_in <= '1';
+ WAIT FOR (PERIOD * DUTY_CYCLE);
+ END LOOP CLOCK_LOOP;
+ END PROCESS;
+
+ PROCESS
+ BEGIN
+ WAIT FOR 1020 ns;
+
+ END PROCESS;
+
+ END testbench_arch;
+
Added: trunk/firmware/led/clock_divider_tbw.xwv
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/led/clock_divider_tbw.xwv
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/led/clock_divider_tbw_beh.prj
===================================================================
--- trunk/firmware/led/clock_divider_tbw_beh.prj (rev 0)
+++ trunk/firmware/led/clock_divider_tbw_beh.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,2 @@
+vhdl work "clock_divider.vhd"
+vhdl work "clock_divider_tbw.vhw"
Added: trunk/firmware/led/clock_divider_tbw_bencher.prj
===================================================================
--- trunk/firmware/led/clock_divider_tbw_bencher.prj (rev 0)
+++ trunk/firmware/led/clock_divider_tbw_bencher.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1 @@
+vhdl work "clock_divider.vhd"
Added: trunk/firmware/led/clock_divider_tbw_par.prj
===================================================================
--- trunk/firmware/led/clock_divider_tbw_par.prj (rev 0)
+++ trunk/firmware/led/clock_divider_tbw_par.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1 @@
+vhdl work "clock_divider_tbw.vhw"
Added: trunk/firmware/led/debouncer_tbw.ant
===================================================================
--- trunk/firmware/led/debouncer_tbw.ant (rev 0)
+++ trunk/firmware/led/debouncer_tbw.ant 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,172 @@
+--------------------------------------------------------------------------------
+-- Copyright (c) 1995-2003 Xilinx, Inc.
+-- All Right Reserved.
+--------------------------------------------------------------------------------
+-- ____ ____
+-- / /\/ /
+-- /___/ \ / Vendor: Xilinx
+-- \ \ \/ Version : 9.1i
+-- \ \ Application : ISE
+-- / / Filename : debouncer_tbw.ant
+-- /___/ /\ Timestamp : Fri Apr 13 22:26:03 2007
+-- \ \ / \
+-- \___\/\___\
+--
+--Command:
+--Design Name: debouncer_tbw
+--Device: Xilinx
+--
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+USE IEEE.STD_LOGIC_TEXTIO.ALL;
+USE STD.TEXTIO.ALL;
+
+ENTITY debouncer_tbw IS
+END debouncer_tbw;
+
+ARCHITECTURE testbench_arch OF debouncer_tbw IS
+ FILE RESULTS: TEXT OPEN WRITE_MODE IS "/home/benoit/armadeus/trunk/firmware/led/debouncer_tbw.ano";
+
+ COMPONENT debouncer
+ PORT (
+ clk_100hz : In std_logic;
+ button_in : In std_logic;
+ button_debounced_out : Out std_logic
+ );
+ END COMPONENT;
+
+ SIGNAL clk_100hz : std_logic := '0';
+ SIGNAL button_in : std_logic := '0';
+ SIGNAL button_debounced_out : std_logic := '0';
+
+ SHARED VARIABLE TX_ERROR : INTEGER := 0;
+ SHARED VARIABLE TX_OUT : LINE;
+
+ constant PERIOD : time := 200 ns;
+ constant DUTY_CYCLE : real := 0.5;
+ constant OFFSET : time := 100 ns;
+
+ BEGIN
+ UUT : debouncer
+ PORT MAP (
+ clk_100hz => clk_100hz,
+ button_in => button_in,
+ button_debounced_out => button_debounced_out
+ );
+
+ PROCESS -- clock process for clk_100hz
+ BEGIN
+ WAIT for OFFSET;
+ CLOCK_LOOP : LOOP
+ clk_100hz <= '0';
+ WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
+ clk_100hz <= '1';
+ WAIT FOR (PERIOD * DUTY_CYCLE);
+ END LOOP CLOCK_LOOP;
+ END PROCESS;
+
+ PROCESS -- Annotation process for clk_100hz
+ VARIABLE TX_TIME : INTEGER := 0;
+
+ PROCEDURE ANNOTATE_button_debounced_out(
+ TX_TIME : INTEGER
+ ) IS
+ VARIABLE TX_STR : String(1 to 4096);
+ VARIABLE TX_LOC : LINE;
+ BEGIN
+ STD.TEXTIO.write(TX_LOC, string'("Annotate["));
+ STD.TEXTIO.write(TX_LOC, TX_TIME);
+ STD.TEXTIO.write(TX_LOC, string'(", button_debounced_out, "));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, button_debounced_out);
+ STD.TEXTIO.write(TX_LOC, string'("]"));
+ TX_STR(TX_LOC.all'range) := TX_LOC.all;
+ STD.TEXTIO.writeline(RESULTS, TX_LOC);
+ STD.TEXTIO.Deallocate(TX_LOC);
+ END;
+ BEGIN
+ WAIT for 1 fs;
+ ANNOTATE_button_debounced_out(0);
+ WAIT for OFFSET;
+ TX_TIME := TX_TIME + 100;
+ ANNO_LOOP : LOOP
+ --Rising Edge
+ WAIT for 115 ns;
+ TX_TIME := TX_TIME + 115;
+ ANNOTATE_button_debounced_out(TX_TIME);
+ WAIT for 85 ns;
+ TX_TIME := TX_TIME + 85;
+ END LOOP ANNO_LOOP;
+ END PROCESS;
+
+ PROCESS
+ BEGIN
+ -- ------------- Current Time: 100ns
+ WAIT FOR 100 ns;
+ button_in <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 385ns
+ WAIT FOR 285 ns;
+ button_in <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 585ns
+ WAIT FOR 200 ns;
+ button_in <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 785ns
+ WAIT FOR 200 ns;
+ button_in <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 985ns
+ WAIT FOR 200 ns;
+ button_in <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 1785ns
+ WAIT FOR 800 ns;
+ button_in <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 3185ns
+ WAIT FOR 1400 ns;
+ button_in <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 4585ns
+ WAIT FOR 1400 ns;
+ button_in <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 4785ns
+ WAIT FOR 200 ns;
+ button_in <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 5385ns
+ WAIT FOR 600 ns;
+ button_in <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 5585ns
+ WAIT FOR 200 ns;
+ button_in <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 5785ns
+ WAIT FOR 200 ns;
+ button_in <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 7385ns
+ WAIT FOR 1600 ns;
+ button_in <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 8185ns
+ WAIT FOR 800 ns;
+ button_in <= '0';
+ -- -------------------------------------
+ WAIT FOR 2015 ns;
+
+ STD.TEXTIO.write(TX_OUT, string'("Total[]"));
+ STD.TEXTIO.writeline(RESULTS, TX_OUT);
+ ASSERT (FALSE) REPORT
+ "Success! Simulation for annotation completed"
+ SEVERITY FAILURE;
+ END PROCESS;
+
+ END testbench_arch;
+
Added: trunk/firmware/led/debouncer_tbw.jhd
===================================================================
--- trunk/firmware/led/debouncer_tbw.jhd (rev 0)
+++ trunk/firmware/led/debouncer_tbw.jhd 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,3 @@
+MODULE debouncer_tbw
+SUBMODULE debouncer
+INSTANCE UUT
Added: trunk/firmware/led/debouncer_tbw.xwv
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/led/debouncer_tbw.xwv
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/led/debouncer_tbw_beh.prj
===================================================================
--- trunk/firmware/led/debouncer_tbw_beh.prj (rev 0)
+++ trunk/firmware/led/debouncer_tbw_beh.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,2 @@
+vhdl work "debouncer.vhd"
+vhdl work "debouncer_tbw.vhw"
Added: trunk/firmware/led/flip_flop_tbw.ant
===================================================================
--- trunk/firmware/led/flip_flop_tbw.ant (rev 0)
+++ trunk/firmware/led/flip_flop_tbw.ant 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,132 @@
+--------------------------------------------------------------------------------
+-- Copyright (c) 1995-2003 Xilinx, Inc.
+-- All Right Reserved.
+--------------------------------------------------------------------------------
+-- ____ ____
+-- / /\/ /
+-- /___/ \ / Vendor: Xilinx
+-- \ \ \/ Version : 9.1i
+-- \ \ Application : ISE
+-- / / Filename : flip_flop_tbw.ant
+-- /___/ /\ Timestamp : Fri Apr 13 22:13:11 2007
+-- \ \ / \
+-- \___\/\___\
+--
+--Command:
+--Design Name: flip_flop_tbw
+--Device: Xilinx
+--
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+USE IEEE.STD_LOGIC_TEXTIO.ALL;
+USE STD.TEXTIO.ALL;
+
+ENTITY flip_flop_tbw IS
+END flip_flop_tbw;
+
+ARCHITECTURE testbench_arch OF flip_flop_tbw IS
+ FILE RESULTS: TEXT OPEN WRITE_MODE IS "/home/benoit/armadeus/trunk/firmware/led/flip_flop_tbw.ano";
+
+ COMPONENT flip_flop
+ PORT (
+ clk_100hz : In std_logic;
+ switch_in_n : In std_logic;
+ led_out : Out std_logic
+ );
+ END COMPONENT;
+
+ SIGNAL clk_100hz : std_logic := '0';
+ SIGNAL switch_in_n : std_logic := '0';
+ SIGNAL led_out : std_logic := '0';
+
+ SHARED VARIABLE TX_ERROR : INTEGER := 0;
+ SHARED VARIABLE TX_OUT : LINE;
+
+ constant PERIOD : time := 200 ns;
+ constant DUTY_CYCLE : real := 0.5;
+ constant OFFSET : time := 100 ns;
+
+ BEGIN
+ UUT : flip_flop
+ PORT MAP (
+ clk_100hz => clk_100hz,
+ switch_in_n => switch_in_n,
+ led_out => led_out
+ );
+
+ PROCESS -- clock process for clk_100hz
+ BEGIN
+ WAIT for OFFSET;
+ CLOCK_LOOP : LOOP
+ clk_100hz <= '0';
+ WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
+ clk_100hz <= '1';
+ WAIT FOR (PERIOD * DUTY_CYCLE);
+ END LOOP CLOCK_LOOP;
+ END PROCESS;
+
+ PROCESS -- Annotation process for clk_100hz
+ VARIABLE TX_TIME : INTEGER := 0;
+
+ PROCEDURE ANNOTATE_led_out(
+ TX_TIME : INTEGER
+ ) IS
+ VARIABLE TX_STR : String(1 to 4096);
+ VARIABLE TX_LOC : LINE;
+ BEGIN
+ STD.TEXTIO.write(TX_LOC, string'("Annotate["));
+ STD.TEXTIO.write(TX_LOC, TX_TIME);
+ STD.TEXTIO.write(TX_LOC, string'(", led_out, "));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, led_out);
+ STD.TEXTIO.write(TX_LOC, string'("]"));
+ TX_STR(TX_LOC.all'range) := TX_LOC.all;
+ STD.TEXTIO.writeline(RESULTS, TX_LOC);
+ STD.TEXTIO.Deallocate(TX_LOC);
+ END;
+ BEGIN
+ WAIT for 1 fs;
+ ANNOTATE_led_out(0);
+ WAIT for OFFSET;
+ TX_TIME := TX_TIME + 100;
+ ANNO_LOOP : LOOP
+ --Rising Edge
+ WAIT for 115 ns;
+ TX_TIME := TX_TIME + 115;
+ ANNOTATE_led_out(TX_TIME);
+ WAIT for 85 ns;
+ TX_TIME := TX_TIME + 85;
+ END LOOP ANNO_LOOP;
+ END PROCESS;
+
+ PROCESS
+ BEGIN
+ -- ------------- Current Time: 185ns
+ WAIT FOR 185 ns;
+ switch_in_n <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 385ns
+ WAIT FOR 200 ns;
+ switch_in_n <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 585ns
+ WAIT FOR 200 ns;
+ switch_in_n <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 785ns
+ WAIT FOR 200 ns;
+ switch_in_n <= '0';
+ -- -------------------------------------
+ WAIT FOR 415 ns;
+
+ STD.TEXTIO.write(TX_OUT, string'("Total[]"));
+ STD.TEXTIO.writeline(RESULTS, TX_OUT);
+ ASSERT (FALSE) REPORT
+ "Success! Simulation for annotation completed"
+ SEVERITY FAILURE;
+ END PROCESS;
+
+ END testbench_arch;
+
Added: trunk/firmware/led/flip_flop_tbw.jhd
===================================================================
--- trunk/firmware/led/flip_flop_tbw.jhd (rev 0)
+++ trunk/firmware/led/flip_flop_tbw.jhd 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,3 @@
+MODULE flip_flop_tbw
+SUBMODULE flip_flop
+INSTANCE UUT
Added: trunk/firmware/led/flip_flop_tbw.xwv
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/led/flip_flop_tbw.xwv
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/led/flip_flop_tbw_beh.prj
===================================================================
--- trunk/firmware/led/flip_flop_tbw_beh.prj (rev 0)
+++ trunk/firmware/led/flip_flop_tbw_beh.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,2 @@
+vhdl work "flip_flop.vhd"
+vhdl work "flip_flop_tbw.vhw"
Added: trunk/firmware/led/flip_flop_tbw_bencher.prj
===================================================================
--- trunk/firmware/led/flip_flop_tbw_bencher.prj (rev 0)
+++ trunk/firmware/led/flip_flop_tbw_bencher.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1 @@
+vhdl work "flip_flop.vhd"
Added: trunk/firmware/led/led_top_tbw.ant
===================================================================
--- trunk/firmware/led/led_top_tbw.ant (rev 0)
+++ trunk/firmware/led/led_top_tbw.ant 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,211 @@
+--------------------------------------------------------------------------------
+-- Copyright (c) 1995-2003 Xilinx, Inc.
+-- All Right Reserved.
+--------------------------------------------------------------------------------
+-- ____ ____
+-- / /\/ /
+-- /___/ \ / Vendor: Xilinx
+-- \ \ \/ Version : 9.1i
+-- \ \ Application : ISE
+-- / / Filename : led_top_tbw.ant
+-- /___/ /\ Timestamp : Fri Apr 13 22:51:37 2007
+-- \ \ / \
+-- \___\/\___\
+--
+--Command:
+--Design Name: led_top_tbw
+--Device: Xilinx
+--
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+USE IEEE.STD_LOGIC_TEXTIO.ALL;
+USE STD.TEXTIO.ALL;
+
+ENTITY led_top_tbw IS
+END led_top_tbw;
+
+ARCHITECTURE testbench_arch OF led_top_tbw IS
+ FILE RESULTS: TEXT OPEN WRITE_MODE IS "/home/benoit/armadeus/trunk/firmware/led/led_top_tbw.ano";
+
+ COMPONENT led_top
+ PORT (
+ DataxD : InOut std_logic_vector (15 DownTo 0);
+ AddrxDI : In std_logic_vector (12 DownTo 0);
+ WRxBI : In std_logic;
+ RDxBI : In std_logic;
+ CSxBI : In std_logic;
+ clk : In std_logic;
+ button : In std_logic;
+ led : Out std_logic
+ );
+ END COMPONENT;
+
+ SIGNAL DataxD : std_logic_vector (15 DownTo 0) := "0000000000000000";
+ SIGNAL AddrxDI : std_logic_vector (12 DownTo 0) := "0000000000000";
+ SIGNAL WRxBI : std_logic := '0';
+ SIGNAL RDxBI : std_logic := '0';
+ SIGNAL CSxBI : std_logic := '0';
+ SIGNAL clk : std_logic := '0';
+ SIGNAL button : std_logic := '0';
+ SIGNAL led : std_logic := '0';
+
+ SHARED VARIABLE TX_ERROR : INTEGER := 0;
+ SHARED VARIABLE TX_OUT : LINE;
+
+ constant PERIOD : time := 20 ns;
+ constant DUTY_CYCLE : real := 0.5;
+ constant OFFSET : time := 100 ns;
+
+ BEGIN
+ UUT : led_top
+ PORT MAP (
+ DataxD => DataxD,
+ AddrxDI => AddrxDI,
+ WRxBI => WRxBI,
+ RDxBI => RDxBI,
+ CSxBI => CSxBI,
+ clk => clk,
+ button => button,
+ led => led
+ );
+
+ PROCESS -- clock process for clk
+ BEGIN
+ WAIT for OFFSET;
+ CLOCK_LOOP : LOOP
+ clk <= '0';
+ WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
+ clk <= '1';
+ WAIT FOR (PERIOD * DUTY_CYCLE);
+ END LOOP CLOCK_LOOP;
+ END PROCESS;
+
+ PROCESS -- Annotation process for clk
+ VARIABLE TX_TIME : INTEGER := 0;
+
+ PROCEDURE ANNOTATE_led(
+ TX_TIME : INTEGER
+ ) IS
+ VARIABLE TX_STR : String(1 to 4096);
+ VARIABLE TX_LOC : LINE;
+ BEGIN
+ STD.TEXTIO.write(TX_LOC, string'("Annotate["));
+ STD.TEXTIO.write(TX_LOC, TX_TIME);
+ STD.TEXTIO.write(TX_LOC, string'(", led, "));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, led);
+ STD.TEXTIO.write(TX_LOC, string'("]"));
+ TX_STR(TX_LOC.all'range) := TX_LOC.all;
+ STD.TEXTIO.writeline(RESULTS, TX_LOC);
+ STD.TEXTIO.Deallocate(TX_LOC);
+ END;
+ BEGIN
+ WAIT for 1 fs;
+ ANNOTATE_led(0);
+ WAIT for OFFSET;
+ TX_TIME := TX_TIME + 100;
+ ANNO_LOOP : LOOP
+ --Rising Edge
+ WAIT for 11 ns;
+ TX_TIME := TX_TIME + 11;
+ ANNOTATE_led(TX_TIME);
+ WAIT for 9 ns;
+ TX_TIME := TX_TIME + 9;
+ END LOOP ANNO_LOOP;
+ END PROCESS;
+
+ PROCESS
+ BEGIN
+ -- ------------- Current Time: 129ns
+ WAIT FOR 129 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 169ns
+ WAIT FOR 40 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 189ns
+ WAIT FOR 20 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 209ns
+ WAIT FOR 20 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 249ns
+ WAIT FOR 40 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 269ns
+ WAIT FOR 20 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 309ns
+ WAIT FOR 40 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 369ns
+ WAIT FOR 60 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 549ns
+ WAIT FOR 180 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 669ns
+ WAIT FOR 120 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 809ns
+ WAIT FOR 140 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 1029ns
+ WAIT FOR 220 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 1409ns
+ WAIT FOR 380 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 2709ns
+ WAIT FOR 1300 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 4269ns
+ WAIT FOR 1560 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 4309ns
+ WAIT FOR 40 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 4769ns
+ WAIT FOR 460 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 5429ns
+ WAIT FOR 660 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 6629ns
+ WAIT FOR 1200 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 8269ns
+ WAIT FOR 1640 ns;
+ button <= '0';
+ -- -------------------------------------
+ WAIT FOR 1751 ns;
+
+ STD.TEXTIO.write(TX_OUT, string'("Total[]"));
+ STD.TEXTIO.writeline(RESULTS, TX_OUT);
+ ASSERT (FALSE) REPORT
+ "Success! Simulation for annotation completed"
+ SEVERITY FAILURE;
+ END PROCESS;
+
+ END testbench_arch;
+
Added: trunk/firmware/led/led_top_tbw.jhd
===================================================================
--- trunk/firmware/led/led_top_tbw.jhd (rev 0)
+++ trunk/firmware/led/led_top_tbw.jhd 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,3 @@
+MODULE led_top_tbw
+SUBMODULE led_top
+INSTANCE UUT
Added: trunk/firmware/led/led_top_tbw.xwv
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/led/led_top_tbw.xwv
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/led/led_top_tbw_beh.prj
===================================================================
--- trunk/firmware/led/led_top_tbw_beh.prj (rev 0)
+++ trunk/firmware/led/led_top_tbw_beh.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,5 @@
+vhdl work "flip_flop.vhd"
+vhdl work "debouncer.vhd"
+vhdl work "clock_divider.vhd"
+vhdl work "led_top.vhd"
+vhdl work "led_top_tbw.vhw"
Added: trunk/firmware/led/led_top_tbw_bencher.prj
===================================================================
--- trunk/firmware/led/led_top_tbw_bencher.prj (rev 0)
+++ trunk/firmware/led/led_top_tbw_bencher.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,4 @@
+vhdl work "flip_flop.vhd"
+vhdl work "debouncer.vhd"
+vhdl work "clock_divider.vhd"
+vhdl work "led_top.vhd"
Added: trunk/firmware/led/led_top_tbw_gen.prj
===================================================================
--- trunk/firmware/led/led_top_tbw_gen.prj (rev 0)
+++ trunk/firmware/led/led_top_tbw_gen.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,5 @@
+vhdl work "flip_flop.vhd"
+vhdl work "debouncer.vhd"
+vhdl work "clock_divider.vhd"
+vhdl work "led_top.vhd"
+vhdl work "led_top_tbw.ant"
Added: trunk/firmware/led/led_top_tbw_par.prj
===================================================================
--- trunk/firmware/led/led_top_tbw_par.prj (rev 0)
+++ trunk/firmware/led/led_top_tbw_par.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,2 @@
+vhdl work "netgen/par/led_top_timesim.vhd"
+vhdl work "led_top_tbw.vhw"
Added: trunk/firmware/led/led_top_tbw_selfcheck.ant
===================================================================
--- trunk/firmware/led/led_top_tbw_selfcheck.ant (rev 0)
+++ trunk/firmware/led/led_top_tbw_selfcheck.ant 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,211 @@
+--------------------------------------------------------------------------------
+-- Copyright (c) 1995-2003 Xilinx, Inc.
+-- All Right Reserved.
+--------------------------------------------------------------------------------
+-- ____ ____
+-- / /\/ /
+-- /___/ \ / Vendor: Xilinx
+-- \ \ \/ Version : 9.1i
+-- \ \ Application : ISE
+-- / / Filename : led_top_tbw_selfcheck.ant
+-- /___/ /\ Timestamp : Fri Apr 13 22:51:44 2007
+-- \ \ / \
+-- \___\/\___\
+--
+--Command:
+--Design Name: led_top_tbw_selfcheck
+--Device: Xilinx
+--
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+USE IEEE.STD_LOGIC_TEXTIO.ALL;
+USE STD.TEXTIO.ALL;
+
+ENTITY led_top_tbw_selfcheck IS
+END led_top_tbw_selfcheck;
+
+ARCHITECTURE testbench_arch OF led_top_tbw_selfcheck IS
+ FILE RESULTS: TEXT OPEN WRITE_MODE IS "/home/benoit/armadeus/trunk/firmware/led/led_top_tbw_selfcheck.ano";
+
+ COMPONENT led_top
+ PORT (
+ DataxD : InOut std_logic_vector (15 DownTo 0);
+ AddrxDI : In std_logic_vector (12 DownTo 0);
+ WRxBI : In std_logic;
+ RDxBI : In std_logic;
+ CSxBI : In std_logic;
+ clk : In std_logic;
+ button : In std_logic;
+ led : Out std_logic
+ );
+ END COMPONENT;
+
+ SIGNAL DataxD : std_logic_vector (15 DownTo 0) := "0000000000000000";
+ SIGNAL AddrxDI : std_logic_vector (12 DownTo 0) := "0000000000000";
+ SIGNAL WRxBI : std_logic := '0';
+ SIGNAL RDxBI : std_logic := '0';
+ SIGNAL CSxBI : std_logic := '0';
+ SIGNAL clk : std_logic := '0';
+ SIGNAL button : std_logic := '0';
+ SIGNAL led : std_logic := 'U';
+
+ SHARED VARIABLE TX_ERROR : INTEGER := 0;
+ SHARED VARIABLE TX_OUT : LINE;
+
+ constant PERIOD : time := 20 ns;
+ constant DUTY_CYCLE : real := 0.5;
+ constant OFFSET : time := 100 ns;
+
+ BEGIN
+ UUT : led_top
+ PORT MAP (
+ DataxD => DataxD,
+ AddrxDI => AddrxDI,
+ WRxBI => WRxBI,
+ RDxBI => RDxBI,
+ CSxBI => CSxBI,
+ clk => clk,
+ button => button,
+ led => led
+ );
+
+ PROCESS -- clock process for clk
+ BEGIN
+ WAIT for OFFSET;
+ CLOCK_LOOP : LOOP
+ clk <= '0';
+ WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
+ clk <= '1';
+ WAIT FOR (PERIOD * DUTY_CYCLE);
+ END LOOP CLOCK_LOOP;
+ END PROCESS;
+
+ PROCESS -- Annotation process for clk
+ VARIABLE TX_TIME : INTEGER := 0;
+
+ PROCEDURE ANNOTATE_led(
+ TX_TIME : INTEGER
+ ) IS
+ VARIABLE TX_STR : String(1 to 4096);
+ VARIABLE TX_LOC : LINE;
+ BEGIN
+ STD.TEXTIO.write(TX_LOC, string'("Annotate["));
+ STD.TEXTIO.write(TX_LOC, TX_TIME);
+ STD.TEXTIO.write(TX_LOC, string'(", led, "));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, led);
+ STD.TEXTIO.write(TX_LOC, string'("]"));
+ TX_STR(TX_LOC.all'range) := TX_LOC.all;
+ STD.TEXTIO.writeline(RESULTS, TX_LOC);
+ STD.TEXTIO.Deallocate(TX_LOC);
+ END;
+ BEGIN
+ WAIT for 1 fs;
+ ANNOTATE_led(0);
+ WAIT for OFFSET;
+ TX_TIME := TX_TIME + 100;
+ ANNO_LOOP : LOOP
+ --Rising Edge
+ WAIT for 11 ns;
+ TX_TIME := TX_TIME + 11;
+ ANNOTATE_led(TX_TIME);
+ WAIT for 9 ns;
+ TX_TIME := TX_TIME + 9;
+ END LOOP ANNO_LOOP;
+ END PROCESS;
+
+ PROCESS
+ BEGIN
+ -- ------------- Current Time: 129ns
+ WAIT FOR 129 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 169ns
+ WAIT FOR 40 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 189ns
+ WAIT FOR 20 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 209ns
+ WAIT FOR 20 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 249ns
+ WAIT FOR 40 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 269ns
+ WAIT FOR 20 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 309ns
+ WAIT FOR 40 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 369ns
+ WAIT FOR 60 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 549ns
+ WAIT FOR 180 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 669ns
+ WAIT FOR 120 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 809ns
+ WAIT FOR 140 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 1029ns
+ WAIT FOR 220 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 1409ns
+ WAIT FOR 380 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 2709ns
+ WAIT FOR 1300 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 4269ns
+ WAIT FOR 1560 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 4309ns
+ WAIT FOR 40 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 4769ns
+ WAIT FOR 460 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 5429ns
+ WAIT FOR 660 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 6629ns
+ WAIT FOR 1200 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 8269ns
+ WAIT FOR 1640 ns;
+ button <= '0';
+ -- -------------------------------------
+ WAIT FOR 1751 ns;
+
+ STD.TEXTIO.write(TX_OUT, string'("Total[]"));
+ STD.TEXTIO.writeline(RESULTS, TX_OUT);
+ ASSERT (FALSE) REPORT
+ "Success! Simulation for annotation completed"
+ SEVERITY FAILURE;
+ END PROCESS;
+
+ END testbench_arch;
+
Added: trunk/firmware/led/led_top_tbw_selfcheck.vhw
===================================================================
--- trunk/firmware/led/led_top_tbw_selfcheck.vhw (rev 0)
+++ trunk/firmware/led/led_top_tbw_selfcheck.vhw 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,228 @@
+--------------------------------------------------------------------------------
+-- Copyright (c) 1995-2003 Xilinx, Inc.
+-- All Right Reserved.
+--------------------------------------------------------------------------------
+-- ____ ____
+-- / /\/ /
+-- /___/ \ / Vendor: Xilinx
+-- \ \ \/ Version : 9.1i
+-- \ \ Application : ISE
+-- / / Filename : led_top_tbw_selfcheck.vhw
+-- /___/ /\ Timestamp : Fri Apr 13 22:51:44 2007
+-- \ \ / \
+-- \___\/\___\
+--
+--Command:
+--Design Name: led_top_tbw_selfcheck
+--Device: Xilinx
+--
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+USE IEEE.STD_LOGIC_TEXTIO.ALL;
+USE STD.TEXTIO.ALL;
+
+ENTITY led_top_tbw_selfcheck IS
+END led_top_tbw_selfcheck;
+
+ARCHITECTURE testbench_arch OF led_top_tbw_selfcheck IS
+ COMPONENT led_top
+ PORT (
+ DataxD : InOut std_logic_vector (15 DownTo 0);
+ AddrxDI : In std_logic_vector (12 DownTo 0);
+ WRxBI : In std_logic;
+ RDxBI : In std_logic;
+ CSxBI : In std_logic;
+ clk : In std_logic;
+ button : In std_logic;
+ led : Out std_logic
+ );
+ END COMPONENT;
+
+ SIGNAL DataxD : std_logic_vector (15 DownTo 0) := "0000000000000000";
+ SIGNAL AddrxDI : std_logic_vector (12 DownTo 0) := "0000000000000";
+ SIGNAL WRxBI : std_logic := '0';
+ SIGNAL RDxBI : std_logic := '0';
+ SIGNAL CSxBI : std_logic := '0';
+ SIGNAL clk : std_logic := '0';
+ SIGNAL button : std_logic := '0';
+ SIGNAL led : std_logic := 'U';
+
+ SHARED VARIABLE TX_ERROR : INTEGER := 0;
+ SHARED VARIABLE TX_OUT : LINE;
+
+ constant PERIOD : time := 20 ns;
+ constant DUTY_CYCLE : real := 0.5;
+ constant OFFSET : time := 100 ns;
+
+ BEGIN
+ UUT : led_top
+ PORT MAP (
+ DataxD => DataxD,
+ AddrxDI => AddrxDI,
+ WRxBI => WRxBI,
+ RDxBI => RDxBI,
+ CSxBI => CSxBI,
+ clk => clk,
+ button => button,
+ led => led
+ );
+
+ PROCESS -- clock process for clk
+ BEGIN
+ WAIT for OFFSET;
+ CLOCK_LOOP : LOOP
+ clk <= '0';
+ WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
+ clk <= '1';
+ WAIT FOR (PERIOD * DUTY_CYCLE);
+ END LOOP CLOCK_LOOP;
+ END PROCESS;
+
+ PROCESS
+ PROCEDURE CHECK_led(
+ next_led : std_logic;
+ TX_TIME : INTEGER
+ ) IS
+ VARIABLE TX_STR : String(1 to 4096);
+ VARIABLE TX_LOC : LINE;
+ BEGIN
+ IF (led /= next_led) THEN
+ STD.TEXTIO.write(TX_LOC, string'("Error at time="));
+ STD.TEXTIO.write(TX_LOC, TX_TIME);
+ STD.TEXTIO.write(TX_LOC, string'("ns led="));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, led);
+ STD.TEXTIO.write(TX_LOC, string'(", Expected = "));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, next_led);
+ STD.TEXTIO.write(TX_LOC, string'(" "));
+ TX_STR(TX_LOC.all'range) := TX_LOC.all;
+ STD.TEXTIO.Deallocate(TX_LOC);
+ ASSERT (FALSE) REPORT TX_STR SEVERITY ERROR;
+ TX_ERROR := TX_ERROR + 1;
+ END IF;
+ END;
+ BEGIN
+ -- ------------- Current Time: 129ns
+ WAIT FOR 129 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 131ns
+ WAIT FOR 2 ns;
+ CHECK_led('0', 131);
+ -- -------------------------------------
+ -- ------------- Current Time: 169ns
+ WAIT FOR 38 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 171ns
+ WAIT FOR 2 ns;
+ CHECK_led('1', 171);
+ -- -------------------------------------
+ -- ------------- Current Time: 189ns
+ WAIT FOR 18 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 209ns
+ WAIT FOR 20 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 249ns
+ WAIT FOR 40 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 269ns
+ WAIT FOR 20 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 309ns
+ WAIT FOR 40 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 369ns
+ WAIT FOR 60 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 549ns
+ WAIT FOR 180 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 669ns
+ WAIT FOR 120 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 809ns
+ WAIT FOR 140 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 1029ns
+ WAIT FOR 220 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 1251ns
+ WAIT FOR 222 ns;
+ CHECK_led('0', 1251);
+ -- -------------------------------------
+ -- ------------- Current Time: 1409ns
+ WAIT FOR 158 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 2709ns
+ WAIT FOR 1300 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 2931ns
+ WAIT FOR 222 ns;
+ CHECK_led('1', 2931);
+ -- -------------------------------------
+ -- ------------- Current Time: 4269ns
+ WAIT FOR 1338 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 4309ns
+ WAIT FOR 40 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 4769ns
+ WAIT FOR 460 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 5429ns
+ WAIT FOR 660 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 5651ns
+ WAIT FOR 222 ns;
+ CHECK_led('0', 5651);
+ -- -------------------------------------
+ -- ------------- Current Time: 6629ns
+ WAIT FOR 978 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 8269ns
+ WAIT FOR 1640 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 8491ns
+ WAIT FOR 222 ns;
+ CHECK_led('1', 8491);
+ -- -------------------------------------
+ WAIT FOR 1529 ns;
+
+ IF (TX_ERROR = 0) THEN
+ STD.TEXTIO.write(TX_OUT, string'("No errors or warnings"));
+ ASSERT (FALSE) REPORT
+ "Simulation successful (not a failure). No problems detected."
+ SEVERITY FAILURE;
+ ELSE
+ STD.TEXTIO.write(TX_OUT, TX_ERROR);
+ STD.TEXTIO.write(TX_OUT,
+ string'(" errors found in simulation"));
+ ASSERT (FALSE) REPORT "Errors found during simulation"
+ SEVERITY FAILURE;
+ END IF;
+ END PROCESS;
+
+ END testbench_arch;
+
Added: trunk/firmware/led/led_top_tbw_selfcheck_beh_beh.prj
===================================================================
--- trunk/firmware/led/led_top_tbw_selfcheck_beh_beh.prj (rev 0)
+++ trunk/firmware/led/led_top_tbw_selfcheck_beh_beh.prj 2007-04-15 17:19:36 UTC (rev 586)
@@ -0,0 +1,5 @@
+vhdl work "flip_flop.vhd"
+vhdl work "debouncer.vhd"
+vhdl work "clock_divider.vhd"
+vhdl work "led_top.vhd"
+vhdl work "led_top_tbw_selfcheck_beh.vhd"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-04-15 16:52:39
|
Revision: 585
http://armadeus.svn.sourceforge.net/armadeus/?rev=585&view=rev
Author: thom25
Date: 2007-04-15 09:52:37 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
add missing file
Added Paths:
-----------
trunk/firmware/led/led_top_tbw_selfcheck_beh.vhd
Added: trunk/firmware/led/led_top_tbw_selfcheck_beh.vhd
===================================================================
--- trunk/firmware/led/led_top_tbw_selfcheck_beh.vhd (rev 0)
+++ trunk/firmware/led/led_top_tbw_selfcheck_beh.vhd 2007-04-15 16:52:37 UTC (rev 585)
@@ -0,0 +1,228 @@
+--------------------------------------------------------------------------------
+-- Copyright (c) 1995-2003 Xilinx, Inc.
+-- All Right Reserved.
+--------------------------------------------------------------------------------
+-- ____ ____
+-- / /\/ /
+-- /___/ \ / Vendor: Xilinx
+-- \ \ \/ Version : 9.1i
+-- \ \ Application : ISE
+-- / / Filename : led_top_tbw_selfcheck.vhw
+-- /___/ /\ Timestamp : Fri Apr 13 22:51:44 2007
+-- \ \ / \
+-- \___\/\___\
+--
+--Command:
+--Design Name: led_top_tbw_selfcheck_beh
+--Device: Xilinx
+--
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+USE IEEE.STD_LOGIC_TEXTIO.ALL;
+USE STD.TEXTIO.ALL;
+
+ENTITY led_top_tbw_selfcheck_beh IS
+END led_top_tbw_selfcheck_beh;
+
+ARCHITECTURE testbench_arch OF led_top_tbw_selfcheck_beh IS
+ COMPONENT led_top
+ PORT (
+ DataxD : InOut std_logic_vector (15 DownTo 0);
+ AddrxDI : In std_logic_vector (12 DownTo 0);
+ WRxBI : In std_logic;
+ RDxBI : In std_logic;
+ CSxBI : In std_logic;
+ clk : In std_logic;
+ button : In std_logic;
+ led : Out std_logic
+ );
+ END COMPONENT;
+
+ SIGNAL DataxD : std_logic_vector (15 DownTo 0) := "0000000000000000";
+ SIGNAL AddrxDI : std_logic_vector (12 DownTo 0) := "0000000000000";
+ SIGNAL WRxBI : std_logic := '0';
+ SIGNAL RDxBI : std_logic := '0';
+ SIGNAL CSxBI : std_logic := '0';
+ SIGNAL clk : std_logic := '0';
+ SIGNAL button : std_logic := '0';
+ SIGNAL led : std_logic := 'U';
+
+ SHARED VARIABLE TX_ERROR : INTEGER := 0;
+ SHARED VARIABLE TX_OUT : LINE;
+
+ constant PERIOD : time := 20 ns;
+ constant DUTY_CYCLE : real := 0.5;
+ constant OFFSET : time := 100 ns;
+
+ BEGIN
+ UUT : led_top
+ PORT MAP (
+ DataxD => DataxD,
+ AddrxDI => AddrxDI,
+ WRxBI => WRxBI,
+ RDxBI => RDxBI,
+ CSxBI => CSxBI,
+ clk => clk,
+ button => button,
+ led => led
+ );
+
+ PROCESS -- clock process for clk
+ BEGIN
+ WAIT for OFFSET;
+ CLOCK_LOOP : LOOP
+ clk <= '0';
+ WAIT FOR (PERIOD - (PERIOD * DUTY_CYCLE));
+ clk <= '1';
+ WAIT FOR (PERIOD * DUTY_CYCLE);
+ END LOOP CLOCK_LOOP;
+ END PROCESS;
+
+ PROCESS
+ PROCEDURE CHECK_led(
+ next_led : std_logic;
+ TX_TIME : INTEGER
+ ) IS
+ VARIABLE TX_STR : String(1 to 4096);
+ VARIABLE TX_LOC : LINE;
+ BEGIN
+ IF (led /= next_led) THEN
+ STD.TEXTIO.write(TX_LOC, string'("Error at time="));
+ STD.TEXTIO.write(TX_LOC, TX_TIME);
+ STD.TEXTIO.write(TX_LOC, string'("ns led="));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, led);
+ STD.TEXTIO.write(TX_LOC, string'(", Expected = "));
+ IEEE.STD_LOGIC_TEXTIO.write(TX_LOC, next_led);
+ STD.TEXTIO.write(TX_LOC, string'(" "));
+ TX_STR(TX_LOC.all'range) := TX_LOC.all;
+ STD.TEXTIO.Deallocate(TX_LOC);
+ ASSERT (FALSE) REPORT TX_STR SEVERITY ERROR;
+ TX_ERROR := TX_ERROR + 1;
+ END IF;
+ END;
+ BEGIN
+ -- ------------- Current Time: 129ns
+ WAIT FOR 129 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 131ns
+ WAIT FOR 2 ns;
+ CHECK_led('0', 131);
+ -- -------------------------------------
+ -- ------------- Current Time: 169ns
+ WAIT FOR 38 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 171ns
+ WAIT FOR 2 ns;
+ CHECK_led('1', 171);
+ -- -------------------------------------
+ -- ------------- Current Time: 189ns
+ WAIT FOR 18 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 209ns
+ WAIT FOR 20 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 249ns
+ WAIT FOR 40 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 269ns
+ WAIT FOR 20 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 309ns
+ WAIT FOR 40 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 369ns
+ WAIT FOR 60 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 549ns
+ WAIT FOR 180 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 669ns
+ WAIT FOR 120 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 809ns
+ WAIT FOR 140 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 1029ns
+ WAIT FOR 220 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 1251ns
+ WAIT FOR 222 ns;
+ CHECK_led('0', 1251);
+ -- -------------------------------------
+ -- ------------- Current Time: 1409ns
+ WAIT FOR 158 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 2709ns
+ WAIT FOR 1300 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 2931ns
+ WAIT FOR 222 ns;
+ CHECK_led('1', 2931);
+ -- -------------------------------------
+ -- ------------- Current Time: 4269ns
+ WAIT FOR 1338 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 4309ns
+ WAIT FOR 40 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 4769ns
+ WAIT FOR 460 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 5429ns
+ WAIT FOR 660 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 5651ns
+ WAIT FOR 222 ns;
+ CHECK_led('0', 5651);
+ -- -------------------------------------
+ -- ------------- Current Time: 6629ns
+ WAIT FOR 978 ns;
+ button <= '1';
+ -- -------------------------------------
+ -- ------------- Current Time: 8269ns
+ WAIT FOR 1640 ns;
+ button <= '0';
+ -- -------------------------------------
+ -- ------------- Current Time: 8491ns
+ WAIT FOR 222 ns;
+ CHECK_led('1', 8491);
+ -- -------------------------------------
+ WAIT FOR 1529 ns;
+
+ IF (TX_ERROR = 0) THEN
+ STD.TEXTIO.write(TX_OUT, string'("No errors or warnings"));
+ ASSERT (FALSE) REPORT
+ "Simulation successful (not a failure). No problems detected."
+ SEVERITY FAILURE;
+ ELSE
+ STD.TEXTIO.write(TX_OUT, TX_ERROR);
+ STD.TEXTIO.write(TX_OUT,
+ string'(" errors found in simulation"));
+ ASSERT (FALSE) REPORT "Errors found during simulation"
+ SEVERITY FAILURE;
+ END IF;
+ END PROCESS;
+
+ END testbench_arch;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-04-15 16:43:31
|
Revision: 584
http://armadeus.svn.sourceforge.net/armadeus/?rev=584&view=rev
Author: thom25
Date: 2007-04-15 09:43:28 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
add led example for the FPGA
Added Paths:
-----------
trunk/firmware/led/
trunk/firmware/led/clock_divider.vhd
trunk/firmware/led/clock_divider_tbw.tbw
trunk/firmware/led/debouncer.vhd
trunk/firmware/led/debouncer_tbw.tbw
trunk/firmware/led/flip_flop.vhd
trunk/firmware/led/flip_flop_tbw.tbw
trunk/firmware/led/led.ise
trunk/firmware/led/led.ucf
trunk/firmware/led/led_top.dia
trunk/firmware/led/led_top.vhd
trunk/firmware/led/led_top_tbw.tbw
trunk/firmware/led/schema
Added: trunk/firmware/led/clock_divider.vhd
===================================================================
--- trunk/firmware/led/clock_divider.vhd (rev 0)
+++ trunk/firmware/led/clock_divider.vhd 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,70 @@
+----------------------------------------------------------------------------------
+-- Company: Armadeus Project
+-- Engineer: Benoit Canet
+--
+-- Create Date: 22:04:02 04/12/2007
+-- Design Name:
+-- Module Name: clock_divider - behavioral
+-- Project Name:
+-- Target Devices:
+-- Tool versions:
+-- Description:
+--
+-- Dependencies:
+--
+-- Revision:
+-- Revision 0.01 - File Created
+-- Additional Comments:
+--
+----------------------------------------------------------------------------------
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+
+
+entity clock_divider is
+
+ -- clock division ratio (must be a multiple of 2)
+ generic(ratio : integer := 2);
+
+ port (clk_in : in STD_LOGIC;
+ clk_out : out STD_LOGIC);
+
+end clock_divider;
+
+architecture behavioral of clock_divider is
+
+ signal state : STD_LOGIC := '0';
+
+begin
+
+ process (clk_in)
+
+ variable count : integer range 0 to ratio;
+
+ begin
+
+ if (clk_in'event) and (clk_in = '1') then
+
+ -- count the number of clock change
+ count := count + 1;
+
+ -- if we waited long enough generate one clock change
+ if (count = ratio/2) then
+ state <= not state;
+ count := 0;
+ clk_out <= state;
+ end if;
+
+ end if;
+
+ end process;
+
+
+
+end behavioral;
+
+
+
+
Added: trunk/firmware/led/clock_divider_tbw.tbw
===================================================================
--- trunk/firmware/led/clock_divider_tbw.tbw (rev 0)
+++ trunk/firmware/led/clock_divider_tbw.tbw 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,42 @@
+version 3
+/home/benoit/armadeus/trunk/firmware/led/clock_divider.vhd
+clock_divider
+VHDL
+VHDL
+/home/benoit/armadeus/trunk/firmware/led/clock_divider_tbw.xwv
+Clocked
+-
+-
+1000000000
+ns
+GSR:true
+PRLD:false
+100000000
+CLOCK_LIST_BEGIN
+clk_in
+10000000
+10000000
+1000000
+1000000
+100000000
+RISING
+CLOCK_LIST_END
+SIGNAL_LIST_BEGIN
+clk_out
+clk_in
+SIGNAL_LIST_END
+SIGNALS_NOT_ON_DISPLAY
+clk_out_DIFF
+SIGNALS_NOT_ON_DISPLAY_END
+MARKER_LIST_BEGIN
+MARKER_LIST_END
+MEASURE_LIST_BEGIN
+MEASURE_LIST_END
+SIGNAL_ORDER_BEGIN
+clk_in
+clk_out
+SIGNAL_ORDER_END
+DIFFERENTIAL_CLKS_BEGIN
+DIFFERENTIAL_CLKS_END
+DIVIDERS_BEGIN
+DIVIDERS_END
Added: trunk/firmware/led/debouncer.vhd
===================================================================
--- trunk/firmware/led/debouncer.vhd (rev 0)
+++ trunk/firmware/led/debouncer.vhd 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,64 @@
+----------------------------------------------------------------------------------
+-- Company: Armadeus Project
+-- Engineer: Benoit Canet
+--
+-- Create Date: 21:48:05 04/12/2007
+-- Design Name:
+-- Module Name: debouncer - behavioral
+-- Project Name:
+-- Target Devices:
+-- Tool versions:
+-- Description:
+--
+-- Dependencies:
+--
+-- Revision:
+-- Revision 0.01 - File Created
+-- Additional Comments:
+-- original code comes from Dennis Smith
+-- http://homepage.mac.com/dgsmith1/HANDOUTS/EE452/debounce.vhd.txt
+----------------------------------------------------------------------------------
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+
+
+entity debouncer is
+ port ( clk_100hz : in STD_LOGIC;
+ button_in : in STD_LOGIC;
+ button_debounced_out : out STD_LOGIC);
+end debouncer;
+
+architecture behavioral of debouncer is
+
+ signal shift_pb : STD_LOGIC_VECTOR(3 DOWNTO 0) := "0000";
+ signal state : STD_LOGIC := '1';
+
+begin
+
+ process(clk_100hz)
+ begin
+ if (clk_100hz'event) and (clk_100hz = '1')
+ then
+ -- shift the register
+ shift_pb(2 DOWNTO 0) <= shift_pb(3 DOWNTO 1);
+ -- input the new sample in the register
+ shift_pb(3) <= button_in;
+ -- change output if needed
+ case shift_pb is
+ when "0000" =>
+ state <= '0';
+ when "1111" =>
+ state <= '1';
+ when others =>
+ state <= state;
+ end case;
+ end if;
+
+ end process;
+
+ button_debounced_out <= state;
+
+end behavioral;
+
Added: trunk/firmware/led/debouncer_tbw.tbw
===================================================================
--- trunk/firmware/led/debouncer_tbw.tbw (rev 0)
+++ trunk/firmware/led/debouncer_tbw.tbw 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,45 @@
+version 3
+/home/benoit/armadeus/trunk/firmware/led/debouncer.vhd
+debouncer
+VHDL
+VHDL
+/home/benoit/armadeus/trunk/firmware/led/debouncer_tbw.xwv
+Clocked
+-
+-
+10000000000
+ns
+GSR:true
+PRLD:false
+100000000
+CLOCK_LIST_BEGIN
+clk_100hz
+100000000
+100000000
+15000000
+15000000
+100000000
+RISING
+CLOCK_LIST_END
+SIGNAL_LIST_BEGIN
+button_debounced_out
+clk_100hz
+button_in
+clk_100hz
+SIGNAL_LIST_END
+SIGNALS_NOT_ON_DISPLAY
+button_debounced_out_DIFF
+SIGNALS_NOT_ON_DISPLAY_END
+MARKER_LIST_BEGIN
+MARKER_LIST_END
+MEASURE_LIST_BEGIN
+MEASURE_LIST_END
+SIGNAL_ORDER_BEGIN
+clk_100hz
+button_in
+button_debounced_out
+SIGNAL_ORDER_END
+DIFFERENTIAL_CLKS_BEGIN
+DIFFERENTIAL_CLKS_END
+DIVIDERS_BEGIN
+DIVIDERS_END
Added: trunk/firmware/led/flip_flop.vhd
===================================================================
--- trunk/firmware/led/flip_flop.vhd (rev 0)
+++ trunk/firmware/led/flip_flop.vhd 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,55 @@
+----------------------------------------------------------------------------------
+-- Company: Armadeus Project
+-- Engineer: Benoit Canet
+--
+-- Create Date: 21:21:27 04/12/2007
+-- Design Name:
+-- Module Name: flip_flop - Behavioral
+-- Project Name:
+-- Target Devices:
+-- Tool versions:
+-- Description:
+--
+-- Dependencies:
+--
+-- Revision:
+-- Revision 0.01 - File Created
+-- Additional Comments:
+--
+----------------------------------------------------------------------------------
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+
+
+entity flip_flop is
+ port (clk_100hz : in STD_LOGIC;
+ switch_in_n : in STD_LOGIC;
+ led_out : out STD_LOGIC);
+end flip_flop;
+
+
+architecture behavioral of flip_flop is
+
+begin
+
+ process(clk_100hz)
+ variable state : STD_LOGIC := '0';
+ variable latch : STD_LOGIC := '0';
+ begin
+ if clk_100hz'event and (clk_100hz = '1') then
+ -- switch_in_n is active when down
+ --( the switch is connected via a pullup)
+ if (switch_in_n = '0') and (latch /= switch_in_n) then
+ state := not state;
+ end if;
+ latch := switch_in_n;
+ led_out <= state;
+
+ end if;
+
+ end process;
+
+end behavioral;
+
Added: trunk/firmware/led/flip_flop_tbw.tbw
===================================================================
--- trunk/firmware/led/flip_flop_tbw.tbw (rev 0)
+++ trunk/firmware/led/flip_flop_tbw.tbw 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,45 @@
+version 3
+/home/benoit/armadeus/trunk/firmware/led/flip_flop.vhd
+flip_flop
+VHDL
+VHDL
+/home/benoit/armadeus/trunk/firmware/led/flip_flop_tbw.xwv
+Clocked
+-
+-
+1000000000
+ns
+GSR:true
+PRLD:false
+100000000
+CLOCK_LIST_BEGIN
+clk_100hz
+100000000
+100000000
+15000000
+15000000
+100000000
+RISING
+CLOCK_LIST_END
+SIGNAL_LIST_BEGIN
+led_out
+clk_100hz
+switch_in_n
+clk_100hz
+SIGNAL_LIST_END
+SIGNALS_NOT_ON_DISPLAY
+led_out_DIFF
+SIGNALS_NOT_ON_DISPLAY_END
+MARKER_LIST_BEGIN
+MARKER_LIST_END
+MEASURE_LIST_BEGIN
+MEASURE_LIST_END
+SIGNAL_ORDER_BEGIN
+clk_100hz
+switch_in_n
+led_out
+SIGNAL_ORDER_END
+DIFFERENTIAL_CLKS_BEGIN
+DIFFERENTIAL_CLKS_END
+DIVIDERS_BEGIN
+DIVIDERS_END
Added: trunk/firmware/led/led.ise
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/led/led.ise
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/led/led.ucf
===================================================================
--- trunk/firmware/led/led.ucf (rev 0)
+++ trunk/firmware/led/led.ucf 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,44 @@
+#PACE: Start of Constraints generated by PACE
+
+#PACE: Start of PACE I/O Pin Assignments
+NET "AddrxDI<0>" LOC = "P21" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<10>" LOC = "P33" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<11>" LOC = "P35" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<12>" LOC = "P36" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<1>" LOC = "P23" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<2>" LOC = "P24" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<3>" LOC = "P25" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<4>" LOC = "P26" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<5>" LOC = "P27" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<6>" LOC = "P28" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<7>" LOC = "P30" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<8>" LOC = "P31" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<9>" LOC = "P32" | IOSTANDARD = LVCMOS33 ;
+NET "button" LOC = "P119" | IOSTANDARD = LVCMOS33 ;
+NET "clk" LOC = "P55" | IOSTANDARD = LVCMOS33 ;
+NET "CSxBI" LOC = "P59" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<0>" LOC = "P1" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<10>" LOC = "P13" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<11>" LOC = "P14" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<12>" LOC = "P15" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<13>" LOC = "P17" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<14>" LOC = "P18" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<15>" LOC = "P20" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<1>" LOC = "P2" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<2>" LOC = "P4" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<3>" LOC = "P5" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<4>" LOC = "P6" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<5>" LOC = "P7" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<6>" LOC = "P8" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<7>" LOC = "P10" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<8>" LOC = "P11" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<9>" LOC = "P12" | IOSTANDARD = LVCMOS33 ;
+NET "led" LOC = "P118" | IOSTANDARD = LVCMOS33 ;
+NET "RDxBI" LOC = "P63" | IOSTANDARD = LVCMOS33 ;
+NET "WRxBI" LOC = "P60" | IOSTANDARD = LVCMOS33 ;
+
+#PACE: Start of PACE Area Constraints
+
+#PACE: Start of PACE Prohibit Constraints
+
+#PACE: End of Constraints generated by PACE
Added: trunk/firmware/led/led_top.dia
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/led/led_top.dia
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/led/led_top.vhd
===================================================================
--- trunk/firmware/led/led_top.vhd (rev 0)
+++ trunk/firmware/led/led_top.vhd 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,90 @@
+----------------------------------------------------------------------------------
+-- Company: Armadeus Project
+-- Engineer: Benoit Canet
+--
+-- Create Date: 22:37:46 04/12/2007
+-- Design Name:
+-- Module Name: led_top - structural
+-- Project Name:
+-- Target Devices:
+-- Tool versions:
+-- Description:
+--
+-- Dependencies:
+--
+-- Revision:
+-- Revision 0.01 - File Created
+-- Additional Comments:
+--
+----------------------------------------------------------------------------------
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.STD_LOGIC_ARITH.ALL;
+use IEEE.STD_LOGIC_UNSIGNED.ALL;
+
+entity led_top is
+ port ( -- Imx pins
+ DataxD : inout std_logic_vector(15 downto 0);
+ AddrxDI : in std_logic_vector(12 downto 0);
+ WRxBI : in std_logic;
+ RDxBI : in std_logic;
+ CSxBI : in std_logic;
+
+ --Our pins
+ clk : in STD_LOGIC;
+ button : in STD_LOGIC;
+ led : out STD_LOGIC);
+end led_top;
+
+architecture structural of led_top is
+
+ -- We declare the component we we'll use
+ component clock_divider
+ generic (ratio: integer);
+ port (clk_in : in STD_LOGIC;
+ clk_out : out STD_LOGIC);
+ end component;
+
+ component debouncer
+ port (clk_100hz : in STD_LOGIC;
+ button_in : in STD_LOGIC;
+ button_debounced_out : out STD_LOGIC);
+ end component;
+
+ component flip_flop
+ port (clk_100hz : in STD_LOGIC;
+ switch_in_n : in STD_LOGIC;
+ led_out : out STD_LOGIC);
+ end component;
+
+ -- internal signals
+ signal clk_100hz : STD_LOGIC;
+ signal button_debounced_n : STD_LOGIC;
+
+ begin
+
+ -- instantiate and connect the clock divider
+ -- here we use a 96MHz/100Hz=960000 ratio
+ i_clock_divider_identifier : clock_divider
+ generic map(ratio => 960000)
+ -- for simulation purpose use the following line
+ -- instead of the previous
+ -- generic map(ratio => 2)
+
+ port map (clk_in => clk,
+ clk_out => clk_100hz);
+
+ --instantiate and connect the debouncer
+ i_debouncer_identifier : debouncer
+ port map (button_in => button,
+ clk_100hz => clk_100hz,
+ button_debounced_out => button_debounced_n);
+
+ --instantiate and connect the flip flop
+ i_flip_flop_identifier : flip_flop
+ port map (clk_100hz => clk_100hz,
+ switch_in_n => button_debounced_n,
+ led_out => led);
+
+end structural;
+
Added: trunk/firmware/led/led_top_tbw.tbw
===================================================================
--- trunk/firmware/led/led_top_tbw.tbw (rev 0)
+++ trunk/firmware/led/led_top_tbw.tbw 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,60 @@
+version 3
+/home/benoit/armadeus/trunk/firmware/led/led_top.vhd
+led_top
+VHDL
+VHDL
+/home/benoit/armadeus/trunk/firmware/led/led_top_tbw.xwv
+Clocked
+-
+-
+10000000000
+ns
+GSR:true
+PRLD:false
+100000000
+CLOCK_LIST_BEGIN
+clk
+10000000
+10000000
+1000000
+1000000
+100000000
+RISING
+CLOCK_LIST_END
+SIGNAL_LIST_BEGIN
+AddrxDI
+clk
+CSxBI
+clk
+DataxD
+clk
+RDxBI
+clk
+WRxBI
+clk
+button
+clk
+led
+clk
+SIGNAL_LIST_END
+SIGNALS_NOT_ON_DISPLAY
+led_DIFF
+SIGNALS_NOT_ON_DISPLAY_END
+MARKER_LIST_BEGIN
+MARKER_LIST_END
+MEASURE_LIST_BEGIN
+MEASURE_LIST_END
+SIGNAL_ORDER_BEGIN
+clk
+button
+led
+AddrxDI
+CSxBI
+DataxD
+RDxBI
+WRxBI
+SIGNAL_ORDER_END
+DIFFERENTIAL_CLKS_BEGIN
+DIFFERENTIAL_CLKS_END
+DIVIDERS_BEGIN
+DIVIDERS_END
Added: trunk/firmware/led/schema
===================================================================
--- trunk/firmware/led/schema (rev 0)
+++ trunk/firmware/led/schema 2007-04-15 16:43:28 UTC (rev 584)
@@ -0,0 +1,37 @@
+v 20060906 1
+C 55400 64400 1 0 0 3.3V-plus-1.sym
+C 55300 62200 1 0 1 diode-1.sym
+{
+T 54900 62800 5 10 0 0 0 6 1
+device=DIODE
+T 55000 62700 5 10 1 1 0 6 1
+refdes=D1
+}
+C 54400 63100 1 0 0 pushbutton.sym
+C 56500 62300 1 0 1 resistor-1.sym
+{
+T 56200 62700 5 10 0 0 0 6 1
+device=RESISTOR
+T 56300 62600 5 10 1 1 0 6 1
+refdes=R1
+}
+C 55700 63200 1 90 0 resistor-1.sym
+{
+T 55300 63500 5 10 0 0 90 0 1
+device=RESISTOR
+T 55400 63400 5 10 1 1 90 0 1
+refdes=R2
+}
+N 55600 62400 55300 62400 4
+N 54400 61800 54400 63200 4
+N 55600 64100 55600 64400 4
+N 55200 63200 57000 63200 4
+N 56500 62400 57000 62400 4
+T 57200 64600 9 10 1 0 0 0 1
+R2=47 kOhm
+T 57200 64200 9 10 1 0 0 0 1
+R1=850 Ohm
+T 57200 62400 9 10 1 0 0 0 1
+L28P_1/P118/led
+T 57200 63200 9 10 1 0 0 0 1
+L28N_1/P119/button
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-04-15 09:23:59
|
Revision: 583
http://armadeus.svn.sourceforge.net/armadeus/?rev=583&view=rev
Author: artemys
Date: 2007-04-15 02:23:57 -0700 (Sun, 15 Apr 2007)
Log Message:
-----------
[DRIVERS] Add sound file playing capability to PWM driver
Modified Paths:
--------------
trunk/target/linux/modules/pwm/core.c
trunk/target/linux/modules/pwm/test/Makefile
trunk/target/linux/modules/pwm/test/testplaymode.c
Added Paths:
-----------
trunk/target/linux/modules/pwm/test/Chimes.raw
trunk/target/linux/modules/pwm/test/KDE_Startup_2.raw
Modified: trunk/target/linux/modules/pwm/core.c
===================================================================
--- trunk/target/linux/modules/pwm/core.c 2007-04-02 20:27:06 UTC (rev 582)
+++ trunk/target/linux/modules/pwm/core.c 2007-04-15 09:23:57 UTC (rev 583)
@@ -3,7 +3,7 @@
* Driver for the i.MXl PWM driver
*
* This driver is part of the Armadeus project and is the merge of a lot of ideas
- * found on Internet.
+ * found on the Web.
*
* 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
@@ -21,6 +21,7 @@
*
*
*/
+//#define DEBUG 1
#include <linux/module.h>
#include <linux/version.h>
@@ -39,10 +40,6 @@
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
-#include <linux/ptrace.h>
-#include <linux/ioport.h>
-#include <linux/in.h>
-//#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/string.h>
@@ -50,20 +47,24 @@
#include <asm/bitops.h>
#include <asm/io.h>
#include <linux/errno.h>
-//#include <linux/tqueue.h>
#include <linux/wait.h>
#include <linux/pm.h>
// For /sys
#include <linux/sysdev.h>
// For struct class
#include <linux/device.h>
+// For circular buffer
+#include <linux/circ_buf.h>
#include <asm/irq.h>
#include <asm/arch/hardware.h>
#include <asm/arch/irqs.h>
// For register adresses
#include <asm/arch/imx-regs.h>
-#define PWMC_PRESCALER_MASK (0x7F << 8) // not defined in imx-regs ?
+// additional defines
+#define PWMC_PRESCALER_MASK 0x00007F00
+#define PWMC_REPEAT_MASK 0x0000000C
+#define PWMC_CLKSEL_MASK 0x00000003
//
#include <linux/platform_device.h>
@@ -72,7 +73,7 @@
#define PWM_TEST
#define DRIVER_NAME "imx-pwm"
-#define DRIVER_VERSION "0.4"
+#define DRIVER_VERSION "0.5"
#define DEV_IRQ_NAME DRIVER_NAME
#define DEV_IRQ_ID DRIVER_NAME
@@ -80,13 +81,7 @@
//#define PK(fmt, args...) printk(fmt, ## args)
#define PK(...)
-#define PWM_FIFO_AV 0x20
-#define PWM_IRQ_AV 0x80
-// def in linux/compiler.h
-//#define unlikely(TOTO) (TOTO > 0)
-
-
struct pwm_device {
u32 reg;
int active;
@@ -100,21 +95,20 @@
#define to_pwm_device(d) container_of(d, struct pwm_device, class_dev)
-// variables
-int gWriteOk;
+// Global variables
int gPwmMode;
-char *gpWriteBuf;
+//char *gpWriteBuf;
+int g4bytes; // count 4 bytes write occurence to FIFO
+u8 *gpWriteBufPtr;
+u16 *gpWriteBufPtr16;
+int gDataLen = PWM_DATA_8BIT;
+u16 gSampleValue;
-u8 *gpWriteBufPtr8;
-u16 *gpWriteBufPtr16;
-int gWriteCnt;
-int gDataLen;
-u16 gSampleValue;
-
int irq = 0;
module_param(irq, int, 0);
-wait_queue_head_t ts_wait;
+wait_queue_head_t write_wait;
+wait_queue_head_t exit_wait;
struct fasync_struct *ts_fasync;
int gMajor = 0; /* TODO dynamic major for now */
@@ -205,7 +199,51 @@
}
};
+/****************************************************************
+ * Circular buffer handling four sound playing
+ ***************************************************************/
+struct sound_circ_buf {
+ char* buf;
+ int write; // == head
+ int read; // == tail
+ int size;
+};
+
+static inline u8 get_byte_from_circbuf( struct sound_circ_buf* abuffer )
+{
+ u8 b = abuffer->buf[ abuffer->read ];
+ abuffer->read = (abuffer->read + 1) & (abuffer->size - 1);
+ return b;
+}
+
+static inline u16 get_word_from_circbuf( struct sound_circ_buf* abuffer )
+{
+ u16 w = *((u16*)((abuffer->buf)[ abuffer->read ]));
+ abuffer->read = (abuffer->read + 2) & (abuffer->size - 1);
+ return w;
+}
+
+static inline void put_byte_to_circbuf( struct sound_circ_buf* abuffer, unsigned char abyte )
+{
+ abuffer->buf[ abuffer->write ] = abyte;
+ abuffer->write = (abuffer->write + 1) & (abuffer->size - 1);
+}
+
+static inline void increase_circbuf( struct sound_circ_buf* abuffer, int count )
+{
+ abuffer->write = (abuffer->write + count) & (abuffer->size - 1);
+ pr_debug("Added %d bytes to buffer, now write is in pos %d\n", count, abuffer->write);
+}
+
+#define MAX_SOUND_BUFFER_SIZE (16*1024) // !! Should be a power of 2 !!
+static struct sound_circ_buf gPWM_Circ_Buf;
+
+/****************************************************************
+ *
+ ***************************************************************/
+
+
/**
* setup_pwm_unit - common setup function whenever something was changed
* @ppd: PWM unit to work with
@@ -223,10 +261,10 @@
// Setup prescaler
pr_debug("Updating PWM registers\n");
PWMC = (PWMC & ~PWMC_PRESCALER_MASK) | PWMC_PRESCALER(ppd->entry->prescaler) /*| PWMC_REPEAT(3)*/;
-
+
// Setup period
PWMP = PWMP_PERIOD(ppd->entry->period);
-
+
// Setup duty
PWMS = PWMS_SAMPLE( (u32) ((ppd->entry->period * ppd->duty) / 1000) );
/* unsigned duty;
@@ -245,41 +283,6 @@
}
}
-
-// -----------------------
-// FUNCTION ROUTINES
-// -----------------------
-
-//delay for a while
-// static void delay (void)
-// {
-// u32 i=0;
-// for (i=0; i<10000; i++);
-// }
-
-//software reset
-// static void soft_reset (void)
-// {
-// // int i;
-//
-// //enable the PWM
-// PWMC |= 0x00000010;
-//
-// // set SWR bit to 1
-// PWMC |= 0x00010000;
-//
-// //disable the PWM
-// PWMC &= ~0x00000010;
-//
-// //delay because PWM released after 5 system clock
-// udelay(5);
-// // for(i=0;i<5;i++)
-// // delay();
-// }
-
-// --------------------------------------------------------------------
-// local rutines
-
/******************************************************************************
* Function Name: checkDevice
*
@@ -340,22 +343,15 @@
static void StopPwm(void)
{
- if(gpWriteBuf)
- kfree(gpWriteBuf);
-
PWMC &= ~PWMC_IRQEN; // disable IRQ
PWMC &= ~PWMC_EN; // disable PWM
- gWriteOk = 1;
- gWriteCnt = 0;
- gDataLen = 0;
gSampleValue = 0;
-
if(gPwmMode == PWM_TONE_MODE)
- StopTimer(&pwmTimer);
+ StopTimer(&pwmTimer);
- // can release PWM now
- wake_up_interruptible(&ts_wait);
+ // Can release file now
+ wake_up_interruptible(&exit_wait);
PK("<1>data completed.\n");
PK("<1>PWMC = 0x%8x\n", (u32)PWMC);
@@ -363,30 +359,30 @@
static void pwmIntFunc( unsigned long unused)
{
- u32 period;
+// u32 period;
PK("<1>pwm sam int\n");
- if (gWriteCnt > 0)
- {
- PK("<1>PWMS = 0x%4x\n", (u16)_reg_PWM_PWMS);
+// if (gWriteCnt > 0)
+// {
+// PK("<1>PWMS = 0x%4x\n", (u16)_reg_PWM_PWMS);
+//
+// // 96M/128/2/period
+// period = *gpWriteBufPtr16++;
+//
+// if(period > 0)
+// // PWMP = 96000000/128/12/2/period; //96000000/128/2*11
+// PWMP = 66000000/128/2/period; //96000000/128/2*11
+// PK("<1>PWMP = 0x%4x\n", (u16)PWMP);
+// PK("<1>PWMCNT = 0x%4x\n", (u16)PWMCNT);
+//
+// StartTimer(&pwmTimer);
+//
+// gWriteCnt--;
+// }
+// else
+// StopPwm();
- // 96M/128/2/period
- period = *gpWriteBufPtr16++;
-
- if(period > 0)
-// PWMP = 96000000/128/12/2/period; //96000000/128/2*11
- PWMP = 66000000/128/2/period; //96000000/128/2*11
- PK("<1>PWMP = 0x%4x\n", (u16)PWMP);
- PK("<1>PWMCNT = 0x%4x\n", (u16)PWMCNT);
-
- StartTimer(&pwmTimer);
-
- gWriteCnt--;
- }
- else
- StopPwm();
-
}
// static int handle_pm_event(struct pm_dev *dev, pm_request_t rqst, void *data)
@@ -411,13 +407,10 @@
/******************************************************************************
*
*****************************************************************************/
-
static int initPWM(void)
{
- // Init Port PA[2] : PWMO
- //PCCR1 |= 0x10000000; PA2_PF_PWM0;
+ // Init Port PA[2] : PWMO
// Should be done in apf9328.c non ???
-
DDIR(0) |= 0x00000002;
GIUS(0) &= ~0x00000002;
GPR(0) &= ~0x00000002;
@@ -434,32 +427,33 @@
return 1;
}
-//////////////////////////////////////// /DEV INTERFACE //////////////////////////////////////////////////////////////
+//////////////////////////////////////// /DEV INTERFACE ////////////////////////////////////////////
/*
- *
+ * Called from user space close()
*/
int pwm_release(struct inode * inode, struct file * filp)
{
// wait unit gWriteCnt == 0
- interruptible_sleep_on(&ts_wait);
+ interruptible_sleep_on(&exit_wait);
- printk(DRIVER_NAME " unloaded successfully\n");
+ if( gPWM_Circ_Buf.buf ) {
+ kfree( gPWM_Circ_Buf.buf );
+ gPWM_Circ_Buf.buf = 0;
+ }
+ printk(DRIVER_NAME " released, 4 bytes FIFO usage: %d\n", g4bytes);
return 0;
}
/*
- *
+ * Called from user space open()
*/
int pwm_open(struct inode * inode, struct file * filp)
{
- PK("<1>in pwm_open ----\n");
-
// Init PWM hardware
initPWM();
- gWriteOk = 0;
- printk(DRIVER_NAME " opened \n");
+ pr_debug(DRIVER_NAME " opened \n");
return 0;
}
@@ -468,224 +462,243 @@
*/
static int pwm_fasync(int fd, struct file *filp, int mode)
{
- PK("<1>in pwm_fasyn ----\n");
+ PK("<1>in pwm_fasyn ----\n");
#if 0
- /* TODO TODO put this data into file private data */
- int minor = checkDevice( filp->f_dentry->d_inode);
- if ( minor == - 1)
- {
- PK("<1>asp_fasyn:bad device minor\n");
- return -ENODEV;
- }
+ /* TODO TODO put this data into file private data */
+ int minor = checkDevice( filp->f_dentry->d_inode);
+ if ( minor == - 1)
+ {
+ PK("<1>asp_fasyn:bad device minor\n");
+ return -ENODEV;
+ }
- return( fasync_helper(fd, filp, mode, &ts_fasync) );
+ return( fasync_helper(fd, filp, mode, &ts_fasync) );
#endif
- return 0;
+ return 0;
}
/*
- *
+ * Called from user space ioctl()
*/
int pwm_ioctl(struct inode * inode, struct file *filp, unsigned int cmd, unsigned long arg)
{
char *str=NULL;
int ret = 0;
- PK("<1>in pwm_ioctl ----\n");
+ pr_debug("pwm_ioctl ----\n");
switch(cmd)
{
+ // Set PWM Mode (Tone or Playback)
case PWM_IOC_SMODE:
{
gPwmMode = arg;
if (gPwmMode == PWM_TONE_MODE)
{
- // create periodic timer when tone mode
- PK("PWM Tone Mode.\n");
- pwmTimer.timer_blk_ptr = &timer_blk;
- pwmTimer.timer_func = pwmIntFunc;
- CreateTimer(&pwmTimer);
+ // create periodic timer when tone mode
+ pr_debug("PWM Tone Mode.\n");
+ pwmTimer.timer_blk_ptr = &timer_blk;
+ pwmTimer.timer_func = pwmIntFunc;
+ CreateTimer(&pwmTimer);
}
else
{
- PK("PWM Play Mode.\n");
+ pr_debug("PWM Play Mode.\n");
}
}
break;
+ // Set Playback frequency/ouput rate
case PWM_IOC_SFREQ:
{
- PWMC &= ~0x00000010; // Disable PWM
-
- PWMC &= 0xFFFF00F0; // sysclk
-
+ PWMC &= ~PWMC_EN; // Disable PWM
+ PWMC &= ~PWMC_CLKSRC; // Select 16MHz PERCLK1 as CLK source
+ PWMC &= ~PWMC_PRESCALER_MASK; // PRESCALER = 0 => use full 16MHz
- // check sampling rate
- if (arg == PWM_SAMPLING_8KHZ)
+ switch(arg)
{
- // 96M / 23/2/256 = 8.152kHz
- // PWMC |= (0 << 8); // pres = 22 (/23)
- PWMC |= 0x00000900; // pres = 15 (/16) // 66M / 16/2/256 = 8.057KHZ
+ case PWM_SAMPLING_32KHZ:
+ PWMC &= ~PWMC_REPEAT_MASK; // REPEAT = 0 => divide by 1
+ PWMC &= ~PWMC_CLKSEL_MASK; // CLKSEL = 0 => divide by 2
+ // 16MHz/256/1/2 = 32768
+ str = "32Khz";
+ break;
+ case PWM_SAMPLING_16KHZ:
+ PWMC &= ~PWMC_REPEAT_MASK;
+ PWMC |= PWMC_REPEAT(1); // REPEAT = 01 => divide by 2
+ PWMC &= ~PWMC_CLKSEL_MASK; // CLKSEL = 0 => divide by 2
+ // 16MHz/256/2/2 = 16384
+ str = "16Khz";
+ break;
+ case PWM_SAMPLING_8KHZ:
+ default:
+ PWMC &= ~PWMC_REPEAT_MASK;
+ PWMC |= PWMC_REPEAT(2); // REPEAT = 10 => divide by 4
+ PWMC &= ~PWMC_CLKSEL_MASK; // CLKSEL = 0 => divide by 2
+ // 16MHz/256/4/2 = 8192
str = "8Khz";
+ break;
}
-
- else if (arg == PWM_SAMPLING_16KHZ)
- {
- PWMC |= (0 << 8); // pres = 11 (/12))
- str = "16Khz";
- }
-
- PWMC &= ~0x3; // clksel = 0 (/2)
-
- PK("<2>Sample rate = %s\n", str);
- PK("<1>ioctl: PWMC = 0x%8x\n", PWMC);
+ pr_debug("Sample rate = %s\n", str);
+ pr_debug("ioctl: PWMC = 0x%8x\n", PWMC);
}
break;
+ // Set samples length (8 or 16 bits)
case PWM_IOC_SDATALEN:
{
gDataLen = arg;
- if (arg == PWM_DATA_8BIT)
+ if( arg == PWM_DATA_8BIT )
{
- PWMP = 0xfe; // Period, 8bit
- str = "8bit";
+ PWMP = 0xfe; // Period, 8bit
+ str = "8bit";
}
else // if(arg == PWM_DATA_16BIT)
{
- PWMP = 0xfffe; // Period, 16bit
- str = "16bit";
+ PWMP = 0xfffe; // Period, 16bit
+ str = "16bit";
}
- PK("<2>Data Length = %s\n", str);
+ pr_debug("Data Length = %s\n", str);
}
break;
case PWM_IOC_SSAMPLE:
- gSampleValue = arg;
- break;
+ gSampleValue = arg;
+ break;
case PWM_IOC_SPERIOD:
- if (gPwmMode == PWM_TONE_MODE)
- {
- PK("<1>PWM period = %d\n",(int)arg);
- pwmTimer.period = arg/12;
- }
- break;
+ if (gPwmMode == PWM_TONE_MODE)
+ {
+ PK("<1>PWM period = %d\n",(int)arg);
+ pwmTimer.period = arg/12;
+ }
+ break;
case PWM_IOC_STOP:
- StopPwm();
- break;
+ StopPwm();
+ break;
-/*add--001begin*/
case PWM_IOC_SWAPDATA:
- if (arg&PWM_SWAP_HCTRL) //Halfword FIFO data swapping
- {
- PWMC |= PWM_SWAP_HCTRL;
- }
- else
- {
- PWMC &= ~PWM_SWAP_HCTRL;
- }
+ if (arg&PWM_SWAP_HCTRL) //Halfword FIFO data swapping
+ {
+ PWMC |= PWMC_HCTR;
+ }
+ else
+ {
+ PWMC &= ~PWMC_HCTR;
+ }
- if (arg&PWM_SWAP_BCTRL) //Byte FIFO data swapping
- {
- PWMC |= PWM_SWAP_BCTRL;
- }
- else
- {
- PWMC &= ~PWM_SWAP_BCTRL;
- }
-
+ if (arg&PWM_SWAP_BCTRL) //Byte FIFO data swapping
+ {
+ PWMC |= PWMC_BCTR;
+ }
+ else
+ {
+ PWMC &= ~PWMC_BCTR;
+ }
break;
-/*add--001end*/
default:
+ printk( DRIVER_NAME ": unkown IOCTL\n");
break;
}
- PK("<1>out pwm_ioctl ----\n");
return ret;
}
/******************************************************************************
- * Function Name: pwm_read
+ * Called from user space read()
*
- * Input: filp : the file
- * buf : data buffer
- * count : number of chars to be readed
- * l : offset of file
- * Value Returned: int : Return status.If no error, return 0.
- *
- * Description: read device driver
- *
- * Modification History:
- * 10 DEC,2001,
*****************************************************************************/
ssize_t pwm_read(struct file * filp, char * buf, size_t count, loff_t * l)
{
- int ret;
+ int ret = 0;
- if(gWriteCnt == 0)
+ if( PWMC & PWMC_IRQEN )
ret = 1; // no data
else
ret = 0; // processing data
- printk("pwm_read ----\n");
+ pr_debug("pwm_read ----\n");
return ret;
}
-static ssize_t pwm_write(struct file *filp,const char *buf,size_t count,loff_t *f_pos)
+/******************************************************************************
+ * Called from user space write()
+ *
+ *****************************************************************************/
+static ssize_t pwm_write( struct file *filp, const char *buf, size_t count, loff_t *f_pos )
{
int ret = 0;
+ int remaining_space = 0;
- PK("<1>in pwm_write ----\n");
+ pr_debug( "pwm_write ----\n" );
- gWriteOk = 0;
-
- gpWriteBuf = kmalloc(count, GFP_KERNEL);
- if (!gpWriteBuf)
+ if( count > MAX_SOUND_BUFFER_SIZE )
+ count = MAX_SOUND_BUFFER_SIZE;
+ // First time, allocate the double buffer
+ if( !gPWM_Circ_Buf.buf ) {
+ gPWM_Circ_Buf.buf = kmalloc( count*2, GFP_KERNEL );
+ if( !gPWM_Circ_Buf.buf ) {
goto out;
- gpWriteBufPtr8 = gpWriteBuf;
+ } else {
+ // Initialize circular buffer
+ gPWM_Circ_Buf.read = 0;
+ gPWM_Circ_Buf.write = 0;
+ gPWM_Circ_Buf.size = MAX_SOUND_BUFFER_SIZE*2;
+ }
+ }
- if (copy_from_user(gpWriteBuf, buf, count))
- {
- ret = -EFAULT;
- goto out;
+ // If there is enough space at the end of the buffer for all data in one copy, do it
+ remaining_space = gPWM_Circ_Buf.size - gPWM_Circ_Buf.write;
+ pr_debug("Remaining space to end: %d, must write: %d \n", remaining_space, count);
+ if( remaining_space >= count ) {
+ // Get data from UserSpace
+ if( copy_from_user( gPWM_Circ_Buf.buf + gPWM_Circ_Buf.write , buf, count ) ) {
+ ret = -EFAULT; goto out;
+ }
+ increase_circbuf( &gPWM_Circ_Buf, count );
+ // if not enough space, then
+ } else {
+ // Do it in 2 times
+ if( copy_from_user( gPWM_Circ_Buf.buf + gPWM_Circ_Buf.write, buf, remaining_space ) ) {
+ ret = -EFAULT; goto out;
+ }
+ increase_circbuf( &gPWM_Circ_Buf, remaining_space );
+ if( copy_from_user( gPWM_Circ_Buf.buf + gPWM_Circ_Buf.write, buf, count - remaining_space ) ) {
+ ret = -EFAULT; goto out;
+ }
+ increase_circbuf( &gPWM_Circ_Buf, count - remaining_space );
}
- //write data to PWM
- gWriteCnt = count;
- PK("<1>pwm_write: count = %d\n", gWriteCnt);
+ // Enable PWM
+ PWMC |= PWMC_EN; PWMS = 0x00000000;
- //enable IRQEN, PW
- PWMC |= 0x00000010;
-
- PWMS = 0x00000000;
-
- if(gPwmMode == PWM_PLAY_MODE)
+ if( gPwmMode == PWM_PLAY_MODE )
{
-// PK("before set IRQEN\n");
- PWMC |= 0x00000040;
- PK("PWMC1= 0x%08x\n", PWMC);
-// PWMS = 0x00000000;
+ PWMC |= PWMC_IRQEN; // Enable IRQ
}
else
{
PWMS = gSampleValue;
PWMC |= 0x7f00; // set prescaler to 128
- gpWriteBufPtr16 = (u16*)gpWriteBuf;
-
+/* gpWriteBufPtr16 = (u16*)gpWriteBuf;
gWriteCnt /= 2; //input size is 8bit size, need /2 to get 16bit size
+ StartTimer( &pwmTimer );*/
+ }
- StartTimer(&pwmTimer);
+ // Calculate how much space is left in buffer
+ remaining_space = CIRC_SPACE( gPWM_Circ_Buf.write, gPWM_Circ_Buf.read, gPWM_Circ_Buf.size );
+ pr_debug("Space left: %d\n", remaining_space);
+ if( remaining_space < count ) {
+ // Pauses user app until interrupt handler has consumed some data
+ interruptible_sleep_on( &write_wait );
}
- PK("<1>pwm_write: PWMC = 0x%8x\n", PWMC);
-
out:
-
- PK("<1>out pwm_write ----\n");
- return ret;
+ pr_debug( "out pwm_write PWMC = 0x%8x ----\n", PWMC );
+ return count;
}
@@ -818,8 +831,6 @@
return size;
}
-
-
/**
* pwm_show_frequency - return current frequency setting
* @dev: device to work with
@@ -906,7 +917,7 @@
ppd->active=0;
setup_pwm_unit(ppd);
-
+
return size;
}
@@ -989,40 +1000,70 @@
}
/*
- * PWM interrupt handler
+ * PWM interrupt handler (used in Play Mode only)
*/
static irqreturn_t pwm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
- u16 tmp16;
u32 status;
+ int remaining = 0;
- // clear status
+ // Acknowledge interrupt
status = PWMC;
- // check end
- if(gWriteCnt < 0)
+ remaining = CIRC_CNT( gPWM_Circ_Buf.write, gPWM_Circ_Buf.read, gPWM_Circ_Buf.size );
+ if( remaining <= 1024 && remaining > 1021 ) { // TODO make it better (I think a test each consumed sample is the only accurate solution
+ // Can accept new data now
+ wake_up_interruptible( &write_wait );
+ }
+
+ // End of sound buffer
+ if( remaining < 3 )
{
+ if(gDataLen == PWM_DATA_8BIT)
+ {
+ while( remaining )
+ {
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ /*PK("<1>(%d) pwm_int: PWMS = 0x%8x\n", gWriteCnt, PWMS);*/
+ remaining--;
+ }
+ }
+ else // if(gDataLen == PWM_DATA_16BIT) // one comparaison is enough
+ {
+ while( remaining )
+ {
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ //PK("<1>(%d) pwm_int: PWMS = 0x%8x\n", gWriteCnt, PWMS);
+ remaining--;
+ }
+ }
+
StopPwm();
goto end;
}
- if (gPwmMode == PWM_PLAY_MODE)
+ // Put sound samples in FIFO
+ if(gDataLen == PWM_DATA_8BIT)
{
- if(gDataLen == PWM_DATA_8BIT)
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ if (PWMC & PWMC_FIFOAV) // TODO: verify if needed
{
- PWMS = (u32)(*gpWriteBufPtr8++);
- PK("<1>(%d) pwm_int: PWMS = 0x%8x\n", gWriteCnt, PWMS);
-
- gWriteCnt--;
+ PWMS = (u32)(get_byte_from_circbuf( &gPWM_Circ_Buf ));
+ g4bytes++;
}
- else if(gDataLen == PWM_DATA_16BIT)
+ }
+ else // if(gDataLen == PWM_DATA_16BIT) // one comparaison is enough
+ {
+ // TODO: put good value in PWMC_BCTR to auto swap bytes if needed (do it at write or ioctl)
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ if (PWMC & PWMC_FIFOAV) // TODO: verify if needed
{
- tmp16 = *gpWriteBufPtr8++;
- tmp16 |= (*gpWriteBufPtr8++ << 8);
- PWMS = (u32)tmp16;
- PK("<1>(%d) pwm_int: PWMS = 0x%8x\n", gWriteCnt, PWMS);
-
- gWriteCnt -= 2;
+ PWMS = (u32)(get_word_from_circbuf( &gPWM_Circ_Buf ));
+ g4bytes++;
}
}
@@ -1060,13 +1101,15 @@
}
// init wait queue
- init_waitqueue_head(&ts_wait);
+ init_waitqueue_head(&write_wait);
+ init_waitqueue_head(&exit_wait);
+ pr_debug("Wait queues initialized\n");
// init PWM hardware module
initPWM();
printk("PWM driver v" DRIVER_VERSION "\n");
-
+
end:
return( result );
}
@@ -1090,7 +1133,7 @@
printk(KERN_INFO " Initializing PWM#%u...",pdev->id);
switch( pdev->id )
- {
+ {
// PWM0
case 0:
// Check if GPIO was initialized ??
@@ -1109,9 +1152,8 @@
err = -EBUSY;
goto exit;
}
-
pwm_init_from_probe();
-
+
// Create /sys stuf
if (unlikely((err=init_userinterface(pdev,res->start))))
goto release;
@@ -1214,7 +1256,6 @@
};
-
/*
* Called when module is insmoded
*/
@@ -1254,7 +1295,7 @@
*/
void __exit imx_pwm_exit(void)
{
- disable_irq( PWM_INT ); // should be done before free_irq non ?
+ disable_irq( PWM_INT ); // should be done before free_irq no ?
free_irq( PWM_INT, DEV_IRQ_ID );
unregister_chrdev( gMajor, DRIVER_NAME );
@@ -1268,7 +1309,7 @@
module_init(imx_pwm_init);
module_exit(imx_pwm_exit);
-MODULE_AUTHOR("Julien Boibessot, inspired by a lot of other PWM drivers");
+MODULE_AUTHOR("Julien Boibessot & Sebastien Royen, inspired by a lot of other PWM drivers");
MODULE_DESCRIPTION("Armadeus PWM driver");
MODULE_LICENSE("GPL");
Added: trunk/target/linux/modules/pwm/test/Chimes.raw
===================================================================
--- trunk/target/linux/modules/pwm/test/Chimes.raw (rev 0)
+++ trunk/target/linux/modules/pwm/test/Chimes.raw 2007-04-15 09:23:57 UTC (rev 583)
@@ -0,0 +1 @@
+\x80\x80\x80\x80\x80\x80\x80~\x80\x80\x80~\x80\x82~}\x81\x80~\x81}\x82\x82{\x82~\x80\x81{\x86}y\x83\x81|\x83~x\x85\x85w~\x86|\x84z|\x88x\x83\x81|\x84v\x85\x87w|\x86}~\x85{y\x88\x82v\x81\x84{\x82\x83v\x8A|x\x84|\x85}v\x86\x86w}\x85|\x80\x85x{\x8Aw\x83\x82{\x84\x81v\x82\x88z{\x84}\x85zy\x88\x83x\x80\x82{\x83\x83w\x88}z\x83~~\x86|w\x86\x85y\x82|\x82\x84x|\x88y\x81\x80}\x85w\x83\x85{~\x82{\x81\x86yz\x87\x81y\x81\x80{\x85\x82w\x80\x86}}\x82|\x86{x\x85\x82z\x80\x80|\x83\x83x}\x86~}\x81|~\x85~x\x82\x84{\x80|\x82\x84y{\x86\x81|\x80~}\x85\x80x\x80\x84}~\x80{\x81\x86{y\x84\x82}\x81~|\x84\x81x\x80\x85|~\x82{\x80\x86|{\x82}\x86~x\x81\x82}\x80~\x83~y\x83\x86~{|\x81\x84\x80{\x80\x81{~\x84\x82|{~\x82\x82}\x84}v\x81\x8A\x82wx\x81\x87\x81z\x84|w\x81\x89\x81xx\x82\x87z\x81\x83zy\x84\x88wy\x83\x87}z\x83\x82xz\x86\x87wy\x84\x87|{\x83\x80y|\x85\x85~w{\x85\x83{\x84}w~\x88\x86{t~\x89\x82x\x85}w}\x87\x87zt\x80\x87\x80|\x81\x81{z\x81\x87\x82xx\x82\x84~\x84xz\x84\x89\x81vy\x85\x84{|\x84\x82yy\x82\x89\x82vx\x83\x84~\x80\x82}y}\x85\x86~x~\x83~~\x83\x83zw\x88\x86yv\x80\x84}\x83\x82zx\x88\x85{y\x81\x80\x81\x82~y{\x83\x86y|\x81}\x82\x84}w{\x85\x87~x~\x82}\x81\x83w{\x85\x85x}\x82~\x80\x81\x82}v~\x84\x84~z~\x84\x82xz\x81\x86\x83y{\x81\x80}\x84\x81zw\x80\x87\x82|z\x80}\x80\x83y{\x82\x84\x80{~}\x83\x84|w|\x85\x85||\x80\x80}|\x83\x84|w}\x86\x83}z}\x80\x82\x83}y|\x83\x82\x80~z~\x84\x84|w\x84\x82}}\x80}}\x81\x84{z}\x83\x84z~\x82\x80{{\x82\x84\x81xz\x84\x83|z\x80\x85\x82zw\x81\x87\x80z{\x80\x83\x80||\x83\x82|{}\x82\x85\x80w{\x83\x83{~\x84\x80xx\x84\x89\x81xx\x81\x84z~\x84\x81|y~\x84\x82~z~\x82\x81}{\x81\x83~zy\x84\x89vy\x84\x86y}\x86\x82xw\x82\x89\x81zy~\x84\x80}}\x81\x82{y\x80\x86\x82z{\x82\x82}y~\x87\x83xu\x81\x8A\x81yx~\x84\x81|~\x83z{~\x84\x85x{\x83\x80}~\x80\x83\x80xy\x85\x86}{|\x81\x83}z\x85{}\x82\x81}{\x81~\x82~y{\x85\x84}z~\x81}}\x83\x85|x|\x81\x84\x81||\x81\x80z\x82\x81||\x83\x80~|z\x81\x82~\x81\x80yz\x80\x84\x85{x\x84~x\x83\x83}x~\x82\x80{~\x82\x80}{~\x81\x81|~~\x80~}\x81}|\x82\x82|x~\x84\x83|}\x80~|{\x80\x84\x83|w~\x80\x80\x81~\x80}z~\x80\x80\x84|u\x81\x85~{}~\x83|{\x85\x82vy\x85\x81~\x80z~\x83}x\x80\x84~~z~\x83~y\x82\x85|{{|\x84\x87{w\x81|\x80\x81\x81{y\x80\x86z|\x80\x80}}x\x80\x85\x81{|~~~\x80\x81}}~\x82z|\x81\x81\x80~}{z\x82\x84\x80|z~\x80\x80\x80~y}\x82\x85\x82yy}\x80\x81\x82\x81{z}\x81\x83|y~\x81\x81\x84~yy~\x83\x82\x80z{\x80\x80\x82\x80|xz\x81\x84\x86wx|\x81\x83\x84~z}}\x82\x83|vy\x83\x85\x85\x80wwz\x80\x84\x85\x80w{\x81\x82\x80|xy\x83\x86\x84\x82xsz\x83\x85\x83w{\x81\x82\x81}xw\x81\x86\x84\x83zuy\x84\x85\x82yz\x80\x80\x82\x80yw~\x83\x83\x86~vy|\x83\x84|z\x81\x80~zx~\x84\x84\x85~sx\x80\x82\x82\x81|{\x81\x81\x82xt{\x85\x87\x85uv|\x80\x84\x86}u\x82\x82}v{\x81\x81\x87\x85wt|\x80\x81\x81{\x82~\x82tv\x83\x86\x85\x85xt}~\x81\x84w{\x85\x82\x80~vv\x83\x85\x89}pw\x80\x84\x82~}}\x80~\x81}tx\x86\x88\x84|sz\x80\x80\x82\x80zy\x80\x83\x85uw|\x80\x86\x86wv}\x84\x83{z~\x82\x81\x80\x81|vv}\x87\x8A\x82wx{{\x82\x82}}~\x84\x83xvz}\x85\x8A\x83xuz}\x83\x81z~\x84\x81|~zw~\x80\x83\x87~uz\x81}\x80\x82{{\x80\x82~w|}\x84\x86{v|~\x84\x85xw~\x81\x83\x85\x80wtx\x81\x87\x84~z~\x80{}{z\x81\x86\x83zuz\x80\x80\x83\x84zx|~~}~\x81\x84\x80~xs{\x84\x89\x86|vv}\x82\x84\x81zy|\x83\x83~|y|\x81\x82\x80{y\x80\x82~~{{~\x81\x82\x82\x80wv|\x83\x84}{~\x82~}zw{\x85\x89\x84}rr|\x83\x87\x86~uy\x80~}}}\x80\x82\x82~yrz\x83\x86\x84\x81zw}{~\x83}~\x80~|w|\x83\x87\x82{ww\x81\x84~{y}\x85\x83~|w{\x81\x80\x80}}}\x80\x82~{y|\x82\x81~\x81|x|\x80\x81~}\x81y{}~\x81\x82\x82|yy|\x80\x81\x81\x82|z~}~\x80|~\x81~z~\x80}}}\x81\x82}yy\x80\x82}~\x80~}~{\x83{|\x81}{~}~\x82~\x81|x{\x80~~\x84\x81z|||\x81y\x81\x84zz~|~\x81~\x84|v{~~\x80\x83|zz\x82z\x80\x80y\x82{~\x80}\x82zy\x81~x~\x83\x81}w{\x82}}\x82}y}~|\x81\x80{\x80y{~~\x81}}\x80}{}}z\x80\x84}{}{~\x81|}\x83}x~{|~\x80\x81{|\x81zx\x82\x82z}|\x80}\x80wy\x85\x81x|~~~\x81~s{\x87\x81y{}\x80}\x82}u|\x86x}}~\x82}{v\x81\x86|y|\x81~xu\x84\x88yv~}\x81\x83\x81st\x82\x86}z~~|~xz\x87\x81w|~|~\x80\x80\x83}s}\x86|u|\x85\x82~||\x81{r~\x8C\x82uz|~\x81|~\x84}v~\x83{y}~\x80\x80\x80xu\x82\x83yz\x82\x81}{z\x81\x82yz\x83\x81ww~\x83\x84}z||{\x84\x80wx}\x80~}y~\x81{w{\x82\x82}zw|\x83\x80{\x80}|z|\x81~\x82ww{\x82\x82\x80~{y~\x81|wz\x82\x84\x80}}|yz\x80\x84\x80xx\x80\x81~||}|~\x81\x81~xx\x80}}~|xx\x80\x83}\x82~xw}\x83\x80zy\x82\x83{y}}{\x80\x81\x81yv|}}\x82\x83|{\x80|xx~\x85\x80y\x80\x84zw}}w~\x87\x81yzz{\x81\x83~~zx|}\x80\x83}y\x82\x84{xyy\x80\x82|\x81\x85|vz|}\x81}z\x81\x83|yzz\x85~z\x80~y{}}\x81z\x84~xy{|\x81\x80}\x81\x80zz~}~\x81yy\x82\x83{y{|\x80\x83|w|}||~\x85\x81yy{z}\x82\x80|~~zy}\x80|\x84~yx{\x80\x82}|\x81}x{\x80~{|\x81\x81{|}yz\x80\x81~|~\x80|y}\x80|}\x81}{z~\x82~y~}}|{}~}\x82~{{y{\x80\x81~}}|~|z~\x81|y~\x81}y{\x82\x82{z~|}}~\x81}z~\x80}{{|\x80\x81}x|\x80~~|}}y{\x82\x81}zz\x81{{~~|{}\x80\x81}z}}zy~\x82~{~\x80}zy}\x82\x81|z|||}}\x80\x83\x81zwz}~~}\x81\x82|w{~|{~\x82yy~\x80}|}\x81~xx\x80\x80~{}\x80}{~\x80}zy|\x81\x81}|yx{~\x82\x81||~|{{{~\x82|~}zyz\x84\x83|z}{x{~\x80\x82\x80{}}yz}}\x82{|{|~~}{{}z|~\x81~z}}z|~}}~~|z|||~\x80}~\x80{z~{|}~\x81zz|~~~~zx|\x80}{~\x80~z{}{z\x80~~~{{}}}||\x80}z}{|\x80|w{\x81~z~\x80~|z||z}\x81~}yy\x82}}}{||{\x83}x~\x81~zx{\x80\x81||}|~{}}y}~}\x80}}zw}~}}}~~y}\x83zz}{||}\x83\x82|{}|y|}~\x81~{|~}}~{}\x80{wz\x80\x82\x80}~{wx~\x80~~|}\x80}{}}|}{|||\x82\x81}zzy~\x80|{~~~}}\x80|y|~{y{\x80\x84\x83}y|{x|\x80~{{\x80\x81||}{}~{xy~\x82\x83\x80{{{z|\x80~xy}\x82\x83}z~\x80zx|}|{~\x81\x82~y|}{|~zz|\x82\x80~}|y|~zw|\x82\x85\x81{x|}{~|y{\x80\x80~~|yz}{z\x80\x80~}|yy\x81{w{\x80\x82\x80~|}}y|~yz\x81\x82y{|}}zyz~\x82~\x80|~|w~v|\x80}\x84\x81y\x81~v}|y{|\x84}}y~\x80x}|v\x81\x81{\x82}z\x84x}xx\x80|\x84{||\x80|u~z||\x84}|\x84|y{v{\x81}\x80\x81y}}\x81zv}{|\x82|}\x80y\x81\x86zwxu\x80\x82|\x82~x~~\x83yw~y}\x81z\x80z\x83\x83wzwu\x81\x80~\x84{x}\x80\x80vzz\x80x}{\x86\x81x|wx\x81{}\x83{}\x82}\x81~tz|y\x82\x80|\x82|z\x84|y|u|\x85}~~u}\x82~\x83}u|{z\x81{{\x83}\x80\x85xx{u\x82y\x81\x81y|\x82yu~{}\x83{|x\x80\x84z}{w\x81x\x80{x\x83\x81\x80\x81uv~z~\x81{z\x82w}zy\x83}z\x80yy\x82y}}x~}z{~\x87}x~xy\x82|~\x82xz\x80}~z~|z\x80|zz~\x85{{\x80vz\x81{~~w~\x82}}y|y{\x81{|{\x81\x81w|~x\x80\x81y~|u~\x80}\x83z{y{{|\x81}x|w\x82\x80z\x81{v\x80~}\x82}{}z|}z~}\x82}y~yz\x84~{\x80xz\x82||\x81{|~{~|z}}\x81{|~w|\x84|}~v|\x81|\x80\x80y{~}\x80{w}~\x81\x81zzzx\x82\x84|~zu~{\x81}y\x80\x80~}wx~\x81z|zy\x82\x81|}xy\x82~{~z{\x81~~wz~~\x82}w{{~\x86\x80zzv|\x83||y|\x81~\x80{u|\x80\x80\x80yw|{\x80\x86~{zv~\x81z||x\x83\x80\x80xt~\x80\x80yx{{\x83\x86}xwy\x82\x81{}xx\x81\x82\x82\x81vu\x80\x80ww|~\x84\x83|yx|\x81~{|w{\x83\x82\x80|uz\x80|xy{\x85\x81zyy\x83}{yv|\x82\x81\x82}uz\x80\x81zvz}\x82\x85~yyy\x81||zx~\x81\x80\x80zw\x80\x81~|xy}|\x84\x80|zz\x80\x81zzyy\x80\x82\x81yx~zxz}\x83\x82zy{\x80\x83}xzy{\x81\x80~z|\x81~{zx{~\x80~{}~~{{|z{\x80}{y~\x82~}|yz|}\x80~z}\x80xx{|\x80\x81||||\x80~z|}|~}|}z|\x81\x81~|y|}{}~}}|\x80}y{{~\x82}{}z}\x80~|z{}~}{}~\x80yy|~\x80z{}|\x81}{z{\x80}|{|~|y{~\x80\x81}z{z}\x82\x81|{y{\x80|||}\x80}zyz}\x81\x82}{|{~|{|}~\x80}z||\x81|yy|\x81~z{~~}y{}}|{|}\x80zy{~~}||~}}}{z~}}|{~|z{||}}~~|}~~}y{~|}|}~|~\x80|z|}}|{}~~~}}|{}~{{~}~}~y{}|||~|{}|z~{|||}~{|}{{{}\x80\x80}{|{}{y~~~\x80||||}{{|~~|}}\x80}|}yz}|\x83~|~{}~zz~~}|{}~~\x80}w{}~z~\x82}}~yz||\x80~|}~~}}{z~|~{~{~~z|~}~}{|}|~|{}|||}\x82||zy~~~~|}|}}~~|}~|{}|\x81}|~{z||}\x80}}~~|||~}||{}}~||~||~}}~|}~||}~~||||}~}{|}|}}{~\x80~~}zz|\x80~|||}~}~}{~\x80||{{\x80}}}{{}|||~~|}{z~}~|{}}|z||{{}~~}z{~}~||\x80~|}{y}}{}~~}}}{}\x80}|}|}\x81}}yy~~~}{}~}}{{~|}~|~\x80}|}z|\x80}|}}}~~}|{}~|{}~}\x80\x80||{z~|}~||}~~}}}}}{{}}|\x80\x80}}{z~}{~|}~}}||~~}z{~}|}|{~|z~~|~~~~}||{|}~~z|\x81}~||~z{\x80~{}}~~|}~~|{|}|~\x80}~~z|~|~{{~}}|~}|}~|z~\x81~~}{}z~|}~|~}|~~}}}}|}\x80}}||~||\x80}{~~~{{~||}~}}}}~{|~|}||}~}{}~|}~~}|~\x80~}{z~|}~{~\x80~}y{}~\x80~|||~}}}|~}{~|z~\x80\x80\x80{x{}~\x80~|}}~~}}||}}zz\x80\x80~{z}}}}{|}\x80~|{|~}}{}\x80~zy|~\x81\x80|{|}~}}}|~}}|z~\x81}y{}~~|}~~~}{z~\x80~}{z\x80}~|y}\x80|z|}\x80~}|{~|}|}\x80}~{z}~\x80|{}}~~|||~~}|{}~~{z~~{{~}~}||}~}}{}}z{~}{|~|~\x80~||}~~}|||~}z}~\x80~z|}|~}}}~~||{}\x80~~\x80|y|~~\x80}{~}|}~}~~~}}|{}~~{|}|~}}~||~~}}~~}|{{~\x80}}}|}~}~||}|}~}\x80}{{|}~~|{}~~~|~~|||}\x80\x80~}|{{|\x80~}|}~|}~~~}||}~\x80~|{{}\x80~||}~~|~\x80~|}}|||\x81\x80}{{|}\x80~|||}~}~~}|zz}\x80\x81|{|}~\x81|{{}\x80|}~~~~|z|~\x80\x80|z{}\x80\x81~{{|}~}~~~~{y{~\x80\x81~z{}~\x80||||~~}}}\x80}z{~~}|}}~\x81{{{|}}~~~|{|~~\x80\x80|{|}\x80\x81}{||}~}~~~~~|z{}\x80~|}}}~}}{{~~}}~~~{{}}\x80~}}{}\x80~}|{~~}}}~~~{{||\x80}}~}||||}~}|~~~{{}~\x80~|}}}~|}||~~~|}~~}{|}}~}~}}}|}|~\x80~}}{~~}|}|}}~}||||~}|~}~}|~|~|~}~{}}|~}~}}~~~{}~|~~|\x80\x80}}{}}}\x80}}{}}~|~}{~|\x80~\x80|z}|~\x80}}~}~|}|~}}||\x80~~\x80|}~|~|~~}\x80}~{|}~~{~\x80}{}~}\x80~z}~~\x81~|}|~|}}{\x80~\x80}{~}|}|~~\x80||}}\x80|}{z~\x80}|}|~{|\x80\x80{|}}\x80|}|}\x80~~|}\x80}}}z}~|~}}\x80}|}|\x81~~~{}|~~|~|{~~\x80||}|\x80}~|~~|}}|\x80\x80~~||~}~}~}}\x80|}||\x80~|~}~}~}~~~}{~~\x81~|~}|~|}\x80~~\x80}}||~\x80~~}}~}~}}~}~~|}}\x80}}}}}|~}~~|}~}~}|}~|~}~~}}}~~~|~~}~}}~~}|~}~}}}~\x80~~}}~}}~}~~~}}~}~~}~~~~~}}~}~~|~~~|~~}~}}}}\x80~~}|~~}~~}~~}~}}}}}}~~}~}}}}~~~}}~}}~}~~~~~~}}~}~~}}~~~~~}}~}~~}~}}~}~~}~~}~}}}~~}}~~~~~}}}}~~\x80}}}}~~~}}~~~}~~~}}~~~~~~}~~~}}~~~~~~}}~~~~~|}~~~~}}}~~}}|}\x80~}~}}~~~}}~~}~\x80~}}}~}~~~~~~~}~~}~~~~~}|}~~~\x80~}}~~~~}|}~~\x80}}}}~~~~~~}}~~}~~~~~~}}~~}~~~~~~~~~~~~~~~}}}~~~~}}~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~}~}}~~~~~}}~~~~~~~~~~~~~}~~~\x80}|}~~~~~~~~}}~~}}~~}~~~~~~~~~~}~~~~~~}}~~~~~~~~~~~}~~|}~~~~~~}~~~~}~~}~~}~~}}~~~~~~~}}~}~~}}~~~~~~}~}}~~}~~~~~~\x80~~}}~~~}~~}}~~~~~~~~~~~~}~\x80~~}~~~~~~}}~~~~}~~}~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~}~~~~~~~~~~~~\x80~~}~~~~~~}\x80~}}~~}}~~~~\x80~~}}~~~~~}~~~~~~~~}~~~}~\x80~}}~~~~~}~\x80~}}~~~~~~~\x80~~}}~~~~}~~~\x80~~}~~}~~~~~~~~~~~~\x80~~}\x80~~~}~\x80\x80~}~~\x80~~~~~~~~\x80~~~~~~~\x80~~~~~~~~~~~~~\x80~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\x80~~~~~~~~~~\x80~~~~\x80~~~~~~~~~~~~~\x80~~~~\x80~~~~~~\x80~~~~\x80~~~~~~\x80~~\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80
\ No newline at end of file
Added: trunk/target/linux/modules/pwm/test/KDE_Startup_2.raw
===================================================================
--- trunk/target/linux/modules/pwm/test/KDE_Startup_2.raw (rev 0)
+++ trunk/target/linux/modules/pwm/test/KDE_Startup_2.raw 2007-04-15 09:23:57 UTC (rev 583)
@@ -0,0 +1 @@
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2007-04-02 20:27:09
|
Revision: 582
http://armadeus.svn.sourceforge.net/armadeus/?rev=582&view=rev
Author: thom25
Date: 2007-04-02 13:27:06 -0700 (Mon, 02 Apr 2007)
Log Message:
-----------
fix bug 1692476
Modified Paths:
--------------
trunk/firmware/BRAMTest/BRAMTest_APF.ucf
trunk/firmware/BRAMTest/bramtest_top_APF.bin
Modified: trunk/firmware/BRAMTest/BRAMTest_APF.ucf
===================================================================
--- trunk/firmware/BRAMTest/BRAMTest_APF.ucf 2007-03-23 21:37:53 UTC (rev 581)
+++ trunk/firmware/BRAMTest/BRAMTest_APF.ucf 2007-04-02 20:27:06 UTC (rev 582)
@@ -1,72 +1,65 @@
-#NET "AddrxDI<10>" LOC = "P33";
-#NET "AddrxDI<11>" LOC = "P35";
-#NET "AddrxDI<12>" LOC = "P36";
-#NET "User<0>" LOC = "P92" ;
-#NET "User<1>" LOC = "P93" ;
-#NET "User<2>" LOC = "P95" ;
-#NET "User<3>" LOC = "P96" ;
-#NET "User<4>" LOC = "P97" ;
-#NET "User<5>" LOC = "P98" ;
-#NET "User<6>" LOC = "P99" ;
-#NET "User<7>" LOC = "P100" ;
-#NET "User<8>" LOC = "P102" ;
-#NET "User<9>" LOC = "P103" ;
-#NET "User<10>" LOC = "P104" ;
-#NET "User<11>" LOC = "P105" ;
-#NET "User<12>" LOC = "P107" ;
-#NET "User<13>" LOC = "P108" ;
-#NET "User<14>" LOC = "P112" ;
-#NET "User<15>" LOC = "P113" ;
-#NET "User<16>" LOC = "P116" ;
-#NET "User<17>" LOC = "P118" ;
-#NET "User<18>" LOC = "P119" ;
-#NET "User<19>" LOC = "P122" ;
-#NET "ResetxRB" LOC = "P123" ;
-NET "ClkxCI" TNM_NET = "ClkxCI";
-TIMESPEC "TS_ClkxCI" = PERIOD "ClkxCI" 10 ns HIGH 50 %;
-
-#PACE: Start of Constraints generated by PACE
-
-#PACE: Start of PACE I/O Pin Assignments
-NET "AddrxDI<0>" LOC = "P21" ;
-NET "AddrxDI<1>" LOC = "P23" ;
-NET "AddrxDI<2>" LOC = "P24" ;
-NET "AddrxDI<3>" LOC = "P25" ;
-NET "AddrxDI<4>" LOC = "P26" ;
-NET "AddrxDI<5>" LOC = "P27" ;
-NET "AddrxDI<6>" LOC = "P28" ;
-NET "AddrxDI<7>" LOC = "P30" ;
-NET "AddrxDI<8>" LOC = "P31" ;
-NET "AddrxDI<9>" LOC = "P32" ;
-NET "ClkxCI" LOC = "P55" ;
-NET "CSxBI" LOC = "P59" ;
-NET "DataxD<0>" LOC = "P1" ;
-NET "DataxD<10>" LOC = "P13" ;
-NET "DataxD<11>" LOC = "P14" ;
-NET "DataxD<12>" LOC = "P15" ;
-NET "DataxD<13>" LOC = "P17" ;
-NET "DataxD<14>" LOC = "P18" ;
-NET "DataxD<15>" LOC = "P20" ;
-NET "DataxD<1>" LOC = "P2" ;
-NET "DataxD<2>" LOC = "P4" ;
-NET "DataxD<3>" LOC = "P5" ;
-NET "DataxD<4>" LOC = "P6" ;
-NET "DataxD<5>" LOC = "P7" ;
-NET "DataxD<6>" LOC = "P8" ;
-NET "DataxD<7>" LOC = "P10" ;
-NET "DataxD<8>" LOC = "P11" ;
-NET "DataxD<9>" LOC = "P12" ;
-NET "WRxBI" LOC = "P60" ;
-NET "RDxBI" LOC = "P63" ;
-#NET "IOL01P5" LOC = "P40" ;
-#NET "IOL01N5" LOC = "P41" ;
-#NET "IOL31P5" LOC = "P50" ;
-#NET "IOL31N5" LOC = "P51" ;
-#NET "IOL32P5" LOC = "P52" ;
-#NET "IOL32N5" LOC = "P53" ;
-
-#PACE: Start of PACE Area Constraints
-
-#PACE: Start of PACE Prohibit Constraints
-
-#PACE: End of Constraints generated by PACE
+NET "AddrxDI<10>" LOC = "P33" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<11>" LOC = "P35" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<12>" LOC = "P36" | IOSTANDARD = LVCMOS33 ;
+NET "User<0>" LOC = "P92" | IOSTANDARD = LVCMOS33 ;
+NET "User<1>" LOC = "P93" | IOSTANDARD = LVCMOS33 ;
+NET "User<2>" LOC = "P95" | IOSTANDARD = LVCMOS33 ;
+NET "User<3>" LOC = "P96" | IOSTANDARD = LVCMOS33 ;
+NET "User<4>" LOC = "P97" | IOSTANDARD = LVCMOS33 ;
+NET "User<5>" LOC = "P98" | IOSTANDARD = LVCMOS33 ;
+NET "User<6>" LOC = "P99" | IOSTANDARD = LVCMOS33 ;
+NET "User<7>" LOC = "P100" | IOSTANDARD = LVCMOS33 ;
+NET "User<8>" LOC = "P102" | IOSTANDARD = LVCMOS33 ;
+NET "User<9>" LOC = "P103" | IOSTANDARD = LVCMOS33 ;
+NET "User<10>" LOC = "P104" | IOSTANDARD = LVCMOS33 ;
+NET "User<11>" LOC = "P105" | IOSTANDARD = LVCMOS33 ;
+NET "User<12>" LOC = "P107" | IOSTANDARD = LVCMOS33 ;
+NET "User<13>" LOC = "P108" | IOSTANDARD = LVCMOS33 ;
+NET "User<14>" LOC = "P112" | IOSTANDARD = LVCMOS33 ;
+NET "User<15>" LOC = "P113" | IOSTANDARD = LVCMOS33 ;
+NET "User<16>" LOC = "P116" | IOSTANDARD = LVCMOS33 ;
+NET "User<17>" LOC = "P118" | IOSTANDARD = LVCMOS33 ;
+NET "User<18>" LOC = "P119" | IOSTANDARD = LVCMOS33 ;
+NET "User<19>" LOC = "P122" | IOSTANDARD = LVCMOS33 ;
+NET "ClkxCI" TNM_NET = "ClkxCI";
+TIMESPEC "TS_ClkxCI" = PERIOD "ClkxCI" 10 ns HIGH 50 %;
+
+#PACE: Start of Constraints generated by PACE
+
+#PACE: Start of PACE I/O Pin Assignments
+NET "AddrxDI<0>" LOC = "P21" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<1>" LOC = "P23" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<2>" LOC = "P24" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<3>" LOC = "P25" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<4>" LOC = "P26" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<5>" LOC = "P27" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<6>" LOC = "P28" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<7>" LOC = "P30" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<8>" LOC = "P31" | IOSTANDARD = LVCMOS33 ;
+NET "AddrxDI<9>" LOC = "P32" | IOSTANDARD = LVCMOS33 ;
+NET "ClkxCI" LOC = "P55" | IOSTANDARD = LVCMOS33 ;
+NET "CSxBI" LOC = "P59" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<0>" LOC = "P1" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<10>" LOC = "P13" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<11>" LOC = "P14" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<12>" LOC = "P15" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<13>" LOC = "P17" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<14>" LOC = "P18" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<15>" LOC = "P20" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<1>" LOC = "P2" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<2>" LOC = "P4" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<3>" LOC = "P5" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<4>" LOC = "P6" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<5>" LOC = "P7" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<6>" LOC = "P8" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<7>" LOC = "P10" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<8>" LOC = "P11" | IOSTANDARD = LVCMOS33 ;
+NET "DataxD<9>" LOC = "P12" | IOSTANDARD = LVCMOS33 ;
+NET "WRxBI" LOC = "P60" | IOSTANDARD = LVCMOS33 ;
+NET "RDxBI" LOC = "P63" | IOSTANDARD = LVCMOS33 ;
+
+#PACE: Start of PACE Area Constraints
+
+#PACE: Start of PACE Prohibit Constraints
+
+#PACE: End of Constraints generated by PACE
Modified: trunk/firmware/BRAMTest/bramtest_top_APF.bin
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-03-23 21:40:42
|
Revision: 581
http://armadeus.svn.sourceforge.net/armadeus/?rev=581&view=rev
Author: artemys
Date: 2007-03-23 14:37:53 -0700 (Fri, 23 Mar 2007)
Log Message:
-----------
[BUILDROOT] Finalize LMbench integration
Added Paths:
-----------
trunk/patches/017-buildroot-lmbench.diff
Added: trunk/patches/017-buildroot-lmbench.diff
===================================================================
--- trunk/patches/017-buildroot-lmbench.diff (rev 0)
+++ trunk/patches/017-buildroot-lmbench.diff 2007-03-23 21:37:53 UTC (rev 581)
@@ -0,0 +1,10 @@
+--- buildroot.ori/package/Config.in 2007-03-23 22:30:10.000000000 +0100
++++ buildroot/package/Config.in 2007-03-23 22:30:59.000000000 +0100
+@@ -80,6 +80,7 @@
+ source "package/libusb/Config.in"
+ source "package/lighttpd/Config.in"
+ source "package/links/Config.in"
++source "package/lmbench/Config.in"
+ source "package/lrzsz/Config.in"
+ source "package/lsof/Config.in"
+ source "package/ltp-testsuite/Config.in"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2007-03-22 17:53:56
|
Revision: 580
http://armadeus.svn.sourceforge.net/armadeus/?rev=580&view=rev
Author: artemys
Date: 2007-03-22 10:53:54 -0700 (Thu, 22 Mar 2007)
Log Message:
-----------
[BUILDROOT] 1st integration of LMbench performance analysis tools
Added Paths:
-----------
trunk/buildroot/package/lmbench/
trunk/buildroot/package/lmbench/Config.in
trunk/buildroot/package/lmbench/lmbench.mk
Added: trunk/buildroot/package/lmbench/Config.in
===================================================================
--- trunk/buildroot/package/lmbench/Config.in (rev 0)
+++ trunk/buildroot/package/lmbench/Config.in 2007-03-22 17:53:54 UTC (rev 580)
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LMBENCH
+ bool "LMbench"
+ default n
+ help
+ Tools for Performance Analysis. Suite of simple, portable benchmarks.
+ http://www.bitmover.com/lmbench/
+
Added: trunk/buildroot/package/lmbench/lmbench.mk
===================================================================
--- trunk/buildroot/package/lmbench/lmbench.mk (rev 0)
+++ trunk/buildroot/package/lmbench/lmbench.mk 2007-03-22 17:53:54 UTC (rev 580)
@@ -0,0 +1,61 @@
+#############################################################
+#
+# LMBENCH, tools for performance analysis
+#
+#############################################################
+LMBENCH_VERSION:=3
+LMBENCH_SOURCE:=lmbench$(LMBENCH_VERSION).tar.gz
+LMBENCH_SITE:=http://www.bitmover.com/lmbench/
+LMBENCH_CAT:=$(ZCAT)
+LMBENCH_DIR:=$(BUILD_DIR)/lmbench$(LMBENCH_VERSION)
+LMBENCH_OS_NAME:=armv5tejl-linux-gnu
+
+$(DL_DIR)/$(LMBENCH_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LMBENCH_SITE)/$(LMBENCH_SOURCE)
+
+lmbench-source: $(DL_DIR)/$(LMBENCH_SOURCE)
+
+$(LMBENCH_DIR)/.unpacked: $(DL_DIR)/$(LMBENCH_SOURCE)
+ $(LMBENCH_CAT) $(DL_DIR)/$(LMBENCH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $(LMBENCH_DIR)/.unpacked
+
+$(LMBENCH_DIR)/.configured: $(LMBENCH_DIR)/.unpacked
+ # Nothing to do yet
+ mkdir -p $(LMBENCH_DIR)/SCCS
+ touch $(LMBENCH_DIR)/SCCS/s.ChangeSet
+ touch $(LMBENCH_DIR)/.configured
+
+$(LMBENCH_DIR)/.compiled: $(LMBENCH_DIR)/.configured
+ $(MAKE) -C $(LMBENCH_DIR) OS=$(LMBENCH_OS_NAME) CC=$(TARGET_CROSS)gcc AR=$(TARGET_CROSS)ar
+ touch $(LMBENCH_DIR)/.compiled
+
+$(STAGING_DIR)/usr/bin/lmbench/bin/$(LMBENCH_OS_NAME)/lmbench: $(LMBENCH_DIR)/.compiled
+ mkdir -p $(STAGING_DIR)/usr/bin/lmbench/
+ cp -r $(LMBENCH_DIR)/bin $(STAGING_DIR)/usr/bin/lmbench/
+ cp -r $(LMBENCH_DIR)/scripts $(STAGING_DIR)/usr/bin/lmbench/
+ cp -r $(LMBENCH_DIR)/results $(STAGING_DIR)/usr/bin/lmbench/
+
+$(TARGET_DIR)/usr/bin/lmbench/bin/$(LMBENCH_OS_NAME)/lmbench: $(STAGING_DIR)/usr/bin/lmbench/bin/$(LMBENCH_OS_NAME)/lmbench
+ mkdir -p $(TARGET_DIR)/usr/bin/lmbench/
+ cp -r $(STAGING_DIR)/usr/bin/lmbench/* $(TARGET_DIR)/usr/bin/lmbench/
+
+LMBENCH lmbench: uclibc $(TARGET_DIR)/usr/bin/lmbench/bin/$(LMBENCH_OS_NAME)/lmbench
+
+lmbench-clean:
+ #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(LMBENCH_DIR) uninstall
+ -$(MAKE) -C $(LMBENCH_DIR) clean
+ rm -rf $(TARGET_DIR)/usr/bin/lmbench/
+
+lmbench-dirclean:
+ rm -rf $(STAGING_DIR)/usr/bin/lmbench/
+ rm -rf $(TARGET_DIR)/usr/bin/lmbench/
+ rm -rf $(LMBENCH_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LMBENCH)),y)
+TARGETS+=lmbench
+endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|