OpenCores
URL https://opencores.org/ocsvn/bluespec-h264/bluespec-h264/trunk

Subversion Repositories bluespec-h264

[/] [bluespec-h264/] [trunk/] [src/] [mkInputGen.bsv] - Diff between revs 2 and 6

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 6
Line 12... Line 12...
import FIFO::*;
import FIFO::*;
 
 
import Connectable::*;
import Connectable::*;
import GetPut::*;
import GetPut::*;
 
 
 
`define INPUT_SIZE 1480433
 
 
module mkInputGen( IInputGen );
module mkInputGen( IInputGen );
 
 
   RegFile#(Bit#(27), Bit#(8)) rfile <- mkRegFileLoad("720p50_parkrun_ter1-20inter.hex", 0, 2282510);
   RegFile#(Bit#(27), Bit#(8)) rfile <- mkRegFileLoad("akiyo224x176_1-300.hex", 0, `INPUT_SIZE);
 
 
   FIFO#(InputGenOT) outfifo <- mkFIFO;
   FIFO#(InputGenOT) outfifo <- mkFIFO;
   Reg#(Bit#(27))    index   <- mkReg(0);
   Reg#(Bit#(27))    index   <- mkReg(0);
 
 
   rule output_byte (index < 2282511);
   rule output_byte (index < `INPUT_SIZE);
      //$display( "ccl0inputbyte %x", rfile.sub(index) );
      //$display( "ccl0inputbyte %x", rfile.sub(index) );
      outfifo.enq(DataByte rfile.sub(index));
      outfifo.enq(DataByte rfile.sub(index));
      index <= index+1;
      index <= index+1;
   endrule
   endrule
 
 
   rule end_of_file (index == 2282511);
   rule end_of_file (index == `INPUT_SIZE);
      //$finish(0);
      //$finish(0);
      outfifo.enq(EndOfFile);
      outfifo.enq(EndOfFile);
   endrule
   endrule
 
 
   interface Get ioout = fifoToGet(outfifo);
   interface Get ioout = fifoToGet(outfifo);

powered by: WebSVN 2.1.0

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