data/full_repos/permissive/116048589/Xilinx_Project/Main Xilinx Project/IO_Mem_Controller.v
1: b'%Error: Cannot find file containing module: Xilinx\n        ... Looked in:\n             data/full_repos/permissive/116048589/Xilinx_Project/Main/Xilinx\n             data/full_repos/permissive/116048589/Xilinx_Project/Main/Xilinx.v\n             data/full_repos/permissive/116048589/Xilinx_Project/Main/Xilinx.sv\n             Xilinx\n             Xilinx.v\n             Xilinx.sv\n             obj_dir/Xilinx\n             obj_dir/Xilinx.v\n             obj_dir/Xilinx.sv\n%Error: Cannot find file containing module: Project,data/full_repos/permissive/116048589\n%Error: Cannot find file containing module: data/full_repos/permissive/116048589/Xilinx_Project/Main\n%Error: Cannot find file containing module: Project/IO_Mem_Controller.v\n%Error: Exiting due to 4 error(s)\n'
module IO_Mem_Controller(
    input clk,
	 
    input MemWrite_IN,
	 input [15:0] ADDR_IN,
    input [15:0] DATA_IN,
    input [15:0] ReadData_IN,
	 input PacmanCountRdy,
	 input Ghost1CountRdy,
	 input Ghost2CountRdy,
	 input Ghost3CountRdy,
	 input Ghost4CountRdy,
	 input DrawTimerCountRdy,
	 input MouthTimerCountRdy,
	 input GhostFlashCountRdy,
	 input ScatterModeCountRdy,
	 
	 output reg MemWrite_OUT,
	 output reg [13:0] ADDR_OUT,
    output reg [15:0] DATA_OUT,
	 output reg [15:0] ReadData_OUT,
	 output reg [15:0] PacmanToCount,
	 output reg [15:0] Ghost1ToCount,
	 output reg [15:0] Ghost2ToCount,
	 output reg [15:0] Ghost3ToCount,
	 output reg [15:0] Ghost4ToCount,
	 output reg [15:0] DrawTimerToCount,
	 output reg [15:0] MouthTimerToCount,
	 output reg [15:0] GhostFlashToCount,
	 output reg [15:0] ScatterModeToCount,
    
    input [7:0] NES_IN,
	 input [7:0] NES_IN2,
    
	 input [2:0] count3,
	 
	 output reg [5:0] MP3Trig_OUT,
    output reg [11:0] DACA_OUT,
    output reg [11:0] DACB_OUT,
    output reg [11:0] DACC_OUT,
	 output reg [7:0]	led7Seg_OUT
    );
	 

		reg [7:0] led7Seg;
		reg [5:0] MP3Trig;
		always@(*)
		begin
			led7Seg 					<= 0;
			MemWrite_OUT 			<= 0;
			ADDR_OUT 				<= 0;
			DATA_OUT 				<= 0;
			MemWrite_OUT			<= 0;
			ReadData_OUT			<= 0;
			MP3Trig					<= 0;
			DACA_OUT					<= 0;
			DACB_OUT					<= 0;
			DACC_OUT					<= 0;
			PacmanToCount			<= 0;
			Ghost1ToCount			<= 0;
			Ghost2ToCount			<= 0;
			Ghost3ToCount			<= 0;
			Ghost4ToCount			<= 0;
			DrawTimerToCount		<= 0;
			MouthTimerToCount   	<= 0;
			GhostFlashToCount   	<= 0;
			ScatterModeToCount  	<= 0;
			case(ADDR_IN)
				65535 	:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[0]}};
								end
				65534		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[1]}};
								end
				65533		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[2]}};
								end
				65532		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[3]}};
								end
				65531 	:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[4]}};
								end
				65530		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[5]}};
								end		
				65529		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[6]}};
								end
				65528		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[7]}};
								end
				65527		:	begin
									if(MemWrite_IN)
										MP3Trig <= DATA_IN;
								end
				65526		:	begin
									if(MemWrite_IN)
										DACA_OUT <= DATA_IN;
								end
				65525		:	begin
									if(MemWrite_IN)
										DACB_OUT <= DATA_IN;
								end
				65524		:	begin
									if(MemWrite_IN)
										DACC_OUT <= DATA_IN;
								end
									
				65523		:	begin
									if(MemWrite_IN)
										PacmanToCount	<= DATA_IN;
								end
				65522 	:	begin
										ReadData_OUT <= PacmanCountRdy;
								end
				
				65521		:	begin
									if(MemWrite_IN)
										Ghost1ToCount	<= DATA_IN;
								end
				65520 	:	begin
										ReadData_OUT <= Ghost1CountRdy;
								end
								
				65519		:	begin
									if(MemWrite_IN)
										Ghost2ToCount	<= DATA_IN;
								end
				65518 	:	begin
										ReadData_OUT <= Ghost2CountRdy;
								end
								
				65517		:	begin
									if(MemWrite_IN)
										Ghost3ToCount	<= DATA_IN;
								end
				65516 	:	begin
										ReadData_OUT <= Ghost3CountRdy;
								end
								
				65515		:	begin
									if(MemWrite_IN)
										Ghost4ToCount	<= DATA_IN;
								end
				65514 	:	begin
										ReadData_OUT <= Ghost4CountRdy;
								end
								
				65513		:	begin
									if(MemWrite_IN)
										DrawTimerToCount	<= DATA_IN;
								end
				65512 	:	begin
										ReadData_OUT <= DrawTimerCountRdy;
								end
								
				65511		:	begin
									if(MemWrite_IN)
										MouthTimerToCount	<= DATA_IN;
								end
				65510 	:	begin
										ReadData_OUT <= MouthTimerCountRdy;
								end
				
				65509		:	begin
									if(MemWrite_IN)
										GhostFlashToCount	<= DATA_IN;
								end
				65508 	:	begin
										ReadData_OUT <= GhostFlashCountRdy;
								end
								
				65507		:	begin
									if(MemWrite_IN)
										ScatterModeToCount	<= DATA_IN;
								end
				65506 	:	begin
										ReadData_OUT <= ScatterModeCountRdy;
								end
				13201		:	begin
									led7Seg 			<= DATA_IN[7:0];
									MemWrite_OUT 	<= MemWrite_IN;
									ADDR_OUT 		<= ADDR_IN;
									DATA_OUT 		<= DATA_IN;
									MemWrite_OUT	<= MemWrite_IN;
									ReadData_OUT	<= ReadData_IN;
								end



								
								
								
								
				65505 	:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[0]}};
								end
				65504		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[1]}};
								end
				65503		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[2]}};
								end
				65502		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[3]}};
								end
				65501 	:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[4]}};
								end
				65500		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[5]}};
								end		
				65499		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[6]}};
								end
				65498		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[7]}};	
								end
								
								
				65497		:	begin
									ReadData_OUT <=	count3;	
								end
				default	:	begin
									MemWrite_OUT 	<= MemWrite_IN;
									ADDR_OUT 		<= ADDR_IN;
									DATA_OUT 		<= DATA_IN;
									MemWrite_OUT	<= MemWrite_IN;
									ReadData_OUT	<= ReadData_IN;
								end
			endcase
		end

		always@(posedge clk)
		begin
			if(MemWrite_IN && ADDR_IN == 13201)
				led7Seg_OUT <= led7Seg;
		end
		
		always@(posedge clk)
		begin
			if(MemWrite_IN && ADDR_IN == 65527)
				MP3Trig_OUT <= MP3Trig;
		end

