Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 82dfb7ea0516286c66b22ce2c17d3ab665e91cf8 1 parent 59c1838
@mwalle mwalle authored sbourdeauducq committed
Showing with 9 additions and 9 deletions.
  1. +5 −5 cores/softusb/rtl/softusb_timer.v
  2. +4 −4 softusb-input/timer.h
View
10 cores/softusb/rtl/softusb_timer.v
@@ -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
8 softusb-input/timer.h
@@ -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 */
Please sign in to comment.
Something went wrong with that request. Please try again.