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

Subversion Repositories bluespec-h264

[/] [bluespec-h264/] [trunk/] [src/] [mkInputGen_akiyo.bsv] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jamey.hick
//**********************************************************************
2
// Input Generator implementation
3
//----------------------------------------------------------------------
4
//
5
//
6
 
7
package mkInputGen;
8
 
9
import H264Types::*;
10
import IInputGen::*;
11
import RegFile::*;
12
import FIFO::*;
13
 
14
import Connectable::*;
15
import GetPut::*;
16
 
17
 
18
module mkInputGen( IInputGen );
19
 
20
   RegFile#(Bit#(27), Bit#(8)) rfile <- mkRegFileLoad("akiyo_qcif1-15.hex", 0, 4867);
21
 
22
   FIFO#(InputGenOT) outfifo <- mkFIFO;
23
   Reg#(Bit#(27))    index   <- mkReg(0);
24
 
25
   rule output_byte (index < 4868);
26
      //$display( "ccl0inputbyte %x", rfile.sub(index) );
27
      outfifo.enq(DataByte rfile.sub(index));
28
      index <= index+1;
29
   endrule
30
 
31
   rule end_of_file (index == 4868);
32
      //$finish(0);
33
      outfifo.enq(EndOfFile);
34
   endrule
35
 
36
   interface Get ioout = fifoToGet(outfifo);
37
 
38
endmodule
39
 
40
 
41
endpackage

powered by: WebSVN 2.1.0

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