endmodule
module IO_Mem_Controller(
    input clk,
	 
    input MemWrite_IN,
	 input [15:0] ADDR_IN,
    input [15:0] DATA_IN,
    input [15:0] ReadData_IN,
	 input PacmanCountRdy,
	 input Ghost1CountRdy,
	 input Ghost2CountRdy,
	 input Ghost3CountRdy,
	 input Ghost4CountRdy,
	 input DrawTimerCountRdy,
	 input MouthTimerCountRdy,
	 input GhostFlashCountRdy,
	 input ScatterModeCountRdy,
	 
	 output reg MemWrite_OUT,
	 output reg [13:0] ADDR_OUT,
    output reg [15:0] DATA_OUT,
	 output reg [15:0] ReadData_OUT,
	 output reg [15:0] PacmanToCount,
	 output reg [15:0] Ghost1ToCount,
	 output reg [15:0] Ghost2ToCount,
	 output reg [15:0] Ghost3ToCount,
	 output reg [15:0] Ghost4ToCount,
	 output reg [15:0] DrawTimerToCount,
	 output reg [15:0] MouthTimerToCount,
	 output reg [15:0] GhostFlashToCount,
	 output reg [15:0] ScatterModeToCount,
    
    input [7:0] NES_IN,
	 input [7:0] NES_IN2,
    
	 input [2:0] count3,
	 
	 output reg [5:0] MP3Trig_OUT,
    output reg [11:0] DACA_OUT,
    output reg [11:0] DACB_OUT,
    output reg [11:0] DACC_OUT,
	 output reg [7:0]	led7Seg_OUT
    );

	 

		reg [7:0] led7Seg;
		reg [5:0] MP3Trig;
		always@(*)
		begin
			led7Seg 					<= 0;
			MemWrite_OUT 			<= 0;
			ADDR_OUT 				<= 0;
			DATA_OUT 				<= 0;
			MemWrite_OUT			<= 0;
			ReadData_OUT			<= 0;
			MP3Trig					<= 0;
			DACA_OUT					<= 0;
			DACB_OUT					<= 0;
			DACC_OUT					<= 0;
			PacmanToCount			<= 0;
			Ghost1ToCount			<= 0;
			Ghost2ToCount			<= 0;
			Ghost3ToCount			<= 0;
			Ghost4ToCount			<= 0;
			DrawTimerToCount		<= 0;
			MouthTimerToCount   	<= 0;
			GhostFlashToCount   	<= 0;
			ScatterModeToCount  	<= 0;
			case(ADDR_IN)
				65535 	:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[0]}};
								end
				65534		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[1]}};
								end
				65533		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[2]}};
								end
				65532		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[3]}};
								end
				65531 	:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[4]}};
								end
				65530		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[5]}};
								end		
				65529		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[6]}};
								end
				65528		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN[7]}};
								end
				65527		:	begin
									if(MemWrite_IN)
										MP3Trig <= DATA_IN;
								end
				65526		:	begin
									if(MemWrite_IN)
										DACA_OUT <= DATA_IN;
								end
				65525		:	begin
									if(MemWrite_IN)
										DACB_OUT <= DATA_IN;
								end
				65524		:	begin
									if(MemWrite_IN)
										DACC_OUT <= DATA_IN;
								end
									
				65523		:	begin
									if(MemWrite_IN)
										PacmanToCount	<= DATA_IN;
								end
				65522 	:	begin
										ReadData_OUT <= PacmanCountRdy;
								end
				
				65521		:	begin
									if(MemWrite_IN)
										Ghost1ToCount	<= DATA_IN;
								end
				65520 	:	begin
										ReadData_OUT <= Ghost1CountRdy;
								end
								
				65519		:	begin
									if(MemWrite_IN)
										Ghost2ToCount	<= DATA_IN;
								end
				65518 	:	begin
										ReadData_OUT <= Ghost2CountRdy;
								end
								
				65517		:	begin
									if(MemWrite_IN)
										Ghost3ToCount	<= DATA_IN;
								end
				65516 	:	begin
										ReadData_OUT <= Ghost3CountRdy;
								end
								
				65515		:	begin
									if(MemWrite_IN)
										Ghost4ToCount	<= DATA_IN;
								end
				65514 	:	begin
										ReadData_OUT <= Ghost4CountRdy;
								end
								
				65513		:	begin
									if(MemWrite_IN)
										DrawTimerToCount	<= DATA_IN;
								end
				65512 	:	begin
										ReadData_OUT <= DrawTimerCountRdy;
								end
								
				65511		:	begin
									if(MemWrite_IN)
										MouthTimerToCount	<= DATA_IN;
								end
				65510 	:	begin
										ReadData_OUT <= MouthTimerCountRdy;
								end
				
				65509		:	begin
									if(MemWrite_IN)
										GhostFlashToCount	<= DATA_IN;
								end
				65508 	:	begin
										ReadData_OUT <= GhostFlashCountRdy;
								end
								
				65507		:	begin
									if(MemWrite_IN)
										ScatterModeToCount	<= DATA_IN;
								end
				65506 	:	begin
										ReadData_OUT <= ScatterModeCountRdy;
								end
				13201		:	begin
									led7Seg 			<= DATA_IN[7:0];
									MemWrite_OUT 	<= MemWrite_IN;
									ADDR_OUT 		<= ADDR_IN;
									DATA_OUT 		<= DATA_IN;
									MemWrite_OUT	<= MemWrite_IN;
									ReadData_OUT	<= ReadData_IN;
								end



								
								
								
								
				65505 	:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[0]}};
								end
				65504		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[1]}};
								end
				65503		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[2]}};
								end
				65502		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[3]}};
								end
				65501 	:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[4]}};
								end
				65500		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[5]}};
								end		
				65499		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[6]}};
								end
				65498		:	begin
									ReadData_OUT <=	{{15'b0},{NES_IN2[7]}};	
								end
								
								
				65497		:	begin
									ReadData_OUT <=	count3;	
								end
				default	:	begin
									MemWrite_OUT 	<= MemWrite_IN;
									ADDR_OUT 		<= ADDR_IN;
									DATA_OUT 		<= DATA_IN;
									MemWrite_OUT	<= MemWrite_IN;
									ReadData_OUT	<= ReadData_IN;
								end
			endcase
		end

		always@(posedge clk)
		begin
			if(MemWrite_IN && ADDR_IN == 13201)
				led7Seg_OUT <= led7Seg;
		end
		
		always@(posedge clk)
		begin
			if(MemWrite_IN && ADDR_IN == 65527)
				MP3Trig_OUT <= MP3Trig;
		end

endmodule