OpenCores
URL https://opencores.org/ocsvn/djpeg/djpeg/trunk

Subversion Repositories djpeg

[/] [djpeg/] [trunk/] [src/] [jpeg_dqt.v] - Blame information for rev 6

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

Line No. Rev Author Line
1 3 hidemi
//---------------------------------------------------------------------------
2
// File Name   : jpeg_dqt.v
3
// Module Name : jpeg_dqt
4
// Description : DQT spcae
5
// Project     : JPEG Decoder
6
// Belong to   : 
7
// Author      : H.Ishihara
8
// E-Mail      : hidemi@sweetcafe.jp
9
// HomePage    : http://www.sweetcafe.jp/
10
// Date        : 2006/10/01
11
// Rev.        : 1.1
12
//---------------------------------------------------------------------------
13
// Rev. Date       Description
14
//---------------------------------------------------------------------------
15
// 1.01 2006/10/01 1st Release
16
//---------------------------------------------------------------------------
17
// $Id: 
18
//---------------------------------------------------------------------------
19
`timescale 1ps / 1ps
20
 
21
module jpeg_dqt
22
  (
23
   rst,
24
   clk,
25
 
26
   DataInEnable,
27
   DataInColor,
28
   DataInCount,
29
   DataIn,
30
 
31
   TableColor,
32
   TableNumber,
33
   TableData
34
 );
35
 
36
   input        rst;
37
   input        clk;
38
 
39
   input        DataInEnable;
40
   input        DataInColor;
41
   input [5:0]   DataInCount;
42
   input [7:0]   DataIn;
43
 
44
   input        TableColor;
45
   input  [5:0] TableNumber;
46
   output [7:0] TableData;
47
 
48
   // RAM
49
   reg [7:0]    DQT_Y [0:63];
50
   reg [7:0]    DQT_C [0:63];
51
 
52
   // RAM
53
   always @(posedge clk)
54
     begin
55
        if(DataInEnable ==1'b1 && DataInColor ==1'b0) begin
56
           DQT_Y[DataInCount] <= DataIn;
57
        end
58
        if(DataInEnable ==1'b1 && DataInColor ==1'b1) begin
59
           DQT_C[DataInCount] <= DataIn;
60
        end
61
     end
62
 
63
   reg [7:0] TableDataY;
64
   reg [7:0] TableDataC;
65
 
66
   // RAM out
67
   always @(posedge clk) begin
68
      TableDataY <= DQT_Y[TableNumber];
69
      TableDataC <= DQT_C[TableNumber];
70
   end
71
 
72
   // Selector
73
   assign TableData = (TableColor)?TableDataC:TableDataY;
74
 
75
endmodule // jpeg_dqt
76
 

powered by: WebSVN 2.1.0

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