`timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: // // Create Date: 15:03:52 03/11/2019 // Design Name: // Module Name: pic_in // Project Name: // Target Devices: // Tool versions: // Description: // // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // ////////////////////////////////////////////////////////////////////////////////// module pic_in #( parameter bits = 16 , //quantization bit number parameter bits_shift = 4 , //we can shift but not multy parameter channel_num = 1 , //number of the channel of the picture parameter channel_height_num = 4 , parameter channel_length_num = 4 , parameter channel_paralell_num = 16 , //channel_height_num*channel_length_num parameter channel_all_num = 16 , //channel_paralell_num*channel_num parameter bits_channel = 256 , //bit number of all data, //which is bits*channel_all_num parameter length = 100 , //length of input picture parameter length_2 = 7 , //bit number of length parameter height = 252 , //height of input picture parameter height_2 = 10 , //bit number of height parameter filter_size = 5 , //size of filter is n*n,default 5*5 parameter filter_size_2 = 3 , //the bits of the filter size parameter stride_height = 4 , //stride of conv in the first conv_layer parameter stride_height_2 = 3 , //bit of stride parameter stride_length = 4 , //stride of conv in the first conv_layer parameter stride_length_2 = 3 , //bit of stride parameter zero_pad = 0 , //padding parameter first_height = 157 , //convolution number first time in height parameter first_length = 1 , //convolution number first time in length parameter weight_num = 25 , parameter weight_num_2 = 5 , parameter conv_num = 4 , parameter state_reset = 0 , //state to reset parameter state_output = 1 //state to output data ) ( input clk_in, input rst_n, input start, //start to output output reg [bits_channel-1:0] map, //picture data output reg ready, output reg [(conv_num<