OpenCores
URL https://opencores.org/ocsvn/lpffir/lpffir/trunk

Subversion Repositories lpffir

[/] [lpffir/] [trunk/] [rtl/] [lpffir_core.sv] - Diff between revs 2 and 7

Show entire file | Details | Blame | View Log

Rev 2 Rev 7
Line 41... Line 41...
//// from http://www.opencores.org/lgpl.shtml                     ////
//// from http://www.opencores.org/lgpl.shtml                     ////
////                                                              ////
////                                                              ////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
 
 
module lpffir_core (
module lpffir_core (
            input [15:0]        x_i,
 
            input               clk_i,
            input               clk_i,
 
                    input               rstn_i,
 
                    input               en_i,
 
                    input [15:0]        x_i,
            output logic [15:0] y_o
            output logic [15:0] y_o
            );
            );
 
 
   reg [15:0]                   x1;
   reg [15:0]                   x1;
   reg [15:0]                   x2;
   reg [15:0]                   x2;
Line 70... Line 72...
   rca rca_inst1 (.a(x1),.b(x4),.ci(0),.co(co1),.s(h1));
   rca rca_inst1 (.a(x1),.b(x4),.ci(0),.co(co1),.s(h1));
   rca rca_inst2 (.a(x2),.b(x3),.ci(0),.co(co2),.s(h2));
   rca rca_inst2 (.a(x2),.b(x3),.ci(0),.co(co2),.s(h2));
   rca rca_inst3 (.a(h0),.b(h1),.ci(0),.co(co3),.s(h01));
   rca rca_inst3 (.a(h0),.b(h1),.ci(0),.co(co3),.s(h01));
   rca rca_inst4 (.a(h01),.b(h2),.ci(0),.co(co4),.s(y_o));
   rca rca_inst4 (.a(h01),.b(h2),.ci(0),.co(co4),.s(y_o));
 
 
   always_ff @(posedge clk_i)
   always_ff @(posedge clk_i or posedge rstn_i)
 
     if(!rstn_i)
 
       begin
 
          x1 <= 0;
 
          x2 <= 0;
 
          x3 <= 0;
 
          x4 <= 0;
 
          x5 <= 0;
 
       end
 
     else if (en_i)
     begin
     begin
        x1 <= x_i;
        x1 <= x_i;
        x2 <= x1;
        x2 <= x1;
        x3 <= x2;
        x3 <= x2;
        x4 <= x3;
        x4 <= x3;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.