40 lines
1.1 KiB
Verilog
40 lines
1.1 KiB
Verilog
`timescale 1ns/1ps
|
||
|
||
module isp #(
|
||
parameter IN_WIDTH = 1936,
|
||
parameter IN_HEIGHT = 1088,
|
||
parameter OUT_WIDTH = 1936 - 2,
|
||
parameter OUT_HEIGHT = 1088 - 2,
|
||
parameter RAW_TYPE = 3 // 0:grbg 1:rggb 2:bggr 3:gbrg
|
||
) (
|
||
// 基本信号
|
||
input clk,
|
||
input reset,
|
||
|
||
// 数据输入信号
|
||
input data_en,
|
||
input [15:0] data_in [2:0], // 数据输入线,0、1、2分别表示第一、二、三行
|
||
output reg data_que, // 数据请求线,高电平:请求三个数据,直到读取完才拉低
|
||
output reg data_line, // 新一行请求数据线,高电平:请求九个数据,直到读取完才拉低
|
||
|
||
// en: 输出数据有效信号,高电平有效
|
||
output reg out_en,
|
||
output reg [15:0] out_r,
|
||
output reg [15:0] out_g,
|
||
output reg [15:0] out_b
|
||
);
|
||
|
||
demosaic2 #(IN_WIDTH, IN_HEIGHT, RAW_TYPE) CFA (
|
||
.clk(clk),
|
||
.reset(reset),
|
||
.data_en(data_en),
|
||
.data_in(data_in),
|
||
.data_que(data_que),
|
||
.data_line(data_line),
|
||
.out_en(out_en),
|
||
.out_r(out_r),
|
||
.out_g(out_g),
|
||
.out_b(out_b)
|
||
);
|
||
|
||
endmodule |