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>2014-02-11 02:07:50 (GMT)
commit8327677cfaaaf3eec3cf8ce55560ee6c59389554 (patch)
treea4994e90d14e0b319b6148bf0ebbfe914e982333
parent976dbc18c61214437df3db22894b02490e114b9b (diff)
downloadabc8000-8327677cfaaaf3eec3cf8ce55560ee6c59389554.zip
abc8000-8327677cfaaaf3eec3cf8ce55560ee6c59389554.tar.gz
abc8000-8327677cfaaaf3eec3cf8ce55560ee6c59389554.tar.bz2
abc8000-8327677cfaaaf3eec3cf8ce55560ee6c59389554.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 82357e3..16c73ed 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 50bbeef..9797b8b 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