Line 26... |
Line 26... |
import FIFO::*;
|
import FIFO::*;
|
import IDeblockFilter::*;
|
import IDeblockFilter::*;
|
import mkDeblockFilter::*;
|
import mkDeblockFilter::*;
|
import Connectable::*;
|
import Connectable::*;
|
|
|
(*synthesize*)
|
|
module mkDeblockFilterParallel (IDeblockFilter);
|
interface ParallelDeblockFilter;
|
|
|
|
// Interface for inter-module io
|
|
interface Put#(EntropyDecOT) ioinchroma;
|
|
interface Put#(EntropyDecOT) ioinluma;
|
|
interface Get#(DeblockFilterOT) ioout;
|
|
|
|
// Interface for module to memory
|
|
interface Client#(MemReq#(TAdd#(PicWidthSz,5),32),MemResp#(32)) mem_client_data;
|
|
interface Client#(MemReq#(PicWidthSz,13),MemResp#(13)) mem_client_parameter;
|
|
|
|
endinterface
|
|
|
|
|
|
module mkDeblockFilterParallel (ParallelDeblockFilter);
|
FIFO#(ChromaFlag) dataTags <- mkFIFO();
|
FIFO#(ChromaFlag) dataTags <- mkFIFO();
|
FIFO#(ChromaFlag) parameterTags <- mkFIFO();
|
FIFO#(ChromaFlag) parameterTags <- mkFIFO();
|
IDeblockFilter deblockfilterluma <- mkDeblockFilter(Luma);
|
IDeblockFilter deblockfilterluma <- mkDeblockFilter(Luma);
|
IDeblockFilter deblockfilterchroma <- mkDeblockFilter(Chroma);
|
IDeblockFilter deblockfilterchroma <- mkDeblockFilter(Chroma);
|
FIFO#(MemReq#(TAdd#(PicWidthSz,5),32)) dataMemReqQ <- mkFIFO;
|
FIFO#(MemReq#(TAdd#(PicWidthSz,5),32)) dataMemReqQ <- mkFIFO;
|
Line 101... |
Line 115... |
interface Get request = fifoToGet(dataMemReqQ);
|
interface Get request = fifoToGet(dataMemReqQ);
|
interface Put response;
|
interface Put response;
|
method Action put(MemResp#(32) dataIn);
|
method Action put(MemResp#(32) dataIn);
|
if(dataTags.first == Luma)
|
if(dataTags.first == Luma)
|
begin
|
begin
|
|
|
deblockfilterluma.mem_client_data.response.put(dataIn);
|
deblockfilterluma.mem_client_data.response.put(dataIn);
|
dataTags.deq;
|
dataTags.deq;
|
end
|
end
|
else
|
else
|
begin
|
begin
|
|
|
deblockfilterchroma.mem_client_data.response.put(dataIn);
|
deblockfilterchroma.mem_client_data.response.put(dataIn);
|
dataTags.deq;
|
dataTags.deq;
|
end
|
end
|
endmethod
|
endmethod
|
endinterface
|
endinterface
|
Line 119... |
Line 135... |
interface Get request = fifoToGet(parameterMemReqQ);
|
interface Get request = fifoToGet(parameterMemReqQ);
|
interface Put response;
|
interface Put response;
|
method Action put(MemResp#(13) dataIn);
|
method Action put(MemResp#(13) dataIn);
|
if(parameterTags.first == Luma)
|
if(parameterTags.first == Luma)
|
begin
|
begin
|
|
|
deblockfilterluma.mem_client_parameter.response.put(dataIn);
|
deblockfilterluma.mem_client_parameter.response.put(dataIn);
|
parameterTags.deq;
|
parameterTags.deq;
|
end
|
end
|
else
|
else
|
begin
|
begin
|
Line 134... |
Line 151... |
endinterface
|
endinterface
|
|
|
interface Get ioout = fifoToGet(outputFIFO);
|
interface Get ioout = fifoToGet(outputFIFO);
|
|
|
|
|
interface Put ioin;
|
interface Put ioinchroma;
|
method Action put(EntropyDecOT dataIn);
|
method Action put(EntropyDecOT dataIn);
|
|
|
case (dataIn) matches
|
case (dataIn) matches
|
tagged PBoutput .xdata: begin
|
tagged PBoutput .xdata: begin
|
match {.chromaFlag, .vec} = xdata;
|
match {.chromaFlag, .vec} = xdata;
|
if(chromaFlag == Luma)
|
if(chromaFlag == Chroma)
|
begin
|
begin
|
deblockfilterluma.ioin.put(dataIn);
|
|
|
deblockfilterchroma.ioin.put(dataIn);
|
end
|
end
|
else
|
end
|
begin
|
|
|
default: begin
|
deblockfilterchroma.ioin.put(dataIn);
|
deblockfilterchroma.ioin.put(dataIn);
|
end
|
end
|
|
endcase
|
|
endmethod
|
|
endinterface
|
|
|
|
|
|
interface Put ioinluma;
|
|
method Action put(EntropyDecOT dataIn);
|
|
|
|
case (dataIn) matches
|
|
tagged PBoutput .xdata: begin
|
|
match {.chromaFlag, .vec} = xdata;
|
|
if(chromaFlag == Luma)
|
|
begin
|
|
|
|
deblockfilterluma.ioin.put(dataIn);
|
|
end
|
end
|
end
|
|
|
default: begin
|
default: begin
|
deblockfilterluma.ioin.put(dataIn);
|
deblockfilterluma.ioin.put(dataIn);
|
deblockfilterchroma.ioin.put(dataIn);
|
|
end
|
end
|
endcase
|
endcase
|
endmethod
|
endmethod
|
endinterface
|
endinterface
|
|
|
|
|
endmodule
|
endmodule
|