Permalink
Browse files

softusb: remap timer to 0x20..0x23

That way we have more registers addresses left for the SIE module.

Signed-off-by: Michael Walle <michael@walle.cc>
  • Loading branch information...
mwalle authored and sbourdeauducq committed Apr 6, 2012
1 parent 59c1838 commit 82dfb7ea0516286c66b22ce2c17d3ab665e91cf8
Showing with 9 additions and 9 deletions.
  1. +5 −5 cores/softusb/rtl/softusb_timer.v
  2. +4 −4 softusb-input/timer.h
@@ -33,12 +33,12 @@ always @(posedge usb_clk) begin
end else begin
io_do <= 32'd0;
case(io_a)
- 6'h11: io_do <= counter[7:0];
- 6'h12: io_do <= counter[15:8];
- 6'h13: io_do <= counter[23:16];
- 6'h14: io_do <= counter[31:24];
+ 6'h20: io_do <= counter[7:0];
+ 6'h21: io_do <= counter[15:8];
+ 6'h22: io_do <= counter[23:16];
+ 6'h23: io_do <= counter[31:24];
endcase
- if(io_we & ((io_a == 6'h11)|(io_a == 6'h12)|(io_a == 6'h13)|(io_a == 6'h14)))
+ if(io_we & ((io_a == 6'h20)|(io_a == 6'h21)|(io_a == 6'h22)|(io_a == 6'h23)))
counter <= 32'd0;
else
counter <= counter + 32'd1;
View
@@ -18,9 +18,9 @@
#ifndef __TIMER_H
#define __TIMER_H
-#define TIMER0 0x11
-#define TIMER1 0x12
-#define TIMER2 0x13
-#define TIMER3 0x14
+#define TIMER0 0x20
+#define TIMER1 0x21
+#define TIMER2 0x22
+#define TIMER3 0x23
#endif /* __TIMER_H */

0 comments on commit 82dfb7e

Please sign in to comment.