Line 1... |
Line 1... |
|
//////////////////////////////////////////////////////////////////////
|
|
//// ////
|
|
//// cavlc_top ////
|
|
//// ////
|
|
//// Description ////
|
|
//// top module of cavlc decoder ////
|
|
//// ////
|
|
//// Author(s): ////
|
|
//// - bin qiu, qiubin@opencores.org ////
|
|
//// ////
|
|
//////////////////////////////////////////////////////////////////////
|
|
//// ////
|
|
//// Copyright (C) 2011 Authors and OPENCORES.ORG ////
|
|
//// ////
|
|
//// This source file may be used and distributed without ////
|
|
//// restriction provided that this copyright statement is not ////
|
|
//// removed from the file and that any derivative work contains ////
|
|
//// the original copyright notice and the associated disclaimer. ////
|
|
//// ////
|
|
//// This source file is free software; you can redistribute it ////
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
|
//// Public License as published by the Free Software Foundation; ////
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
|
//// later version. ////
|
|
//// ////
|
|
//// This source is distributed in the hope that it will be ////
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
|
//// details. ////
|
|
//// ////
|
|
//// You should have received a copy of the GNU Lesser General ////
|
|
//// Public License along with this source; if not, download it ////
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
|
//// ////
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
//2011-8-7 initial version
|
//2011-8-7 initial version
|
|
|
`include "defines.v"
|
`include "defines.v"
|
|
|
module cavlc_top(
|
module cavlc_top
|
|
(
|
clk,
|
clk,
|
rst_n,
|
rst_n,
|
ena,
|
ena,
|
start,
|
start,
|
rbsp,
|
rbsp,
|
Line 37... |
Line 75... |
//------------------------
|
//------------------------
|
input clk, rst_n;
|
input clk, rst_n;
|
input ena;
|
input ena;
|
input start;
|
input start;
|
input [0:15] rbsp;
|
input [0:15] rbsp;
|
input [4:0] nC;
|
input signed [5:0] nC;
|
input [4:0] max_coeff_num;
|
input [4:0] max_coeff_num;
|
|
|
output [8:0] coeff_0;
|
output signed [8:0] coeff_0;
|
output [8:0] coeff_1;
|
output signed [8:0] coeff_1;
|
output [8:0] coeff_2;
|
output signed [8:0] coeff_2;
|
output [8:0] coeff_3;
|
output signed [8:0] coeff_3;
|
output [8:0] coeff_4;
|
output signed [8:0] coeff_4;
|
output [8:0] coeff_5;
|
output signed [8:0] coeff_5;
|
output [8:0] coeff_6;
|
output signed [8:0] coeff_6;
|
output [8:0] coeff_7;
|
output signed [8:0] coeff_7;
|
output [8:0] coeff_8;
|
output signed [8:0] coeff_8;
|
output [8:0] coeff_9;
|
output signed [8:0] coeff_9;
|
output [8:0] coeff_10;
|
output signed [8:0] coeff_10;
|
output [8:0] coeff_11;
|
output signed [8:0] coeff_11;
|
output [8:0] coeff_12;
|
output signed [8:0] coeff_12;
|
output [8:0] coeff_13;
|
output signed [8:0] coeff_13;
|
output [8:0] coeff_14;
|
output signed [8:0] coeff_14;
|
output [8:0] coeff_15;
|
output signed [8:0] coeff_15;
|
output [4:0] TotalCoeff;
|
output [4:0] TotalCoeff;
|
output [4:0] len_comb;
|
output [4:0] len_comb;
|
output idle;
|
output idle;
|
output valid;
|
output valid;
|
|
|
Line 154... |
Line 192... |
wire [3:0] len_read_total_zeros_comb;
|
wire [3:0] len_read_total_zeros_comb;
|
|
|
cavlc_read_total_zeros cavlc_read_total_zeros(
|
cavlc_read_total_zeros cavlc_read_total_zeros(
|
.ena(ena),
|
.ena(ena),
|
.sel(cavlc_state[`cavlc_read_total_zeros_bit]),
|
.sel(cavlc_state[`cavlc_read_total_zeros_bit]),
|
.chroma_DC_sel(nC[4]),
|
.chroma_DC_sel(nC[5]),
|
.rbsp(rbsp[0:8]),
|
.rbsp(rbsp[0:8]),
|
.TotalCoeff(TotalCoeff[3:0]),
|
.TotalCoeff(TotalCoeff[3:0]),
|
.TotalZeros_comb(TotalZeros_comb),
|
.TotalZeros_comb(TotalZeros_comb),
|
.len_comb(len_read_total_zeros_comb)
|
.len_comb(len_read_total_zeros_comb)
|
);
|
);
|