data/full_repos/permissive/132439949/sources_1/new/note_gen.v
[Errno 2] No such file or directory: 'preprocess.output'
data/verilator_xmls/79a92af0-f287-45e5-8a0f-0bea5f610766.xml
module note_gen(
    input CLOCK,
    input[25:0] CLOCK_COUNTER,
    output reg [11:0] NOTE
    );
        
    initial begin
       NOTE = 12'b0;
    end
        
    reg [25:0] COUNT = 26'b0;
    

    always @(posedge CLOCK) begin
        if (CLOCK_COUNTER > 0) begin
            COUNT <= (COUNT == (CLOCK_COUNTER) ) ? 0 : COUNT + 1;
            NOTE  <= (COUNT == 0) ? ~NOTE : NOTE;
        end
    end
    
    
endmodule
module note_gen(
    input CLOCK,
    input[25:0] CLOCK_COUNTER,
    output reg [11:0] NOTE
    );

        
    initial begin
       NOTE = 12'b0;
    end
        
    reg [25:0] COUNT = 26'b0;
    

    always @(posedge CLOCK) begin
        if (CLOCK_COUNTER > 0) begin
            COUNT <= (COUNT == (CLOCK_COUNTER) ) ? 0 : COUNT + 1;
            NOTE  <= (COUNT == 0) ? ~NOTE : NOTE;
        end
    end
    
    
endmodule