-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signals generation, timing to be verified and EBR implementation for …
…MAchXO2 must be done
- Loading branch information
Showing
7 changed files
with
170 additions
and
221 deletions.
There are no files selected for viewing
Binary file not shown.
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
File renamed without changes.
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,86 @@ | ||
// Character memory | ||
wire [11:0] CharWriteAddress = CursorY * 80 + CursorX; // Range 0..2399 | ||
wire [11:0] CharReadAddress; | ||
|
||
// Multiplexer for memory outputs | ||
wire [7:0] CharDataFromRAM_0; | ||
wire [7:0] CharDataFromRAM_1; | ||
wire [7:0] CharDataFromRAM_2; | ||
wire [7:0] CharDataFromRAM = (CharReadAddress[11:10] == 2'd0) ? CharDataFromRAM_0 : | ||
(CharReadAddress[11:10] == 2'd1) ? CharDataFromRAM_1 : | ||
(CharReadAddress[11:10] == 2'd2) ? CharDataFromRAM_2 : | ||
8'd0; | ||
|
||
// Memory blocks | ||
PseudoDualPortRAM #( | ||
.ADDRESS_WIDTH(10), | ||
.DATA_WIDTH(8), | ||
.MEMORY_DEPTH(1024) | ||
) CharRAM_0( | ||
.ReadClock(Clock), | ||
.WriteClock(Clock), | ||
.Reset(Reset), | ||
.ReadEnable_i(CharReadAddress[11:10] == 2'd0), // Czy to potrzebne | ||
.WriteEnable_i(CharWriteRequest && (CharWriteAddress[11:10] == 2'd0)), | ||
.ReadAddress_i(CharReadAddress[9:0]), | ||
.WriteAddress_i(CharWriteAddress[9:0]), | ||
.Data_i(DataFromUART), | ||
.Data_o(CharDataFromRAM_0) | ||
); | ||
|
||
PseudoDualPortRAM #( | ||
.ADDRESS_WIDTH(10), | ||
.DATA_WIDTH(8), | ||
.MEMORY_DEPTH(1024) | ||
) CharRAM_1( | ||
.ReadClock(Clock), | ||
.WriteClock(Clock), | ||
.Reset(Reset), | ||
.ReadEnable_i(CharReadAddress[11:10] == 2'd1), // Czy to potrzebne | ||
.WriteEnable_i(CharWriteRequest && (CharWriteAddress[11:10] == 2'd1)), | ||
.ReadAddress_i(CharReadAddress[9:0]), | ||
.WriteAddress_i(CharWriteAddress[9:0]), | ||
.Data_i(DataFromUART), | ||
.Data_o(CharDataFromRAM_1) | ||
); | ||
|
||
PseudoDualPortRAM #( | ||
.ADDRESS_WIDTH(10), | ||
.DATA_WIDTH(8), | ||
.MEMORY_DEPTH(352) | ||
) CharRAM_2( | ||
.ReadClock(Clock), | ||
.WriteClock(Clock), | ||
.Reset(Reset), | ||
.ReadEnable_i(CharReadAddress[11:10] == 2'd2), // Czy to potrzebne | ||
.WriteEnable_i(CharWriteRequest && (CharWriteAddress[11:10] == 2'd2)), | ||
.ReadAddress_i(CharReadAddress[9:0]), | ||
.WriteAddress_i(CharWriteAddress[9:0]), | ||
.Data_i(DataFromUART), | ||
.Data_o(CharDataFromRAM_2) | ||
); | ||
*/ | ||
|
||
// Font Memory | ||
/* | ||
wire [10:0] FontAddress; | ||
wire [7:0] FontDataFromROM_0; | ||
wire [7:0] FontDataFromROM_1; | ||
wire [7:0] FontDataFromROM = (FontAddress[10] == 1'd0) ? FontDataFromROM_0 : FontDataFromROM_1; | ||
// Characters 32...95 | ||
ROM #( | ||
.ADDRESS_WIDTH(10), | ||
.DATA_WIDTH(8), | ||
.MEMORY_DEPTH(1024), | ||
.MEMORY_FILE("font_32_95.mem") | ||
) FontROM_0( | ||
.Clock(Clock), | ||
.Reset(Reset), | ||
.ReadEnable_i(1'b1), | ||
.Address_i(FontAddress[9:0]), | ||
.Data_o(FontDataFromROM_0) | ||
); | ||
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
Oops, something went wrong.