Line 12... |
Line 12... |
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
// Rev. Date Description
|
// Rev. Date Description
|
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
// 1.01 2006/10/01 1st Release
|
// 1.01 2006/10/01 1st Release
|
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
// $Id:
|
|
//---------------------------------------------------------------------------
|
|
`timescale 1ps / 1ps
|
`timescale 1ps / 1ps
|
|
|
module jpeg_dht
|
module jpeg_dht(
|
(
|
|
rst,
|
rst,
|
clk,
|
clk,
|
|
|
DataInEnable,
|
DataInEnable,
|
DataInColor,
|
DataInColor,
|
Line 72... |
Line 69... |
DHT_Cdc[DataInCount[3:0]] <= DataIn;
|
DHT_Cdc[DataInCount[3:0]] <= DataIn;
|
end
|
end
|
if(DataInEnable ==1'b1 & DataInColor ==2'b11) begin
|
if(DataInEnable ==1'b1 & DataInColor ==2'b11) begin
|
DHT_Cac[DataInCount] <= DataIn;
|
DHT_Cac[DataInCount] <= DataIn;
|
end
|
end
|
end // always @ (posedge clk)
|
end
|
|
|
always @(posedge clk) begin
|
always @(posedge clk) begin
|
ReadDataYdc <= DHT_Ydc[TableNumber[3:0]];
|
ReadDataYdc <= DHT_Ydc[TableNumber[3:0]];
|
ReadDataYac <= DHT_Yac[TableNumber];
|
ReadDataYac <= DHT_Yac[TableNumber];
|
ReadDataCdc <= DHT_Cdc[TableNumber[3:0]];
|
ReadDataCdc <= DHT_Cdc[TableNumber[3:0]];
|
ReadDataCac <= DHT_Cac[TableNumber];
|
ReadDataCac <= DHT_Cac[TableNumber];
|
end // always @ (posedge clk or negedge rst)
|
end
|
|
|
// Selector
|
// Selector
|
/*
|
|
always @(*) begin
|
|
case (ColorNumber)
|
|
2'b00: ReadData <= ReadDataYdc;
|
|
2'b01: ReadData <= ReadDataYac;
|
|
2'b10: ReadData <= ReadDataCdc;
|
|
2'b11: ReadData <= ReadDataCac;
|
|
endcase // case(ColorNumber)
|
|
end
|
|
*/
|
|
function [7:0] ReadDataSel;
|
function [7:0] ReadDataSel;
|
input [1:0] ColorNumber;
|
input [1:0] ColorNumber;
|
input [7:0] ReadDataYdc;
|
input [7:0] ReadDataYdc;
|
input [7:0] ReadDataYac;
|
input [7:0] ReadDataYac;
|
input [7:0] ReadDataCdc;
|
input [7:0] ReadDataCdc;
|
Line 113... |
Line 100... |
assign ReadData = ReadDataSel(ColorNumber, ReadDataYdc, ReadDataYac, ReadDataCdc, ReadDataCac);
|
assign ReadData = ReadDataSel(ColorNumber, ReadDataYdc, ReadDataYac, ReadDataCdc, ReadDataCac);
|
|
|
assign ZeroTable = ReadData[7:4];
|
assign ZeroTable = ReadData[7:4];
|
assign WidhtTable = ReadData[3:0];
|
assign WidhtTable = ReadData[3:0];
|
|
|
endmodule // jpeg_dht
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|