finish isp testbench but still have some errors waiting to be deat with
This commit is contained in:
12
Crop/crop.v
12
Crop/crop.v
@@ -1,6 +1,4 @@
|
||||
module crop #(
|
||||
parameter IN_WIDTH = 1936 - 2,
|
||||
parameter IN_HEIGHT = 1088 - 2,
|
||||
parameter OFFSET_X = 8,
|
||||
parameter OFFSET_Y = 4,
|
||||
parameter OUT_WIDTH = 640,
|
||||
@@ -11,10 +9,10 @@ module crop #(
|
||||
input reset,
|
||||
|
||||
input in_en,
|
||||
output in_que,
|
||||
output reg in_que,
|
||||
input [3 * COLOR_DEPTH - 1:0] data_in,
|
||||
|
||||
output out_en,
|
||||
output reg out_en,
|
||||
output reg [3 * COLOR_DEPTH - 1:0] data_out
|
||||
);
|
||||
localparam READ_DATA = 0;
|
||||
@@ -36,9 +34,9 @@ module crop #(
|
||||
// 下一状态更新
|
||||
always @(*) begin
|
||||
case (state)
|
||||
READ_DATA: nextState <= (in_que && in_en) ? HANDLE_DATA : READ_DATA;
|
||||
HANDLE_DATA: nextState <= SEND_DATA;
|
||||
SEND_DATA: nextState <= READ_DATA;
|
||||
READ_DATA: nextState = (in_que && in_en) ? HANDLE_DATA : READ_DATA;
|
||||
HANDLE_DATA: nextState = SEND_DATA;
|
||||
SEND_DATA: nextState = READ_DATA;
|
||||
endcase
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user