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

Subversion Repositories mpmc8

[/] [mpmc8/] [trunk/] [rtl/] [mpmc10/] [mpcm10_cache_wb.sv] - Diff between revs 8 and 9

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 8 Rev 9
Line 293... Line 293...
                always_comb vbito5a[g] <= vbit[g][radrr[5][HIBIT:LOBIT]];
                always_comb vbito5a[g] <= vbit[g][radrr[5][HIBIT:LOBIT]];
                always_comb vbito6a[g] <= vbit[g][radrr[6][HIBIT:LOBIT]];
                always_comb vbito6a[g] <= vbit[g][radrr[6][HIBIT:LOBIT]];
                always_comb vbito7a[g] <= vbit[g][radrr[7][HIBIT:LOBIT]];
                always_comb vbito7a[g] <= vbit[g][radrr[7][HIBIT:LOBIT]];
                always_comb vbito8a[g] <= vbit[g][radrr[8][HIBIT:LOBIT]];
                always_comb vbito8a[g] <= vbit[g][radrr[8][HIBIT:LOBIT]];
 
 
                always_ff @(posedge ch0clk)     hit0a[g] = (doutb[0].lines[g].tag==radrr[0][31:HIBIT+1]) && (vbito0a[g]==1'b1);
                always_ff @(posedge ch0clk)     hit0a[g] = (doutb[0].lines[g].tag==radrr[0][31:LOBIT]) && (vbito0a[g]==1'b1);
                always_ff @(posedge ch1clk)     hit1a[g] = (doutb[1].lines[g].tag==radrr[1][31:HIBIT+1]) && (vbito1a[g]==1'b1);
                always_ff @(posedge ch1clk)     hit1a[g] = (doutb[1].lines[g].tag==radrr[1][31:LOBIT]) && (vbito1a[g]==1'b1);
                always_ff @(posedge ch2clk)     hit2a[g] = (doutb[2].lines[g].tag==radrr[2][31:HIBIT+1]) && (vbito2a[g]==1'b1);
                always_ff @(posedge ch2clk)     hit2a[g] = (doutb[2].lines[g].tag==radrr[2][31:LOBIT]) && (vbito2a[g]==1'b1);
                always_ff @(posedge ch3clk)     hit3a[g] = (doutb[3].lines[g].tag==radrr[3][31:HIBIT+1]) && (vbito3a[g]==1'b1);
                always_ff @(posedge ch3clk)     hit3a[g] = (doutb[3].lines[g].tag==radrr[3][31:LOBIT]) && (vbito3a[g]==1'b1);
                always_ff @(posedge ch4clk)     hit4a[g] = (doutb[4].lines[g].tag==radrr[4][31:HIBIT+1]) && (vbito4a[g]==1'b1);
                always_ff @(posedge ch4clk)     hit4a[g] = (doutb[4].lines[g].tag==radrr[4][31:LOBIT]) && (vbito4a[g]==1'b1);
                always_ff @(posedge ch5clk)     hit5a[g] = (doutb[5].lines[g].tag==radrr[5][31:HIBIT+1]) && (vbito5a[g]==1'b1);
                always_ff @(posedge ch5clk)     hit5a[g] = (doutb[5].lines[g].tag==radrr[5][31:LOBIT]) && (vbito5a[g]==1'b1);
                always_ff @(posedge ch6clk)     hit6a[g] = (doutb[6].lines[g].tag==radrr[6][31:HIBIT+1]) && (vbito6a[g]==1'b1);
                always_ff @(posedge ch6clk)     hit6a[g] = (doutb[6].lines[g].tag==radrr[6][31:LOBIT]) && (vbito6a[g]==1'b1);
                always_ff @(posedge ch7clk)     hit7a[g] = (doutb[7].lines[g].tag==radrr[7][31:HIBIT+1]) && (vbito7a[g]==1'b1);
                always_ff @(posedge ch7clk)     hit7a[g] = (doutb[7].lines[g].tag==radrr[7][31:LOBIT]) && (vbito7a[g]==1'b1);
                always_ff @(posedge wclk)       hit8a[g] = (doutb[8].lines[g].tag==radrr[8][31:HIBIT+1]) && (vbito8a[g]==1'b1);
                always_ff @(posedge wclk)       hit8a[g] = (doutb[8].lines[g].tag==radrr[8][31:LOBIT]) && (vbito8a[g]==1'b1);
        end
        end
        always_comb ch0o.ack = (|hit0a & stb0) | (ch0wack & stb0);
        always_comb ch0o.ack = (|hit0a & stb0) | (ch0wack & stb0);
        always_comb ch1o.ack = (|hit1a & stb1) | (ch1wack & stb1);
        always_comb ch1o.ack = (|hit1a & stb1) | (ch1wack & stb1);
        always_comb ch2o.ack = (|hit2a & stb2) | (ch2wack & stb2);
        always_comb ch2o.ack = (|hit2a & stb2) | (ch2wack & stb2);
        always_comb ch3o.ack = (|hit3a & stb3) | (ch3wack & stb3);
        always_comb ch3o.ack = (|hit3a & stb3) | (ch3wack & stb3);
Line 424... Line 424...
generate begin : gWrData
generate begin : gWrData
        // LRU update
        // LRU update
        always_ff @(posedge wclk)
        always_ff @(posedge wclk)
        begin
        begin
                if (ldcycd2) begin
                if (ldcycd2) begin
                        wdata.lines[0].tag <= {5'd0,wadr2[31:HIBIT+1]};                 // set tag
                        wdata.lines[0].tag <= wadr2[31:LOBIT];                  // set tag
                        wdata.lines[1].tag <= t0;
                        wdata.lines[1].tag <= t0;
                        wdata.lines[2].tag <= t1;
                        wdata.lines[2].tag <= t1;
                        wdata.lines[3].tag <= t2;
                        wdata.lines[3].tag <= t2;
                        wdata.lines[0].modified <= 1'b0;                                                                                        // clear modified flags
                        wdata.lines[0].modified <= 1'b0;                                                                                        // clear modified flags
                        wdata.lines[1].modified <= m0;
                        wdata.lines[1].modified <= m0;
Line 506... Line 506...
always_ff @(posedge wclk)
always_ff @(posedge wclk)
if (rst)
if (rst)
        wack <= 1'b0;
        wack <= 1'b0;
else begin
else begin
        wack <= 1'b0;
        wack <= 1'b0;
        if (wchi.stb & ~ld.stb & wchi.we)
        if (wchi_stb & ~ld.stb & wchi.we)
                wack <= 1'b1;
                wack <= 1'b1;
end
end
assign wcho.ack = wack & wchi.stb;
assign wcho.ack = wack & wchi.stb;
 
 
endmodule
endmodule

powered by: WebSVN 2.1.0

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