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

Subversion Repositories mpmc8

[/] [mpmc8/] [trunk/] [rtl/] [mpmc10/] [mpmc10_resv_bit.sv] - Diff between revs 5 and 11

Show entire file | Details | Blame | View Log

Rev 5 Rev 11
Line 37... Line 37...
import mpmc10_pkg::*;
import mpmc10_pkg::*;
 
 
// Reservation status bit
// Reservation status bit
module mpmc10_resv_bit(clk, state, wch, we, cr, adr, resv_ch, resv_adr, rb);
module mpmc10_resv_bit(clk, state, wch, we, cr, adr, resv_ch, resv_adr, rb);
input clk;
input clk;
input [3:0] state;
input mpmc10_state_t state;
input we;
input we;
input cr;
input cr;
input [3:0] wch;
input [3:0] wch;
input [31:0] adr;
input [31:0] adr;
input [3:0] resv_ch [0:mpmc10_pkg::NAR-1];
input [3:0] resv_ch [0:mpmc10_pkg::NAR-1];
input [31:0] resv_adr [0:mpmc10_pkg::NAR-1];
input [31:0] resv_adr [0:mpmc10_pkg::NAR-1];
output reg rb;
output reg rb;
 
 
integer n5;
integer n5;
always_ff @(posedge clk)
always_ff @(posedge clk)
if (state==mpmc10_pkg::IDLE) begin
if (state==IDLE) begin
  if (we) begin
  if (we) begin
    if (cr) begin
    if (cr) begin
      rb <= mpmc10_pkg::FALSE;
      rb <= 1'b0;
        for (n5 = 0; n5 < mpmc10_pkg::NAR; n5 = n5 + 1)
        for (n5 = 0; n5 < mpmc10_pkg::NAR; n5 = n5 + 1)
              if ((resv_ch[n5]==wch) && (resv_adr[n5][31:5]==adr[31:5]))
              if ((resv_ch[n5]==wch) && (resv_adr[n5][31:5]==adr[31:5]))
              rb <= mpmc10_pkg::TRUE;
              rb <= 1'b1;
    end
    end
  end
  end
end
end
 
 
endmodule
endmodule

powered by: WebSVN 2.1.0

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