summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-11-16 17:20:51 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2010-11-16 17:22:20 (GMT)
commitff4d3cd9b0bb38ccb86ae1cf1a8903aa3abe64b2 (patch)
tree628eb67dbdd32a43dc52ebccd0f6f55fb5a44b7d
parenteffe7ca6e22cb5bc4e6fb385e19427f60fa634e2 (diff)
downloadabc8000-old-ff4d3cd9b0bb38ccb86ae1cf1a8903aa3abe64b2.zip
abc8000-old-ff4d3cd9b0bb38ccb86ae1cf1a8903aa3abe64b2.tar.gz
abc8000-old-ff4d3cd9b0bb38ccb86ae1cf1a8903aa3abe64b2.tar.bz2
abc8000-old-ff4d3cd9b0bb38ccb86ae1cf1a8903aa3abe64b2.tar.xz
Fix the LED register
It was implemented as a byte-sized register, but incorrectly. It doesn't make any sense; implement it as a word-size register... or one can just use +1 on the address.
-rw-r--r--data/sysrom/include/ioreg.h2
-rw-r--r--de1/de1.v2
2 files changed, 2 insertions, 2 deletions
diff --git a/data/sysrom/include/ioreg.h b/data/sysrom/include/ioreg.h
index 334743d..24b2dc3 100644
--- a/data/sysrom/include/ioreg.h
+++ b/data/sysrom/include/ioreg.h
@@ -65,7 +65,7 @@ static __inline__ void writel(uint32_t __val, volatile uint32_t *__ptr)
* System control
*/
#define IO_SYS_CTL IO_WORD(0xfff00000)
-#define IO_SYS_LED IO_BYTE(0xfff00002)
+#define IO_SYS_LED IO_WORD(0xfff00002)
#define IO_SYS_7SEG IO_LONG(0xfff00004)
#define IO_SYS_CTR IO_LONG(0xfff00008)
#define IO_SYS_SW IO_WORD(0xfff0000c)
diff --git a/de1/de1.v b/de1/de1.v
index b71d4e1..ce83c73 100644
--- a/de1/de1.v
+++ b/de1/de1.v
@@ -263,7 +263,7 @@ module abc8000_de1 (
3'b001:
begin
if (~cpu_be_n[0])
- ledg_q <= cpu_do[15:8];
+ ledg_q <= cpu_do[7:0];
end
3'b010:
begin