data/full_repos/permissive/446623173/FourDigitLEDdriver.v
1: b"%Error: data/full_repos/permissive/446623173/FourDigitLEDdriver.v:29: Cannot find file containing module: 'DCM'\n DCM #(\n ^~~\n        ... Looked in:\n             data/full_repos/permissive/446623173,data/full_repos/permissive/446623173/DCM\n             data/full_repos/permissive/446623173,data/full_repos/permissive/446623173/DCM.v\n             data/full_repos/permissive/446623173,data/full_repos/permissive/446623173/DCM.sv\n             DCM\n             DCM.v\n             DCM.sv\n             obj_dir/DCM\n             obj_dir/DCM.v\n             obj_dir/DCM.sv\n%Error: data/full_repos/permissive/446623173/FourDigitLEDdriver.v:136: Cannot find file containing module: 'LEDdecoder'\nLEDdecoder LEDdecoderINSTANCE(hex_in,led_seg);\n^~~~~~~~~~\n%Error: Exiting due to 2 error(s)\n"
module FourDigitLEDdriver(reset, clk, hex3, hex2, hex1, hex0, an3, an2, an1, an0, led_seg, dp);
input wire clk, reset;
input wire [3:0] hex3, hex2, hex1, hex0;
output reg an3, an2, an1, an0;
output [6:0] led_seg;
output reg dp;


 DCM #(
      .SIM_MODE("SAFE"),
      .CLKDV_DIVIDE(16.0),

      .CLKFX_DIVIDE(1),
      .CLKFX_MULTIPLY(4),
      .CLKIN_DIVIDE_BY_2("FALSE"),
      .CLKIN_PERIOD(0.0),
      .CLKOUT_PHASE_SHIFT("NONE"),
      .CLK_FEEDBACK("1X"),
      .DESKEW_ADJUST("SYSTEM_SYNCHRONOUS"),

      .DFS_FREQUENCY_MODE("LOW"),
      .DLL_FREQUENCY_MODE("LOW"),
      .DUTY_CYCLE_CORRECTION("TRUE"),
      .FACTORY_JF(16'hC080),
      .PHASE_SHIFT(0),
      .STARTUP_WAIT("FALSE")
   ) DCM_inst (
      .CLK0(CLK0),





      .CLKDV(CLKDV),


      .LOCKED(LOCKED),


      .CLKFB(CLK0),
      .CLKIN(clk),



      .RST(reset)
   );


localparam N=4;


reg[N-1:0] q;
reg[3:0] hex_in;
wire [N-1:0] q_next;


always@(posedge clk , posedge reset)
if(reset)
	q<= 4'b1111; 
else
	q <= q_next;

assign q_next=q+1;




always@*
	case(q)
		4'b1110:
			begin
				an0 <= 1;
				an1 <= 1;
				an2 <= 1;
				an3 <= 0;
				hex_in <= hex3;
				dp <= 1;
			end
		4'b1010:
			begin
				an0 <= 1;
				an1 <= 1;
				an2 <= 0;
				an3 <= 1;
				hex_in <= hex2;
				dp <= 1;
			end		
		4'b0110:
			begin
				an0 <= 1;
				an1 <= 0;
				an2 <= 1;
				an3 <= 1;
				hex_in <= hex1;
				dp <= 1;
			end
		4'b0010:
			begin
				an0 <= 0;
				an1 <= 1;
				an2 <= 1;
				an3 <= 1;
				hex_in <= hex0;
				dp <= 1;
			end
		default:
			begin
				an0 <= 1;
				an1 <= 1;
				an2 <= 1;
				an3 <= 1;
			end
	endcase


LEDdecoder LEDdecoderINSTANCE(hex_in,led_seg);

endmodule
module FourDigitLEDdriver(reset, clk, hex3, hex2, hex1, hex0, an3, an2, an1, an0, led_seg, dp);

input wire clk, reset;
input wire [3:0] hex3, hex2, hex1, hex0;
output reg an3, an2, an1, an0;
output [6:0] led_seg;
output reg dp;


 DCM #(
      .SIM_MODE("SAFE"),
      .CLKDV_DIVIDE(16.0),

      .CLKFX_DIVIDE(1),
      .CLKFX_MULTIPLY(4),
      .CLKIN_DIVIDE_BY_2("FALSE"),
      .CLKIN_PERIOD(0.0),
      .CLKOUT_PHASE_SHIFT("NONE"),
      .CLK_FEEDBACK("1X"),
      .DESKEW_ADJUST("SYSTEM_SYNCHRONOUS"),

      .DFS_FREQUENCY_MODE("LOW"),
      .DLL_FREQUENCY_MODE("LOW"),
      .DUTY_CYCLE_CORRECTION("TRUE"),
      .FACTORY_JF(16'hC080),
      .PHASE_SHIFT(0),
      .STARTUP_WAIT("FALSE")
   ) DCM_inst (
      .CLK0(CLK0),





      .CLKDV(CLKDV),


      .LOCKED(LOCKED),


      .CLKFB(CLK0),
      .CLKIN(clk),



      .RST(reset)
   );


localparam N=4;


reg[N-1:0] q;
reg[3:0] hex_in;
wire [N-1:0] q_next;


always@(posedge clk , posedge reset)
if(reset)
	q<= 4'b1111; 
else
	q <= q_next;

assign q_next=q+1;




always@*
	case(q)
		4'b1110:
			begin
				an0 <= 1;
				an1 <= 1;
				an2 <= 1;
				an3 <= 0;
				hex_in <= hex3;
				dp <= 1;
			end
		4'b1010:
			begin
				an0 <= 1;
				an1 <= 1;
				an2 <= 0;
				an3 <= 1;
				hex_in <= hex2;
				dp <= 1;
			end		
		4'b0110:
			begin
				an0 <= 1;
				an1 <= 0;
				an2 <= 1;
				an3 <= 1;
				hex_in <= hex1;
				dp <= 1;
			end
		4'b0010:
			begin
				an0 <= 0;
				an1 <= 1;
				an2 <= 1;
				an3 <= 1;
				hex_in <= hex0;
				dp <= 1;
			end
		default:
			begin
				an0 <= 1;
				an1 <= 1;
				an2 <= 1;
				an3 <= 1;
			end
	endcase


LEDdecoder LEDdecoderINSTANCE(hex_in,led_seg);

endmodule