OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [orpsocv2/] [rtl/] [verilog/] [or1200/] [or1200_dc_top.v] - Diff between revs 477 and 483

Show entire file | Details | Blame | View Log

Rev 477 Rev 483
Line 76... Line 76...
`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
 
 
        // SPRs
        // SPRs
        spr_cs, spr_write, spr_dat_i, spr_addr, mtspr_dc_done
        spr_cs, spr_write, spr_dat_i, spr_addr, mtspr_dc_done
);
);
 
 
parameter dw = `OR1200_OPERAND_WIDTH;
parameter dw = `OR1200_OPERAND_WIDTH;
Line 135... Line 140...
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
 
output [1:0]                     p_err;
 
`endif
 
 
//
//
// SPR access
// SPR access
//
//
input                           spr_cs;
input                           spr_cs;
input                           spr_write;
input                           spr_write;
Line 166... Line 175...
assign dcqmem_rty_o = ~dcqmem_ack_o;
assign dcqmem_rty_o = ~dcqmem_ack_o;
assign dcqmem_tag_o = dcqmem_err_o ? `OR1200_DTAG_BE : dcqmem_tag_i;
assign dcqmem_tag_o = dcqmem_err_o ? `OR1200_DTAG_BE : dcqmem_tag_i;
 
 
assign mtspr_dc_done = 1'b1;
assign mtspr_dc_done = 1'b1;
 
 
 
`ifdef OR1200_RAM_PARITY
 
assign p_err = 0;
 
`endif
 
 
`else
`else
 
 
//
//
// Internal wires and regs
// Internal wires and regs
//
//
Line 183... Line 196...
wire    [31:0]                   dc_addr;
wire    [31:0]                   dc_addr;
wire                            dcfsm_biu_read;
wire                            dcfsm_biu_read;
wire                            dcfsm_biu_write;
wire                            dcfsm_biu_write;
wire                            dcfsm_dcram_di_sel;
wire                            dcfsm_dcram_di_sel;
wire                            dcfsm_biu_do_sel;
wire                            dcfsm_biu_do_sel;
reg                             tagcomp_miss;
wire                            tagcomp_miss;
wire    [`OR1200_DCINDXH:`OR1200_DCLS]  dctag_addr;
wire    [`OR1200_DCINDXH:`OR1200_DCLS]  dctag_addr;
wire                            dctag_en;
wire                            dctag_en;
wire                            dctag_v;
wire                            dctag_v;
wire                            dctag_dirty;
wire                            dctag_dirty;
 
 
Line 211... Line 224...
wire                            mbist_ram_si = mbist_si_i;
wire                            mbist_ram_si = mbist_si_i;
wire                            mbist_tag_si = mbist_ram_so;
wire                            mbist_tag_si = mbist_ram_so;
assign                          mbist_so_o = mbist_tag_so;
assign                          mbist_so_o = mbist_tag_so;
`endif
`endif
 
 
 
`ifdef OR1200_RAM_PARITY
 
wire [1:0]                       p_err_wire;
 
 
 
// Indicate an error if we're reading from the RAM (hit)
 
// Additionally, mask with tag_v as tag ram is properly cleared during
 
// init, whereas the data RAM is not.
 
assign p_err[0] = (dcqmem_ack_o & (!dcfsm_first_miss_ack | dc_en) &
 
                   !dcqmem_we_i) &
 
                  (tag_v & !p_err[1]) ? p_err_wire[0] : 0;
 
// Whenever there's a tag parity error and we have an instruction fetch
 
assign p_err[1] = (dctag_en & !dctag_we) ? p_err_wire[1] : 0;
 
 
 
 
 
`endif
 
 
// Address out to external bus - always from FSM   
// Address out to external bus - always from FSM   
assign dcsb_adr_o = dc_addr;
assign dcsb_adr_o = dc_addr;
//
//
// SPR register decodes
// SPR register decodes
//
//
Line 288... Line 316...
//
//
// Tag comparison
// Tag comparison
//
//
   wire [31:`OR1200_DCTAGL]  dcqmem_adr_i_tag;
   wire [31:`OR1200_DCTAGL]  dcqmem_adr_i_tag;
   assign dcqmem_adr_i_tag = dcqmem_adr_i[31:`OR1200_DCTAGL];
   assign dcqmem_adr_i_tag = dcqmem_adr_i[31:`OR1200_DCTAGL];
 
/*
always @(tag or dcqmem_adr_i_tag or tag_v) begin
always @(tag or dcqmem_adr_i_tag or tag_v) begin
        if ((tag != dcqmem_adr_i_tag) || !tag_v)
        if ((tag != dcqmem_adr_i_tag) || !tag_v
                tagcomp_miss = 1'b1;
`ifdef OR1200_RAM_PARITY
        else
              | p_err
                tagcomp_miss = 1'b0;
`endif
end
)
 
                tagcomp_miss = 1'b1;
 
        else
 
                tagcomp_miss = 1'b0;
 
end
 
*/
 
assign tagcomp_miss = (tag != dcqmem_adr_i_tag) | !tag_v
 
`ifdef OR1200_RAM_PARITY
 
                       | (|p_err_wire)
 
`endif
 
                       ;
//
//
// Instantiation of DC Finite State Machine
// Instantiation of DC Finite State Machine
//
//
or1200_dc_fsm or1200_dc_fsm(
or1200_dc_fsm or1200_dc_fsm(
        .clk(clk),
        .clk(clk),
Line 347... Line 384...
        // RAM BIST
        // RAM BIST
        .mbist_si_i(mbist_ram_si),
        .mbist_si_i(mbist_ram_si),
        .mbist_so_o(mbist_ram_so),
        .mbist_so_o(mbist_ram_so),
        .mbist_ctrl_i(mbist_ctrl_i),
        .mbist_ctrl_i(mbist_ctrl_i),
`endif
`endif
 
`ifdef OR1200_RAM_PARITY
 
        .p_err(p_err_wire[0]),
 
`endif
        .addr(dc_addr[`OR1200_DCINDXH:2]),
        .addr(dc_addr[`OR1200_DCINDXH:2]),
        .en(dc_en),
        .en(dc_en),
        .we(dcram_we),
        .we(dcram_we),
        .datain(to_dcram),
        .datain(to_dcram),
        .dataout(from_dcram)
        .dataout(from_dcram)
Line 366... Line 406...
        // RAM BIST
        // RAM BIST
        .mbist_si_i(mbist_tag_si),
        .mbist_si_i(mbist_tag_si),
        .mbist_so_o(mbist_tag_so),
        .mbist_so_o(mbist_tag_so),
        .mbist_ctrl_i(mbist_ctrl_i),
        .mbist_ctrl_i(mbist_ctrl_i),
`endif
`endif
 
`ifdef OR1200_RAM_PARITY
 
        .p_err(p_err_wire[1]),
 
`endif
        .addr(dctag_addr),
        .addr(dctag_addr),
        .en(dctag_en),
        .en(dctag_en),
        .we(dctag_we),
        .we(dctag_we),
        .datain({dc_addr[31:`OR1200_DCTAGL], dctag_v, dctag_dirty}),
        .datain({dc_addr[31:`OR1200_DCTAGL], dctag_v, dctag_dirty}),
        .tag_v(tag_v),
        .tag_v(tag_v),

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.