Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 08, 2012
@mwalle mwalle 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>
82dfb7e
@mwalle mwalle softusb: convert to non blocking assignments
Signed-off-by: Michael Walle <michael@walle.cc>
a534e34
View
48 cores/softusb/rtl/softusb_rx.v
@@ -151,49 +151,49 @@ reg lastrx;
reg startrx;
always @(posedge usb_clk) begin
if(rxreset) begin
- rx_active = 1'b0;
- rx_valid = 1'b0;
- rx_error = 1'b0;
+ rx_active <= 1'b0;
+ rx_valid <= 1'b0;
+ rx_error <= 1'b0;
end else begin
- rx_valid = 1'b0;
- rx_error = 1'b0;
+ rx_valid <= 1'b0;
+ rx_error <= 1'b0;
if(eop_detected)
- rx_active = 1'b0;
+ rx_active <= 1'b0;
else if(dpll_ce) begin
if(rx_active & ~se0) begin
if(onecount == 3'd6) begin
/* skip stuffed bits */
- onecount = 3'd0;
+ onecount <= 3'd0;
if((lastrx & rx_corrected)|(~lastrx & ~rx_corrected)) begin
/* no transition? bitstuff error */
- rx_active = 1'b0;
- rx_error = 1'b1;
+ rx_active <= 1'b0;
+ rx_error <= 1'b1;
end
- lastrx = ~lastrx;
+ lastrx <= ~lastrx;
end else begin
if(rx_corrected) begin
- rx_data = {lastrx, rx_data[7:1]};
+ rx_data <= {lastrx, rx_data[7:1]};
if(lastrx)
- onecount = onecount + 3'd1;
+ onecount <= onecount + 3'd1;
else
- onecount = 3'd0;
- lastrx = 1'b1;
+ onecount <= 3'd0;
+ lastrx <= 1'b1;
end else begin
- rx_data = {~lastrx, rx_data[7:1]};
+ rx_data <= {~lastrx, rx_data[7:1]};
if(~lastrx)
- onecount = onecount + 3'd1;
+ onecount <= onecount + 3'd1;
else
- onecount = 3'd0;
- lastrx = 1'b0;
+ onecount <= 3'd0;
+ lastrx <= 1'b0;
end
- rx_valid = bitcount == 3'd7;
- bitcount = bitcount + 3'd1;
+ rx_valid <= bitcount == 3'd7;
+ bitcount <= bitcount + 3'd1;
end
end else if(startrx) begin
- rx_active = 1'b1;
- bitcount = 3'd0;
- onecount = 3'd1;
- lastrx = 1'b0;
+ rx_active <= 1'b1;
+ bitcount <= 3'd0;
+ onecount <= 3'd1;
+ lastrx <= 1'b0;
end
end
end
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 */

No commit comments for this range

Something went wrong with that request. Please try again.