data/full_repos/permissive/4695331/hdl_harness/light_up.v
1: b"%Error: data/full_repos/permissive/4695331/hdl_harness/light_up.v:80: Cannot find file containing module: 'led_flasher'\nled_flasher tachy_flasher\n^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/4695331/hdl_harness,data/full_repos/permissive/4695331/led_flasher\n             data/full_repos/permissive/4695331/hdl_harness,data/full_repos/permissive/4695331/led_flasher.v\n             data/full_repos/permissive/4695331/hdl_harness,data/full_repos/permissive/4695331/led_flasher.sv\n             led_flasher\n             led_flasher.v\n             led_flasher.sv\n             obj_dir/led_flasher\n             obj_dir/led_flasher.v\n             obj_dir/led_flasher.sv\n%Error: data/full_repos/permissive/4695331/hdl_harness/light_up.v:87: Cannot find file containing module: 'led_flasher'\nled_flasher brady_flasher\n^~~~~~~~~~~\n%Error: Exiting due to 2 error(s)\n"
module light_up
          (
           clk,
			  header,
			  counter,
			  tachy_pin,
			  brady_pin,
			  normal_pin
          );
			 

input clk;
input[7:0] header;
input[31:0] counter;
output tachy_pin;
output brady_pin;
output normal_pin;
			 


parameter FAST_BEAT = 32'd750;
parameter SLOW_BEAT = 32'd1800;
parameter CORRECT_HEAD1 = 8'd4;
parameter CORRECT_HEAD2 = 8'd6;



reg brady_flash;
reg tachy_flash;
reg[31:0] counter_previous;

wire[31:0] difference; 
wire correct_header;
wire too_fast;
wire too_slow;


assign correct_header = (header == CORRECT_HEAD1 || header == CORRECT_HEAD2);
assign difference = counter - counter_previous;
assign too_fast = difference <= FAST_BEAT;
assign too_slow = difference >= SLOW_BEAT;

always @(posedge clk) begin
	if (correct_header) begin
		tachy_flash <= too_fast;
		brady_flash <= too_slow;
		counter_previous <= counter;
	end
end

led_flasher tachy_flasher
          (
           .clk(clk),
			  .LED_flash(tachy_flash),
			  .LED_out(tachy_pin)
          );
			 
led_flasher brady_flasher
          (
           .clk(clk),
			  .LED_flash(brady_flash),
			  .LED_out(brady_pin)
          );
			 

assign normal_pin = !tachy_flash && !brady_flash;

endmodule
module light_up
          (
           clk,
			  header,
			  counter,
			  tachy_pin,
			  brady_pin,
			  normal_pin
          );

			 

input clk;
input[7:0] header;
input[31:0] counter;
output tachy_pin;
output brady_pin;
output normal_pin;
			 


parameter FAST_BEAT = 32'd750;
parameter SLOW_BEAT = 32'd1800;
parameter CORRECT_HEAD1 = 8'd4;
parameter CORRECT_HEAD2 = 8'd6;



reg brady_flash;
reg tachy_flash;
reg[31:0] counter_previous;

wire[31:0] difference; 
wire correct_header;
wire too_fast;
wire too_slow;


assign correct_header = (header == CORRECT_HEAD1 || header == CORRECT_HEAD2);
assign difference = counter - counter_previous;
assign too_fast = difference <= FAST_BEAT;
assign too_slow = difference >= SLOW_BEAT;

always @(posedge clk) begin
	if (correct_header) begin
		tachy_flash <= too_fast;
		brady_flash <= too_slow;
		counter_previous <= counter;
	end
end

led_flasher tachy_flasher
          (
           .clk(clk),
			  .LED_flash(tachy_flash),
			  .LED_out(tachy_pin)
          );
			 
led_flasher brady_flasher
          (
           .clk(clk),
			  .LED_flash(brady_flash),
			  .LED_out(brady_pin)
          );
			 

assign normal_pin = !tachy_flash && !brady_flash;

endmodule