data/full_repos/permissive/153775588/boards/lattice/iCE40-UltraPlus-MDP/icecube2/src/RAM32K.v
1: b"%Error: data/full_repos/permissive/153775588/boards/lattice/iCE40-UltraPlus-MDP/icecube2/src/RAM32K.v:41: Cannot find file containing module: 'SB_SPRAM256KA'\nSB_SPRAM256KA  inst_SPRAM256KA(\n^~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/153775588/boards/lattice/iCE40-UltraPlus-MDP/icecube2/src,data/full_repos/permissive/153775588/SB_SPRAM256KA\n             data/full_repos/permissive/153775588/boards/lattice/iCE40-UltraPlus-MDP/icecube2/src,data/full_repos/permissive/153775588/SB_SPRAM256KA.v\n             data/full_repos/permissive/153775588/boards/lattice/iCE40-UltraPlus-MDP/icecube2/src,data/full_repos/permissive/153775588/SB_SPRAM256KA.sv\n             SB_SPRAM256KA\n             SB_SPRAM256KA.v\n             SB_SPRAM256KA.sv\n             obj_dir/SB_SPRAM256KA\n             obj_dir/SB_SPRAM256KA.v\n             obj_dir/SB_SPRAM256KA.sv\n%Error: Exiting due to 1 error(s)\n"
module RAM32K (
    clk,
    addr,
	din,
	dout,
	we
);

input           clk;        
input           we;        
input [14:0]    addr;
input  [7:0]    din;
output [7:0]    dout;

wire    [13:0]  spram_addr;      
wire    [15:0]  spram_wr_data;      
wire    [15:0]  spram_rd_data;      
wire    [3:0]  spram_mask;      

assign spram_wr_data[15:8] = din;
assign spram_wr_data [7:0] = din;

assign spram_addr = addr[14:1];

assign spram_mask[0] = ~addr[0];
assign spram_mask[1] = ~addr[0];
assign spram_mask[2] =  addr[0];
assign spram_mask[3] =  addr[0];


reg    addr0_s;      
always @ (posedge clk) begin
	addr0_s <= addr[0];
end

assign dout = addr0_s ? spram_rd_data[15:8] : spram_rd_data[7:0];	



SB_SPRAM256KA  inst_SPRAM256KA(
     .ADDRESS                 (spram_addr                   ),
     .DATAIN                  (spram_wr_data                ),
     .MASKWREN                (spram_mask                   ),
     .WREN                    (we                           ),
     .CHIPSELECT              (1'b1                         ),
     .CLOCK                   (clk                          ),
     .STANDBY                 (1'b0                         ),
     .SLEEP                   (1'b0                         ),
     .POWEROFF                (1'b1                         ),
     .DATAOUT                 (spram_rd_data                )
); 




endmodule
module RAM32K (
    clk,
    addr,
	din,
	dout,
	we
);


input           clk;        
input           we;        
input [14:0]    addr;
input  [7:0]    din;
output [7:0]    dout;

wire    [13:0]  spram_addr;      
wire    [15:0]  spram_wr_data;      
wire    [15:0]  spram_rd_data;      
wire    [3:0]  spram_mask;      

assign spram_wr_data[15:8] = din;
assign spram_wr_data [7:0] = din;

assign spram_addr = addr[14:1];

assign spram_mask[0] = ~addr[0];
assign spram_mask[1] = ~addr[0];
assign spram_mask[2] =  addr[0];
assign spram_mask[3] =  addr[0];


reg    addr0_s;      
always @ (posedge clk) begin
	addr0_s <= addr[0];
end

assign dout = addr0_s ? spram_rd_data[15:8] : spram_rd_data[7:0];	



SB_SPRAM256KA  inst_SPRAM256KA(
     .ADDRESS                 (spram_addr                   ),
     .DATAIN                  (spram_wr_data                ),
     .MASKWREN                (spram_mask                   ),
     .WREN                    (we                           ),
     .CHIPSELECT              (1'b1                         ),
     .CLOCK                   (clk                          ),
     .STANDBY                 (1'b0                         ),
     .SLEEP                   (1'b0                         ),
     .POWEROFF                (1'b1                         ),
     .DATAOUT                 (spram_rd_data                )
); 




endmodule