data/full_repos/permissive/503175397/rtl/dma.sv
1: b"%Error: data/full_repos/permissive/503175397/rtl/dma.sv:17: Can't find definition of variable: 'sq1_freq'\n    7'h20: sq1_freq[7:0] <= din;\n           ^~~~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:19: Can't find definition of variable: 'sq2_freq_ps'\n                                                          : ... Suggested alternative: 'sq1_freq'\n    7'h22: sq2_freq_ps[7:0] <= din;\n           ^~~~~~~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:23: Can't find definition of variable: 'audio_ctl'\n    7'h26: audio_ctl <= din;\n           ^~~~~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:24: Can't find definition of task/function: 'volume'\n    7'h27: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:25: Can't find definition of task/function: 'volume'\n    7'h28: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:26: Can't find definition of task/function: 'volume'\n    7'h29: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:27: Can't find definition of task/function: 'volume'\n    7'h2A: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:28: Can't find definition of task/function: 'volume'\n    7'h2B: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:29: Can't find definition of task/function: 'volume'\n    7'h2C: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:30: Can't find definition of task/function: 'volume'\n    7'h2D: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:31: Can't find definition of task/function: 'volume'\n    7'h2E: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:32: Can't find definition of task/function: 'volume'\n    7'h2F: volume;\n           ^~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:33: Can't find definition of variable: 'timer_0_div'\n    7'h30: timer_0_div <= din;\n           ^~~~~~~~~~~\n%Error: data/full_repos/permissive/503175397/rtl/dma.sv:34: Can't find definition of variable: 'timer_int'\n    7'h31: timer_int <= din;\n           ^~~~~~~~~\n%Error: Exiting due to 14 error(s)\n"
module dma
(
	input clk,
	input [6:0] AB,
	input reset,
	input ce,
	input sys_cs,
	input cpu_rwn,
	input din
);


always_ff @(posedge clk) begin
	if (ce) begin
		if (cpu_rwn && sys_cs) begin
			case (AB)
				7'h20: sq1_freq[7:0] <= din;
				7'h21: sq1_freq[11:8] <= din[3:0];
				7'h22: sq2_freq_ps[7:0] <= din;
				7'h23: sq2_freq_ps[11:8] <= din[3:0];
				7'h24: ;
				7'h25: ;
				7'h26: audio_ctl <= din;
				7'h27: volume;
				7'h28: volume;
				7'h29: volume;
				7'h2A: volume;
				7'h2B: volume;
				7'h2C: volume;
				7'h2D: volume;
				7'h2E: volume;
				7'h2F: volume;
				7'h30: timer_0_div <= din;
				7'h31: timer_int <= din;
				7'h32: ;
				7'h33: ;
				7'h34: ;
				7'h35: ;
				7'h36: timer_int <= din;
				7'h37: ;
				7'h38: ;
				7'h39: ;
				7'h3A: ;
			endcase
		end
	end
end

endmodule
module dma
(
	input clk,
	input [6:0] AB,
	input reset,
	input ce,
	input sys_cs,
	input cpu_rwn,
	input din
);



always_ff @(posedge clk) begin
	if (ce) begin
		if (cpu_rwn && sys_cs) begin
			case (AB)
				7'h20: sq1_freq[7:0] <= din;
				7'h21: sq1_freq[11:8] <= din[3:0];
				7'h22: sq2_freq_ps[7:0] <= din;
				7'h23: sq2_freq_ps[11:8] <= din[3:0];
				7'h24: ;
				7'h25: ;
				7'h26: audio_ctl <= din;
				7'h27: volume;
				7'h28: volume;
				7'h29: volume;
				7'h2A: volume;
				7'h2B: volume;
				7'h2C: volume;
				7'h2D: volume;
				7'h2E: volume;
				7'h2F: volume;
				7'h30: timer_0_div <= din;
				7'h31: timer_int <= din;
				7'h32: ;
				7'h33: ;
				7'h34: ;
				7'h35: ;
				7'h36: timer_int <= din;
				7'h37: ;
				7'h38: ;
				7'h39: ;
				7'h3A: ;
			endcase
		end
	end
end

endmodule