Created
April 30, 2020 16:26
-
-
Save garytwong/650f48f7b222623317f324a14925abde to your computer and use it in GitHub Desktop.
Trivial block RAM module
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
module top( input clk, | |
input [ 10:0 ] waddr, | |
input [ 7:0 ] wdata, | |
input [ 10:0 ] raddr, | |
output reg[ 7:0 ] rdata ); // ***** change the size to 6:0 and yosys no longer infers block RAM ***** | |
reg [ 7:0 ] ebr[ 2047:0 ]; | |
always @( posedge clk ) begin | |
ebr[ waddr ] <= wdata; | |
rdata <= ebr[ raddr ]; | |
end | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment