2023-11-15 06:15:56 -06:00
|
|
|
module spMem(
|
|
|
|
output [7:0] dout,
|
|
|
|
input clk,
|
|
|
|
input oce,
|
|
|
|
input ce,
|
|
|
|
input reset,
|
|
|
|
input wre,
|
|
|
|
input [15:0] ad,
|
|
|
|
input [7:0] din
|
|
|
|
);
|
|
|
|
reg [0:255] mem = {
|
|
|
|
8'h0,
|
2023-11-15 17:58:20 -06:00
|
|
|
8'h49, 8'h01, 8'h23, 8'h46,
|
|
|
|
8'h49, 8'h02, 8'h46, 8'h23,
|
2023-11-15 06:15:56 -06:00
|
|
|
8'h03, 8'h01, 8'h01, 8'h02,
|
2023-11-15 14:46:27 -06:00
|
|
|
8'h01,
|
2023-11-15 17:58:20 -06:00
|
|
|
144'h0
|
2023-11-15 06:15:56 -06:00
|
|
|
};
|
|
|
|
|
2023-11-15 13:30:43 -06:00
|
|
|
reg [7:0] r_out;
|
|
|
|
|
|
|
|
assign dout = r_out;
|
|
|
|
|
|
|
|
always @(negedge clk) begin
|
|
|
|
r_out <= mem[ad*8+:8];
|
|
|
|
end
|
2023-11-15 06:15:56 -06:00
|
|
|
endmodule
|