Verilog Filter design reset and enable Problem

Status
Not open for further replies.

Milruwan

Member level 1
Joined
Jan 20, 2013
Messages
35
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,546
I design a filter using Matlab hdl coder. But the problem is filter doesn't give filtered output. When I do the simulation in matlab filter works perfectly, but when I test with modelsim filter is not giving the filtered output. Problem is with the way of resetting and enabling the filter.

filter inputs and outputs

Code:
module filter
               (
                clk,
                clk_enable,
                reset,
                filter_in,
                filter_out
                );

input_reg_process
Code:
always @ (posedge clk or posedge reset)
    begin: input_reg_process
      if (reset == 1'b1) begin
        input_register <= 0;
      end
      else begin
        if (clk_enable == 1'b1) begin
          input_register <= filter_in;
        end
      end
    end // input_reg_process

Here is the output I got (reset and enable signal are also shown in the figure)


reset_my : is the reset
ce_my: is the enable
 

can you post the whole code with testbench ? Because its hard to tell from that scratch anythink. I dont see in wave input_register, and what is zc_out ?
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…