data/full_repos/permissive/514217463/core/rtl/clk_divn.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/514217463/core/rtl/clk_divn.v:37: Multiple top level modules\n                                                                              : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                              : ... Top module \'clk_divn_even\'\nmodule clk_divn_even (\n       ^~~~~~~~~~~~~\n                                                                              : ... Top module \'clk_divn_odd\'\nmodule clk_divn_odd (\n       ^~~~~~~~~~~~\n                                                                              : ... Top module \'clk_div\'\nmodule clk_div (\n       ^~~~~~~\n%Error: Exiting due to 1 warning(s)\n'
module clk_divn_odd (
  input clk,
  input reset, 
  output clk_out
);

  parameter WIDTH = 3;
  parameter N = 5;

  reg [WIDTH-1:0] pos_count, neg_count;
  wire [WIDTH-1:0] r_nxt;

  always @(posedge clk)
    if (reset)
      pos_count <=0;
    else if (pos_count == N - 1) 
      pos_count <= 0;
    else 
      pos_count<= pos_count + 1;

  always @(negedge clk)
    if (reset)
      neg_count <=0;
    else  if (neg_count == N - 1) 
      neg_count <= 0;
    else 
      neg_count<= neg_count + 1; 

  assign clk_out = ((pos_count > (N>>1)) | (neg_count > (N>>1))); 
endmodule
module clk_divn_odd (
  input clk,
  input reset, 
  output clk_out
);


  parameter WIDTH = 3;
  parameter N = 5;

  reg [WIDTH-1:0] pos_count, neg_count;
  wire [WIDTH-1:0] r_nxt;

  always @(posedge clk)
    if (reset)
      pos_count <=0;
    else if (pos_count == N - 1) 
      pos_count <= 0;
    else 
      pos_count<= pos_count + 1;

  always @(negedge clk)
    if (reset)
      neg_count <=0;
    else  if (neg_count == N - 1) 
      neg_count <= 0;
    else 
      neg_count<= neg_count + 1; 

  assign clk_out = ((pos_count > (N>>1)) | (neg_count > (N>>1))); 
endmodule