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

Subversion Repositories mpmc8

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

Show entire file | Details | Blame | View Log

Rev 5 Rev 11
Line 42... Line 42...
        wch, we, wadr, cr, ch1_taghit,
        wch, we, wadr, cr, ch1_taghit,
        resv_ch, resv_adr, rack);
        resv_ch, resv_adr, rack);
parameter NAR = 2;
parameter NAR = 2;
input rst;
input rst;
input clk;
input clk;
input [3:0] state;
input mpmc10_state_t state;
input [31:0] adr0;
input [31:0] adr0;
input [31:0] adr1;
input [31:0] adr1;
input [31:0] adr2;
input [31:0] adr2;
input [31:0] adr3;
input [31:0] adr3;
input [31:0] adr4;
input [31:0] adr4;
Line 69... Line 69...
output reg [3:0] resv_ch [0:NAR-1];
output reg [3:0] resv_ch [0:NAR-1];
output reg [31:0] resv_adr [0:NAR-1];
output reg [31:0] resv_adr [0:NAR-1];
output reg [7:0] rack;  // reservation acknowledged
output reg [7:0] rack;  // reservation acknowledged
 
 
reg [19:0] resv_to_cnt;
reg [19:0] resv_to_cnt;
wire [2:0] enc;
wire [3:0] enc;
wire [7:0] srr = {sr7,sr6,sr5,sr4,sr3,sr2,sr1,sr0};
wire [7:0] srr = {sr7,sr6,sr5,sr4,sr3,sr2,sr1,sr0};
wire [31:0] adr [0:7];
wire [31:0] adr [0:7];
 
 
assign adr[0] = adr0;
assign adr[0] = adr0;
assign adr[1] = adr1;
assign adr[1] = adr1;
Line 123... Line 123...
 
 
        for (n7 = 0; n7 < 8; n7 = n7 + 1)
        for (n7 = 0; n7 < 8; n7 = n7 + 1)
                if (enc==n7 && |srr)
                if (enc==n7 && |srr)
                        reserve_adr({1'b0,n7[2:0]},adr[n7]);
                        reserve_adr({1'b0,n7[2:0]},adr[n7]);
 
 
        if (state==mpmc10_pkg::IDLE) begin
        if (state==IDLE) begin
                if (we) begin
                if (we) begin
            if (cr) begin
            if (cr) begin
                for (n7 = 0; n7 < NAR; n7 = n7 + 1)
                for (n7 = 0; n7 < NAR; n7 = n7 + 1)
                if ((resv_ch[n7]==wch) && (resv_adr[n7][31:4]==wadr[31:4]))
                if ((resv_ch[n7]==wch) && (resv_adr[n7][31:4]==wadr[31:4]))
            resv_ch[n7] <= 4'hF;
            resv_ch[n7] <= 4'hF;
Line 140... Line 140...
function resv_held;
function resv_held;
input [3:0] ch;
input [3:0] ch;
input [31:0] adr;
input [31:0] adr;
integer n8;
integer n8;
begin
begin
        resv_held = mpmc10_pkg::FALSE;
        resv_held = 1'b0;
        for (n8 = 0; n8 < NAR; n8 = n8 + 1)
        for (n8 = 0; n8 < NAR; n8 = n8 + 1)
                if (resv_ch[n8]==ch && resv_adr[n8][31:5]==adr[31:5])
                if (resv_ch[n8]==ch && resv_adr[n8][31:5]==adr[31:5])
                        resv_held = mpmc10_pkg::TRUE;
                        resv_held = 1'b1;
end
end
endfunction
endfunction
 
 
// Find an empty reservation bucket
// Find an empty reservation bucket
integer n9;
integer n9;

powered by: WebSVN 2.1.0

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