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

Subversion Repositories bluespec-h264

[/] [bluespec-h264/] [trunk/] [LumaChromaParallel/] [mkTH.bsv] - Blame information for rev 87

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

Line No. Rev Author Line
1 86 jamey.hick
// The MIT License
2
 
3
// Copyright (c) 2006-2007 Massachusetts Institute of Technology
4
 
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of this software and associated documentation files (the "Software"), to deal
7
// in the Software without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of the Software, and to permit persons to whom the Software is
10
// furnished to do so, subject to the following conditions:
11
 
12
// The above copyright notice and this permission notice shall be included in
13
// all copies or substantial portions of the Software.
14
 
15
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
// THE SOFTWARE.
22
//**********************************************************************
23
// H264 Test Bench
24
//----------------------------------------------------------------------
25
//
26
//
27
 
28
package mkTH;
29
 
30
import H264Types::*;
31
import IMemED::*;
32
import IFrameBuffer::*;
33
import IInputGen::*;
34
import IFinalOutput::*;
35
import IH264::*;
36
import mkMemED::*;
37
import mkFrameBuffer::*;
38
import mkInputGen::*;
39
import mkFinalOutput::*;
40
import mkH264::*;
41
 
42
import Connectable::*;
43
import GetPut::*;
44
import ClientServer::*;
45
 
46
(* synthesize *)
47
module mkTH( Empty );
48
 
49
   // Instantiate the modules
50
 
51
   IInputGen     inputgen    <- mkInputGen();
52
   IH264         h264        <- mkH264();
53
   IMemED#(TAdd#(PicWidthSz,1),20) memED          <- mkMemED();
54
   IMemED#(TAdd#(PicWidthSz,2),68) memP_intra     <- mkMemED();
55
   IMemED#(TAdd#(PicWidthSz,2),32) memP_inter     <- mkMemED();
56
   IMemED#(TAdd#(PicWidthSz,5),32) memD_data      <- mkMemED();
57
   IMemED#(PicWidthSz,13)          memD_parameter <- mkMemED();
58
   IFrameBuffer   framebuffer   <- mkFrameBuffer();
59
   IFinalOutput   finaloutput   <- mkFinalOutput();
60
 
61
   // Cycle counter
62
   Reg#(Bit#(32)) cyclecount <- mkReg(0);
63
 
64
   rule countCycles ( True );
65
      if(cyclecount[4:0]==0) $display( "CCLCycleCount %0d", cyclecount );
66
      cyclecount <= cyclecount+1;
67
      if(cyclecount > 600000000)
68
         begin
69
            $display( "ERROR mkTH: time out" );
70
         end
71
   endrule
72
 
73
   // Internal connections
74
 
75
   mkConnection( inputgen.ioout, h264.ioin );
76
   mkConnection( h264.mem_clientED, memED.mem_server );
77
   mkConnection( h264.mem_clientP_intra, memP_intra.mem_server );
78
   mkConnection( h264.mem_clientP_inter, memP_inter.mem_server );
79
   mkConnection( h264.mem_clientD_data, memD_data.mem_server );
80
   mkConnection( h264.mem_clientD_parameter, memD_parameter.mem_server );
81
   mkConnection( h264.buffer_client_load1, framebuffer.server_load1 );
82
   mkConnection( h264.buffer_client_load2, framebuffer.server_load2 );
83
   mkConnection( h264.buffer_client_store, framebuffer.server_store );
84
   mkConnection( h264.ioout, finaloutput.ioin );
85
 
86
endmodule
87
 
88
endpackage

powered by: WebSVN 2.1.0

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