Line 90... |
Line 90... |
Tuple2#(Bit#(16),Bit#(5)) temp <- rfile.sub(tempPic);
|
Tuple2#(Bit#(16),Bit#(5)) temp <- rfile.sub(tempPic);
|
if(tpl_1(temp)==tempNum)
|
if(tpl_1(temp)==tempNum)
|
begin
|
begin
|
state <= RemoveFound;
|
state <= RemoveFound;
|
if(state==RemoveOutput)
|
if(state==RemoveOutput)
|
returnList.enq(Valid tpl_2(temp));
|
returnList.enq(Valid (tpl_2(temp)));
|
end
|
end
|
if(tempCount>=picCount)
|
if(tempCount>=picCount)
|
$display( "ERROR BufferControl: ShortTermPicList removing not found");
|
$display( "ERROR BufferControl: ShortTermPicList removing not found");
|
end
|
end
|
else
|
else
|
Line 137... |
Line 137... |
if(tempCount
|
if(tempCount
|
begin
|
begin
|
Tuple2#(Bit#(16),Bit#(5)) temp <- rfile.sub(tempPic);
|
Tuple2#(Bit#(16),Bit#(5)) temp <- rfile.sub(tempPic);
|
if(tpl_1(temp)==tempNum)
|
if(tpl_1(temp)==tempNum)
|
begin
|
begin
|
returnList.enq(Valid tpl_2(temp));
|
returnList.enq(Valid (tpl_2(temp)));
|
state <= Idle;
|
state <= Idle;
|
end
|
end
|
tempPic <= shortTermPicListPrev(tempPic);
|
tempPic <= shortTermPicListPrev(tempPic);
|
tempCount <= tempCount+1;
|
tempCount <= tempCount+1;
|
end
|
end
|
Line 151... |
Line 151... |
|
|
rule listingAll ( state matches tagged ListAll );
|
rule listingAll ( state matches tagged ListAll );
|
if(tempCount
|
if(tempCount
|
begin
|
begin
|
Tuple2#(Bit#(16),Bit#(5)) temp <- rfile.sub(tempPic);
|
Tuple2#(Bit#(16),Bit#(5)) temp <- rfile.sub(tempPic);
|
returnList.enq(Valid tpl_2(temp));
|
returnList.enq(Valid (tpl_2(temp)));
|
tempPic <= shortTermPicListPrev(tempPic);
|
tempPic <= shortTermPicListPrev(tempPic);
|
tempCount <= tempCount+1;
|
tempCount <= tempCount+1;
|
end
|
end
|
else
|
else
|
begin
|
begin
|
Line 288... |
Line 288... |
rule listingAll ( state matches tagged ListAll );
|
rule listingAll ( state matches tagged ListAll );
|
if(tempPic
|
if(tempPic
|
begin
|
begin
|
Maybe#(Bit#(5)) temp <- rfile.sub(tempPic);
|
Maybe#(Bit#(5)) temp <- rfile.sub(tempPic);
|
if(temp matches tagged Valid .data)
|
if(temp matches tagged Valid .data)
|
returnList.enq(Valid data);
|
returnList.enq(Valid (data));
|
tempPic <= tempPic+1;
|
tempPic <= tempPic+1;
|
end
|
end
|
else
|
else
|
begin
|
begin
|
returnList.enq(Invalid);
|
returnList.enq(Invalid);
|
Line 309... |
Line 309... |
|
|
method Action insert( Bit#(5) frameNum, Bit#(5) slot ) if(state matches tagged Idle);
|
method Action insert( Bit#(5) frameNum, Bit#(5) slot ) if(state matches tagged Idle);
|
let rData <- rfile.sub(frameNum);
|
let rData <- rfile.sub(frameNum);
|
if(rData matches tagged Invalid)
|
if(rData matches tagged Invalid)
|
picCount <= picCount+1;
|
picCount <= picCount+1;
|
rfile.upd(frameNum,Valid slot);
|
rfile.upd(frameNum,Valid (slot));
|
//$display( "TRACE BufferControl: LongTermPicList insert %h %h %h", picCount, frameNum, slot);
|
//$display( "TRACE BufferControl: LongTermPicList insert %h %h %h", picCount, frameNum, slot);
|
endmethod
|
endmethod
|
|
|
method Action remove( Bit#(5) frameNum ) if(state matches tagged Idle);
|
method Action remove( Bit#(5) frameNum ) if(state matches tagged Idle);
|
let rData <- rfile.sub(frameNum);
|
let rData <- rfile.sub(frameNum);
|
Line 880... |
Line 880... |
|
|
rule outputingResp ( !outputframedone );
|
rule outputingResp ( !outputframedone );
|
if(loadRespQ1.first() matches tagged FBLoadResp .xdata)
|
if(loadRespQ1.first() matches tagged FBLoadResp .xdata)
|
begin
|
begin
|
loadRespQ1.deq();
|
loadRespQ1.deq();
|
outfifo.enq(YUV xdata);
|
outfifo.enq(YUV (xdata));
|
if(outRespCount == {1'b0,frameinmb,6'b000000}+{2'b00,frameinmb,5'b00000}-1)
|
if(outRespCount == {1'b0,frameinmb,6'b000000}+{2'b00,frameinmb,5'b00000}-1)
|
outputframedone <= True;
|
outputframedone <= True;
|
outRespCount <= outRespCount+1;
|
outRespCount <= outRespCount+1;
|
end
|
end
|
endrule
|
endrule
|
Line 947... |
Line 947... |
if(inLoadOutOfBounds.first() == 2'b10)
|
if(inLoadOutOfBounds.first() == 2'b10)
|
inLoadRespQ.enq(IPLoadResp ({data[7:0],data[7:0],data[7:0],data[7:0]}));
|
inLoadRespQ.enq(IPLoadResp ({data[7:0],data[7:0],data[7:0],data[7:0]}));
|
else if(inLoadOutOfBounds.first() == 2'b11)
|
else if(inLoadOutOfBounds.first() == 2'b11)
|
inLoadRespQ.enq(IPLoadResp ({data[31:24],data[31:24],data[31:24],data[31:24]}));
|
inLoadRespQ.enq(IPLoadResp ({data[31:24],data[31:24],data[31:24],data[31:24]}));
|
else
|
else
|
inLoadRespQ.enq(IPLoadResp data);
|
inLoadRespQ.enq(IPLoadResp (data));
|
inLoadOutOfBounds.deq();
|
inLoadOutOfBounds.deq();
|
//$display( "Trace BufferControl: interResp %h %h", inLoadOutOfBounds.first(), data);
|
//$display( "Trace BufferControl: interResp %h %h", inLoadOutOfBounds.first(), data);
|
endrule
|
endrule
|
|
|
|
|