Skip to content

Instantly share code, notes, and snippets.

@tzechienchu
Created October 25, 2022 10:15
Show Gist options
  • Save tzechienchu/914395bd44db1b2c1f6589c636b1b893 to your computer and use it in GitHub Desktop.
Save tzechienchu/914395bd44db1b2c1f6589c636b1b893 to your computer and use it in GitHub Desktop.
ICE40 ROM Verilog
module Rom (
input clk,
input [6:0] addr,
output reg [7:0] data);
reg [7:0] Rom [127:0];
initial $readmemh("Rom.data", Rom);
always @(posedge clk)
data <= Rom[addr];
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment