data/full_repos/permissive/160408009/components/COREDDR_TIP/1.6.106/rtl/vlog/core/flag_generator.v
 line:69: before: "."
data/verilator_xmls/7c69de1f-dd89-4d7d-b88a-1a76945435a9.xml
module flag_generator (clock,data,clear_flags,flag);
parameter data_width=2;
input clock;
input [data_width-1:0] data;
input clear_flags;
output flag;


wire data_transition_flag;
wire noise_detect_flag;

defparam noise_detect.data_width=data_width;
defparam transition_detect.data_width=data_width;
noisy_data_detector noise_detect (.clock(clock),.data(data),.clear_flags(clear_flags),.noise_detect_flag(noise_detect_flag));
data_transition_detector transition_detect (.clock(clock), .data(data),.sample(clear_flags),.data_transition_flag(data_transition_flag));

assign flag=data_transition_flag|noise_detect_flag;

endmodule
module flag_generator (clock,data,clear_flags,flag);

parameter data_width=2;
input clock;
input [data_width-1:0] data;
input clear_flags;
output flag;


wire data_transition_flag;
wire noise_detect_flag;

defparam noise_detect.data_width=data_width;
defparam transition_detect.data_width=data_width;
noisy_data_detector noise_detect (.clock(clock),.data(data),.clear_flags(clear_flags),.noise_detect_flag(noise_detect_flag));
data_transition_detector transition_detect (.clock(clock), .data(data),.sample(clear_flags),.data_transition_flag(data_transition_flag));

assign flag=data_transition_flag|noise_detect_flag;

endmodule