data/full_repos/permissive/175261487/src/led_pwm.v
1: b"%Error: data/full_repos/permissive/175261487/src/led_pwm.v:37: Cannot find file containing module: 'SB_LEDDA_IP'\n SB_LEDDA_IP PWMgen_inst (\n ^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/175261487/src,data/full_repos/permissive/175261487/SB_LEDDA_IP\n             data/full_repos/permissive/175261487/src,data/full_repos/permissive/175261487/SB_LEDDA_IP.v\n             data/full_repos/permissive/175261487/src,data/full_repos/permissive/175261487/SB_LEDDA_IP.sv\n             SB_LEDDA_IP\n             SB_LEDDA_IP.v\n             SB_LEDDA_IP.sv\n             obj_dir/SB_LEDDA_IP\n             obj_dir/SB_LEDDA_IP.v\n             obj_dir/SB_LEDDA_IP.sv\n%Error: data/full_repos/permissive/175261487/src/led_pwm.v:62: Cannot find file containing module: 'SB_RGBA_DRV'\n SB_RGBA_DRV #(\n ^~~~~~~~~~~\n%Error: Exiting due to 2 error(s)\n"
module led_pwm(
	input clk,
	input rst,
	input cs,
	input we,
	input [3:0] addr,
	input [7:0] din,
	output reg [7:0] dout,
	output rgb0,
	output rgb1,
	output rgb2
);

	reg [7:0] mycr;
	always @(posedge clk)
		if(rst)
			mycr <= 8'h00;
		else if(cs & we & (addr==4'hF))
			mycr <= din;
	

	always @(posedge clk)
		if(cs & !we)
			if(addr == 4'hF)
				dout <= mycr;
			else
				dout <= {7'h00,led_on};


	wire LED0, LED1, LED2;
	wire led_on;
	SB_LEDDA_IP PWMgen_inst (

		.LEDDCS(cs),
		.LEDDCLK(clk),
		.LEDDDAT7(din[7]),
		.LEDDDAT6(din[6]),
		.LEDDDAT5(din[5]),
		.LEDDDAT4(din[4]),
		.LEDDDAT3(din[3]),
		.LEDDDAT2(din[2]),
		.LEDDDAT1(din[1]),
		.LEDDDAT0(din[0]),
		.LEDDADDR3(addr[3]),
		.LEDDADDR2(addr[2]),
		.LEDDADDR1(addr[1]),
		.LEDDADDR0(addr[0]),
		.LEDDDEN(we),
		.LEDDEXE(mycr[6]),
		.PWMOUT0(LED0),
		.PWMOUT1(LED1),
		.PWMOUT2(LED2),
		.LEDDON(led_on)
	);
	

	SB_RGBA_DRV #(
		.CURRENT_MODE("0b1"),
		.RGB0_CURRENT("0b000001"),
		.RGB1_CURRENT("0b000001"),
		.RGB2_CURRENT("0b000011")
	) RGBA_DRIVER (
		.CURREN(mycr[4]),
		.RGBLEDEN(mycr[5]),
		.RGB0PWM(mycr[7] ? LED0 : mycr[0]),
		.RGB1PWM(mycr[7] ? LED1 : mycr[1]),
		.RGB2PWM(mycr[7] ? LED2 : mycr[2]),
		.RGB0(rgb0),
		.RGB1(rgb1),
		.RGB2(rgb2)
	);
endmodule
module led_pwm(
	input clk,
	input rst,
	input cs,
	input we,
	input [3:0] addr,
	input [7:0] din,
	output reg [7:0] dout,
	output rgb0,
	output rgb1,
	output rgb2
);


	reg [7:0] mycr;
	always @(posedge clk)
		if(rst)
			mycr <= 8'h00;
		else if(cs & we & (addr==4'hF))
			mycr <= din;
	

	always @(posedge clk)
		if(cs & !we)
			if(addr == 4'hF)
				dout <= mycr;
			else
				dout <= {7'h00,led_on};


	wire LED0, LED1, LED2;
	wire led_on;
	SB_LEDDA_IP PWMgen_inst (

		.LEDDCS(cs),
		.LEDDCLK(clk),
		.LEDDDAT7(din[7]),
		.LEDDDAT6(din[6]),
		.LEDDDAT5(din[5]),
		.LEDDDAT4(din[4]),
		.LEDDDAT3(din[3]),
		.LEDDDAT2(din[2]),
		.LEDDDAT1(din[1]),
		.LEDDDAT0(din[0]),
		.LEDDADDR3(addr[3]),
		.LEDDADDR2(addr[2]),
		.LEDDADDR1(addr[1]),
		.LEDDADDR0(addr[0]),
		.LEDDDEN(we),
		.LEDDEXE(mycr[6]),
		.PWMOUT0(LED0),
		.PWMOUT1(LED1),
		.PWMOUT2(LED2),
		.LEDDON(led_on)
	);
	

	SB_RGBA_DRV #(
		.CURRENT_MODE("0b1"),
		.RGB0_CURRENT("0b000001"),
		.RGB1_CURRENT("0b000001"),
		.RGB2_CURRENT("0b000011")
	) RGBA_DRIVER (
		.CURREN(mycr[4]),
		.RGBLEDEN(mycr[5]),
		.RGB0PWM(mycr[7] ? LED0 : mycr[0]),
		.RGB1PWM(mycr[7] ? LED1 : mycr[1]),
		.RGB2PWM(mycr[7] ? LED2 : mycr[2]),
		.RGB0(rgb0),
		.RGB1(rgb1),
		.RGB2(rgb2)
	);
endmodule