+ always @(posedge clk)
+ odata <= rom[address[10:0]];
+ assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
+endmodule
+
+module BootstrapROM(
+ input [15:0] address,
+ inout [7:0] data,
+ input clk,
+ input wr, rd);
+
+ reg [7:0] brom [255:0];
+ initial $readmemh("bootstrap.hex", brom);
+
+ wire decode = address[15:8] == 0;
+ wire [7:0] odata = brom[address[7:0]];
+ assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
+endmodule
+
+module MiniRAM(
+ input [15:0] address,
+ inout [7:0] data,
+ input clk,
+ input wr, rd);
+
+ reg [7:0] ram [127:0];
+
+ wire decode = (address >= 16'hFF80) && (address <= 16'hFFFE);
+ reg [7:0] odata;