Line 59... |
Line 59... |
`ifdef OR1200_BIST
|
`ifdef OR1200_BIST
|
// RAM BIST
|
// RAM BIST
|
mbist_si_i, mbist_so_o, mbist_ctrl_i,
|
mbist_si_i, mbist_so_o, mbist_ctrl_i,
|
`endif
|
`endif
|
|
|
|
`ifdef OR1200_RAM_PARITY
|
|
// Parity error indicator
|
|
p_err,
|
|
`endif
|
|
|
// Internal i/f
|
// Internal i/f
|
addr, en, we, datain, tag_v, tag, dirty
|
addr, en, we, datain, tag_v, tag, dirty
|
);
|
);
|
|
|
parameter dw = `OR1200_DCTAG_W+1;
|
parameter dw = `OR1200_DCTAG_W+1;
|
Line 88... |
Line 93... |
//
|
//
|
input mbist_si_i;
|
input mbist_si_i;
|
input [`OR1200_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i;
|
input [`OR1200_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i;
|
output mbist_so_o;
|
output mbist_so_o;
|
`endif
|
`endif
|
|
`ifdef OR1200_RAM_PARITY
|
|
parameter tag_ram_extra_width = 24 - (`OR1200_DCTAG_W+1);
|
|
output p_err;
|
|
wire [24-3:0] tag_wire;
|
|
`else
|
|
wire [dw-3:0] tag_wire;
|
|
`endif
|
|
|
`ifdef OR1200_NO_DC
|
`ifdef OR1200_NO_DC
|
|
|
//
|
//
|
// Data cache not implemented
|
// Data cache not implemented
|
Line 100... |
Line 112... |
assign tag_v = 1'b0;
|
assign tag_v = 1'b0;
|
`ifdef OR1200_BIST
|
`ifdef OR1200_BIST
|
assign mbist_so_o = mbist_si_i;
|
assign mbist_so_o = mbist_si_i;
|
`endif
|
`endif
|
|
|
|
`ifdef OR1200_RAM_PARITY
|
|
assign p_err = 0;
|
|
`endif
|
|
|
`else
|
`else
|
|
|
|
assign tag = tag_wire[dw-3:0];
|
|
|
//
|
//
|
// Instantiation of TAG RAM block
|
// Instantiation of TAG RAM block
|
//
|
//
|
// Data widths are tag width plus one for valid
|
// Data widths are tag width plus one for valid
|
or1200_spram #
|
or1200_spram #
|
(
|
(
|
.aw(`OR1200_DCTAG),
|
.aw(`OR1200_DCTAG),
|
|
`ifdef OR1200_RAM_PARITY
|
|
.dw(24)
|
|
`else
|
.dw(`OR1200_DCTAG_W + 1)
|
.dw(`OR1200_DCTAG_W + 1)
|
|
`endif
|
)
|
)
|
dc_tag0
|
dc_tag0
|
(
|
(
|
`ifdef OR1200_BIST
|
`ifdef OR1200_BIST
|
// RAM BIST
|
// RAM BIST
|
.mbist_si_i(mbist_si_i),
|
.mbist_si_i(mbist_si_i),
|
.mbist_so_o(mbist_so_o),
|
.mbist_so_o(mbist_so_o),
|
.mbist_ctrl_i(mbist_ctrl_i),
|
.mbist_ctrl_i(mbist_ctrl_i),
|
`endif
|
`endif
|
.clk(clk),
|
.clk(clk),
|
|
.rst(rst),
|
.ce(en),
|
.ce(en),
|
.we(we),
|
.we(we),
|
.addr(addr),
|
.addr(addr),
|
.di(datain),
|
|
.doq({tag, tag_v, dirty})
|
|
`ifdef OR1200_RAM_PARITY
|
`ifdef OR1200_RAM_PARITY
|
, .p_err()
|
.p_err(p_err),
|
|
.di({{tag_ram_extra_width{1'b0}},datain}),
|
|
`else
|
|
.di(datain),
|
`endif
|
`endif
|
|
.doq({tag_wire, tag_v, dirty})
|
);
|
);
|
`endif
|
`endif
|
|
|
endmodule // or1200_dc_tag
|
endmodule // or1200_dc_tag
|
|
|
No newline at end of file
|
No newline at end of file
|