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

Subversion Repositories bluespec-h264

[/] [bluespec-h264/] [trunk/] [src_fpga/] [mkH264.bsv] - Blame information for rev 3

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

Line No. Rev Author Line
1 3 jamey.hick
//**********************************************************************
2
// H264 Main Module
3
//----------------------------------------------------------------------
4
//
5
//
6
 
7
package mkH264;
8
 
9
import H264Types::*;
10
import IH264::*;
11
import INalUnwrap::*;
12
import IEntropyDec::*;
13
import IInverseTrans::*;
14
import IPrediction::*;
15
import IDeblockFilter::*;
16
import IBufferControl::*;
17
import mkNalUnwrap::*;
18
import mkEntropyDec::*;
19
import mkInverseTrans::*;
20
import mkPrediction::*;
21
import mkDeblockFilter::*;
22
import mkBufferControl::*;
23
import mkVgaController::*;
24
import BRAM::*;
25
import mkRoundRobinMemScheduler::*;
26
import mkSRAMMemController::*;
27
import IMemClient::*;
28
import IMemController::*;
29
import IMemScheduler::*;
30
import ISRAMWires::*;
31
import IVgaController::*;
32
import Connectable::*;
33
import GetPut::*;
34
import ClientServer::*;
35
 
36
(* synthesize *)
37
module mkH264( IH264 );
38
 
39
   // Instantiate the modules
40
 
41
   INalUnwrap     nalunwrap     <- mkNalUnwrap();
42
   IEntropyDec    entropydec    <- mkEntropyDec();
43
   IInverseTrans  inversetrans  <- mkInverseTrans();
44
   IPrediction    prediction    <- mkPrediction();
45
   IDeblockFilter deblockfilter <- mkDeblockFilter();
46
 
47
   IMemScheduler#(4, Bit#(18)) sched <- mkRoundRobinMemScheduler();
48
   ISRAMMemController#(4, Bit#(18), Bit#(32)) mem_cntlr <- mkSRAMMemController(sched);
49
 
50
 
51
   IVgaController vgacontroller <- mkVgaController(mem_cntlr.client_interfaces[0],
52
                                                   mem_cntlr.client_interfaces[1],
53
                                                   mem_cntlr.client_interfaces[2]);
54
   IBufferControl buffercontrol <- mkBufferControl(vgacontroller,
55
                                                   mem_cntlr.client_interfaces[0],
56
                                                   mem_cntlr.client_interfaces[1],
57
                                                   mem_cntlr.client_interfaces[2]);
58
 
59
 
60
   // Internal connections
61
   mkConnection( prediction.mem_client_buffer, buffercontrol.inter_server );
62
 
63
   mkConnection( nalunwrap.ioout, entropydec.ioin );
64
   mkConnection( entropydec.ioout_InverseTrans, inversetrans.ioin );
65
   mkConnection( entropydec.ioout, prediction.ioin );
66
   mkConnection( inversetrans.ioout, prediction.ioin_InverseTrans );
67
   mkConnection( prediction.ioout, deblockfilter.ioin );
68
   mkConnection( deblockfilter.ioout, buffercontrol.ioin );
69
 
70
   // Interface to input generator
71
   interface ioin = nalunwrap.ioin;
72
 
73
   // Memory interfaces
74
   interface mem_clientED          = entropydec.mem_client;
75
   interface mem_clientP_intra     = prediction.mem_client_intra;
76
   interface mem_clientP_inter     = prediction.mem_client_inter;
77
   interface mem_clientD_data      = deblockfilter.mem_client_data;
78
   interface mem_clientD_parameter = deblockfilter.mem_client_parameter;
79
   interface buffer_client_load    = buffercontrol.buffer_client_load;
80
   interface buffer_client_store   = buffercontrol.buffer_client_store;
81
 
82
   // Interface for output
83
 
84
    interface IVgaController vga_controller;
85
    method Bit#(8) red();
86
      return vgacontroller.red();
87
    endmethod
88
 
89
    method Bit#(8) blue();
90
      return vgacontroller.blue();
91
    endmethod
92
 
93
    method Bit#(8) green();
94
      return vgacontroller.green();
95
    endmethod
96
 
97
    method Bit#(1) sync_on_green();
98
      return vgacontroller.sync_on_green();
99
    endmethod
100
 
101
    method Bit#(1) hsync();
102
      return vgacontroller.hsync();
103
    endmethod
104
 
105
    method Bit#(1) vsync();
106
      return vgacontroller.vsync();
107
    endmethod
108
 
109
    method Bit#(1) blank();
110
      return vgacontroller.blank();
111
    endmethod
112
 
113
    method Action  switch_buffer(Bit#(1) buffer);
114
      noAction;
115
    endmethod
116
 
117
  endinterface
118
 
119
  interface ISRAMWires  sram_controller = mem_cntlr.wires;
120
 
121
endmodule
122
 
123
endpackage

powered by: WebSVN 2.1.0

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