forked from pmezydlo/BeagleWire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change sdram to use a level-triggered command.
This addresses issue pmezydlo#10, where commands would be lost if they occured during the refresh cycle, by adding an explicit ACK output that indicates that the controller has started on the read or write. It still fails the sdram-test, but actually seems to be almost working.
- Loading branch information
1 parent
ae0ebf4
commit 402d3d0
Showing
4 changed files
with
193 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Stretch a pulse for a long time | ||
*/ | ||
module pulsestretch( | ||
input clk, | ||
input in, | ||
output out | ||
); | ||
|
||
parameter LENGTH = 8; | ||
|
||
reg [LENGTH-1:0] counter = 0; | ||
|
||
always @(posedge clk) | ||
begin | ||
if (in) begin | ||
counter <= 1; | ||
out <= 1; | ||
end else | ||
if (counter != 0) begin | ||
counter <= counter + 1; | ||
out <= 1; | ||
end else begin | ||
out <= 0; | ||
end | ||
end | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
PROJ = sdram | ||
SRC += top.v | ||
SRC += ../../components/gpmc-sync.v | ||
SRC += ../../components/doublebuf.v | ||
SRC += ../../components/pulsestretch.v | ||
SRC += ../../components/sdram_controller.v | ||
|
||
all: $(PROJ).bin | ||
all: $(PROJ).bin $(PROJ).timing | ||
include ../Makefile.beaglewire |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters