Line 103... |
Line 103... |
TLBValid[n] = 0;
|
TLBValid[n] = 0;
|
end
|
end
|
end
|
end
|
|
|
wire unmappedArea = pc[63:52]==12'hFFD || pc[63:52]==12'hFFE || pc[63:52]==12'hFFF;
|
wire unmappedArea = pc[63:52]==12'hFFD || pc[63:52]==12'hFFE || pc[63:52]==12'hFFF;
|
wire unmappedDataArea = ea[63:52]==12'hFFD || ea[63:52]==12'hFFE || ea[63:52]==12'hFFF;
|
wire unmappedDataArea = ea[63:52]==12'hFFD || ea[63:52]==12'hFFE || ea[63:52]==12'hFFF || ea[63:52]==12'h000;
|
wire m1UnmappedDataArea = pea[63:13]>=12'hFFD;
|
wire m1UnmappedDataArea = pea[63:52]==12'hFFD || pea[63:52]==12'hFFE || pea[63:52]==12'hFFF || pea[63:52]==12'h000;
|
|
|
always @(posedge clk)
|
always @(posedge clk)
|
if (rst) begin
|
if (rst) begin
|
Random <= 4'hF;
|
Random <= 3'h7;
|
Wired <= 4'd0;
|
Wired <= 3'd0;
|
end
|
end
|
else begin
|
else begin
|
if (Random==Wired)
|
if (Random==Wired)
|
Random <= 3'd7;
|
Random <= 3'd7;
|
else
|
else
|
Line 126... |
Line 126... |
if (wr) begin
|
if (wr) begin
|
case(wregno)
|
case(wregno)
|
`TLBWired: Wired <= dati[2:0];
|
`TLBWired: Wired <= dati[2:0];
|
`TLBIndex: Index <= dati[5:0];
|
`TLBIndex: Index <= dati[5:0];
|
`TLBRandom: Random <= dati[2:0];
|
`TLBRandom: Random <= dati[2:0];
|
`TLBPageMask: HTLBPageMask <= {dati[63:13],13'd0};
|
`TLBPageMask: HTLBPageMask <= dati[63:13];
|
`TLBVirtPage: HTLBVirtPage <= {dati[63:13],13'd0};
|
`TLBVirtPage: HTLBVirtPage <= dati[63:13];
|
`TLBPhysPage0: HTLBPhysPage0 <= {dati[63:13],13'd0};
|
`TLBPhysPage0: HTLBPhysPage0 <= dati[63:13];
|
`TLBPhysPage1: HTLBPhysPage1 <= {dati[63:13],13'd0};
|
`TLBPhysPage1: HTLBPhysPage1 <= dati[63:13];
|
`TLBASID: begin
|
`TLBASID: begin
|
HTLBValid <= dati[0];
|
HTLBValid <= dati[0];
|
HTLBD <= dati[1];
|
HTLBD <= dati[1];
|
HTLBG <= dati[2];
|
HTLBG <= dati[2];
|
HTLBASID <= dati[15:8];
|
HTLBASID <= dati[15:8];
|
Line 152... |
Line 152... |
HTLBASID <= TLBASID[i];
|
HTLBASID <= TLBASID[i];
|
HTLBG <= TLBG[i];
|
HTLBG <= TLBG[i];
|
HTLBD <= TLBD[i];
|
HTLBD <= TLBD[i];
|
HTLBValid <= TLBValid[i];
|
HTLBValid <= TLBValid[i];
|
end
|
end
|
if (wTlbwi) begin
|
else if (wTlbwi) begin
|
TLBVirtPage[i] <= HTLBVirtPage;
|
TLBVirtPage[i] <= HTLBVirtPage;
|
TLBPhysPage0[i] <= HTLBPhysPage0;
|
TLBPhysPage0[i] <= HTLBPhysPage0;
|
TLBPhysPage1[i] <= HTLBPhysPage1;
|
TLBPhysPage1[i] <= HTLBPhysPage1;
|
TLBASID[i] <= HTLBASID;
|
TLBASID[i] <= HTLBASID;
|
TLBG[i] <= HTLBG;
|
TLBG[i] <= HTLBG;
|
TLBD[i] <= HTLBD;
|
TLBD[i] <= HTLBD;
|
TLBValid[i] <= HTLBValid;
|
TLBValid[i] <= HTLBValid;
|
end
|
end
|
if (wTlbwr) begin
|
else if (wTlbwr) begin
|
TLBVirtPage[i] <= HTLBVirtPage;
|
TLBVirtPage[i] <= HTLBVirtPage;
|
TLBPhysPage0[i] <= HTLBPhysPage0;
|
TLBPhysPage0[i] <= HTLBPhysPage0;
|
TLBPhysPage1[i] <= HTLBPhysPage1;
|
TLBPhysPage1[i] <= HTLBPhysPage1;
|
TLBASID[i] <= HTLBASID;
|
TLBASID[i] <= HTLBASID;
|
TLBG[i] <= HTLBG;
|
TLBG[i] <= HTLBG;
|