URL
https://opencores.org/ocsvn/bluespec-h264/bluespec-h264/trunk
Subversion Repositories bluespec-h264
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 87 to Rev 88
- ↔ Reverse comparison
Rev 87 → Rev 88
/trunk/build/Makefile
1,7 → 1,7
#======================================================================= |
# 6.375 Makefile for bsc-compile |
#----------------------------------------------------------------------- |
# $Id: Makefile,v 1.11 2008-06-26 18:10:59 jamey.hicks Exp $ |
# $Id: Makefile,v 1.12 2008-06-26 18:11:07 jamey.hicks Exp $ |
# |
|
default : all |
24,11 → 24,7
srcdir = $(basedir)/src |
reldir = $(basedir)/release |
lcpdir = $(basedir)/LumaChromaParallel |
$(srcdir)/MemoryTee.bsv \ |
$(srcdir)/IDecoupledClient.bsv \ |
$(srcdir)/IMemEDDecoupled.bsv \ |
$(srcdir)/mkMemEDDecoupled.bsv \ |
$(srcdir)/FIFOUtility.bsv \ |
|
#-------------------------------------------------------------------- |
# Build rules |
#-------------------------------------------------------------------- |
38,8 → 34,8
# -relax-method-earliness -relax-method-urgency -v |
|
BSC_OPTS = -u -v -verilog -aggressive-conditions |
SIM_OPTS = -u -v -sim -aggressive-conditions |
|
|
mainline : |
$(BSC_COMP) $(BSC_OPTS) -bdir ./ -p +:$(srcdir) -g $(toplevel_module) $(srcdir)/$(toplevel_module).bsv > out.log |
|
47,7 → 43,7
$(BSC_COMP) $(BSC_OPTS) -bdir ./ -p +:$(reldir)/ -g $(toplevel_module) $(reldir)/$(toplevel_module).bsv> out.log\ |
|
LCP : |
$(BSC_COMP) $(BSC_OPTS) -bdir ./ -p +:$(lcpdir):$(reldir)/ -g $(toplevel_module) $(reldir)/$(toplevel_module).bsv> out.log\ |
$(BSC_COMP) $(SIM_OPTS) -bdir ./ -p +:$(lcpdir):$(reldir)/ -g $(toplevel_module) $(reldir)/$(toplevel_module).bsv> out.log\ |
|
#-------------------------------------------------------------------- |
# Default make target |
/trunk/LumaChromaParallel/DeblockParallel.bsv
0,0 → 1,162
// The MIT License |
|
// Copyright (c) 2006-2007 Massachusetts Institute of Technology |
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to deal |
// in the Software without restriction, including without limitation the rights |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
// copies of the Software, and to permit persons to whom the Software is |
// furnished to do so, subject to the following conditions: |
|
// The above copyright notice and this permission notice shall be included in |
// all copies or substantial portions of the Software. |
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
// THE SOFTWARE. |
import GetPut::*; |
import ClientServer::*; |
import H264Types::*; |
import FIFOF::*; |
import FIFO::*; |
import IDeblockFilter::*; |
import mkDeblockFilter::*; |
import Connectable::*; |
|
(*synthesize*) |
module mkDeblockFilterParallel (IDeblockFilter); |
FIFO#(ChromaFlag) dataTags <- mkFIFO(); |
FIFO#(ChromaFlag) parameterTags <- mkFIFO(); |
IDeblockFilter deblockfilterluma <- mkDeblockFilter(Luma); |
IDeblockFilter deblockfilterchroma <- mkDeblockFilter(Chroma); |
FIFO#(MemReq#(TAdd#(PicWidthSz,5),32)) dataMemReqQ <- mkFIFO; |
FIFO#(MemReq#(PicWidthSz,13)) parameterMemReqQ <- mkFIFO; |
FIFOF#(DeblockFilterOT) outputFIFOLuma <- mkFIFOF; |
FIFOF#(DeblockFilterOT) outputFIFOChroma <- mkFIFOF; |
FIFO#(DeblockFilterOT) outputFIFO <- mkFIFO; |
|
rule memReqChroma; |
MemReq#(TAdd#(PicWidthSz,5),32) req <- deblockfilterchroma.mem_client_data.request.get; |
dataMemReqQ.enq(req); |
if(req matches tagged LoadReq .addrt) |
begin |
dataTags.enq(Chroma); |
end |
endrule |
|
rule memReqLuma; |
MemReq#(TAdd#(PicWidthSz,5),32) req <- deblockfilterluma.mem_client_data.request.get; |
dataMemReqQ.enq(req); |
|
if(req matches tagged LoadReq .addrt) |
begin |
dataTags.enq(Luma); |
end |
endrule |
|
rule parameterReqLuma; |
MemReq#(PicWidthSz,13) req <- deblockfilterluma.mem_client_parameter.request.get; |
parameterMemReqQ.enq(req); |
|
if(req matches tagged LoadReq .addrt) |
begin |
parameterTags.enq(Luma); |
end |
endrule |
|
rule parameterReqChroma; |
MemReq#(PicWidthSz,13) req <- deblockfilterchroma.mem_client_parameter.request.get; |
parameterMemReqQ.enq(req); |
if(req matches tagged LoadReq .addrt) |
begin |
parameterTags.enq(Chroma); |
end |
endrule |
|
mkConnection(deblockfilterchroma.ioout, fifoToPut(fifofToFifo(outputFIFOChroma))); |
mkConnection(deblockfilterluma.ioout, fifoToPut(fifofToFifo(outputFIFOLuma))); |
|
rule outMatch (outputFIFOLuma.first == outputFIFOChroma.first); |
outputFIFOLuma.deq; |
outputFIFOChroma.deq; |
outputFIFO.enq(outputFIFOLuma.first); |
endrule |
|
rule outLuma(outputFIFOLuma.first matches tagged DFBLuma .data); |
outputFIFOLuma.deq; |
outputFIFO.enq(outputFIFOLuma.first); |
endrule |
|
rule outChroma(outputFIFOChroma.first matches tagged DFBChroma .data); |
outputFIFOChroma.deq; |
outputFIFO.enq(outputFIFOChroma.first); |
endrule |
|
interface Client mem_client_data; |
interface Get request = fifoToGet(dataMemReqQ); |
interface Put response; |
method Action put(MemResp#(32) dataIn); |
if(dataTags.first == Luma) |
begin |
deblockfilterluma.mem_client_data.response.put(dataIn); |
dataTags.deq; |
end |
else |
begin |
deblockfilterchroma.mem_client_data.response.put(dataIn); |
dataTags.deq; |
end |
endmethod |
endinterface |
endinterface |
|
interface Client mem_client_parameter; |
interface Get request = fifoToGet(parameterMemReqQ); |
interface Put response; |
method Action put(MemResp#(13) dataIn); |
if(parameterTags.first == Luma) |
begin |
deblockfilterluma.mem_client_parameter.response.put(dataIn); |
parameterTags.deq; |
end |
else |
begin |
deblockfilterchroma.mem_client_parameter.response.put(dataIn); |
parameterTags.deq; |
end |
endmethod |
endinterface |
endinterface |
|
interface Get ioout = fifoToGet(outputFIFO); |
|
|
interface Put ioin; |
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 |
else |
begin |
deblockfilterchroma.ioin.put(dataIn); |
end |
end |
|
default: begin |
deblockfilterluma.ioin.put(dataIn); |
deblockfilterchroma.ioin.put(dataIn); |
end |
endcase |
endmethod |
endinterface |
endmodule |
/trunk/LumaChromaParallel/mkDeblockFilter.bsv
406,7 → 406,7
// Debugging register |
Reg#(Bit#(32)) fifo_full_count <- mkReg(0); |
Reg#(Bit#(32)) fifo_empty_count <- mkReg(0); |
Reg#(Bit#(32)) total_cycles <- mkReg(0); |
Reg#(Bit#(64)) total_cycles <- mkReg(0); |
|
|
rule incr; |
524,7 → 524,7
begin |
infifo.deq(); |
outfifo.enq(EDOT (infifo.first())); |
$display( "ccl5: EndOfFile reached"); |
$display( "ccl5: EndOfFile reached: %0d", total_cycles); |
//$finish(0); |
end |
default: |