module CicIntDiffBlock #(
    parameter M = 4, // Differential delay
    parameter InDataWidth = 14,
    parameter OutDataWidth = 17
)
(
    input logic                                 Clk_i,
    input logic                                 Rst_i,
    input logic     signed [InDataWidth-1:0]    Data_i,
    input logic                                 DataVal_i,

    output logic    signed [OutDataWidth-1:0]   Data_o,
    output logic                                DataVal_o

);
//================================================================================
//								REG/WIRE
//================================================================================
/* Integrator Block */
logic signed                  [OutDataWidth-1:0]    integratedDataOut;
logic                                               integratedValOut;

/* Comb Filter Block */
logic signed                  [OutDataWidth-1:0]    combDataOut;
logic                                               combDataValOut;

//================================================================================
//								ASSIGNMENTS
//================================================================================
assign Data_o      = combDataOut;
assign DataVal_o   = combDataValOut;

//================================================================================
//								CODING
//================================================================================
/* Integrator */
CicIntegrator #(
    .InDataWidth    (InDataWidth),
    .OutDataWidth   (OutDataWidth)
) integrator_inst (
    .Clk_i          (Clk_i),
    .Rst_i          (Rst_i),
    .DataVal_i      (DataVal_i),
    .Data_i         (Data_i),
    .DataVal_o      (integratedValOut),
    .Data_o         (integratedDataOut)
);

/* Comb Filter */
CicCombFilter #(
    .InOutDataWidth (OutDataWidth),
    .M              (M)
) comb_filter_inst (
    .Clk_i          (Clk_i),
    .Rst_i          (Rst_i),
    .DataVal_i      (integratedValOut),
    .Data_i         (integratedDataOut),
    .DataVal_o      (combDataValOut),
    .Data_o         (combDataOut)
);


endmodule