data/full_repos/permissive/127311496/src/v/Infrastructure/VRAM.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/127311496/src/v/Infrastructure/VRAM.v:24: Multiple top level modules\n                                                                                      : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                                      : ... Top module \'CharROM\'\nmodule CharROM(\n       ^~~~~~~\n                                                                                      : ... Top module \'CharVRAM\'\nmodule CharVRAM(\n       ^~~~~~~~\n%Error: Exiting due to 1 warning(s)\n'
module CharVRAM(
	input clka, input [11:0] addra, input [3:0] wea, input ena,
	input [31:0] dina, output reg [31:0] douta,
	input clkb, input [11:0] addrb, output reg [31:0] doutb
);
	reg [31:0] data[4095:0];
	
	always @ (posedge clka)
	if(ena)
	begin
		if(wea[0]) data[addra][ 7: 0] = dina[ 7: 0];
		if(wea[1]) data[addra][15: 8] = dina[15: 8];
		if(wea[2]) data[addra][23:16] = dina[23:16];
		if(wea[3]) data[addra][31:24] = dina[31:24];
		douta <= data[addra];
	end
	
	always @ (posedge clkb)
		doutb <= data[addrb];

endmodule
module CharVRAM(
	input clka, input [11:0] addra, input [3:0] wea, input ena,
	input [31:0] dina, output reg [31:0] douta,
	input clkb, input [11:0] addrb, output reg [31:0] doutb
);

	reg [31:0] data[4095:0];
	
	always @ (posedge clka)
	if(ena)
	begin
		if(wea[0]) data[addra][ 7: 0] = dina[ 7: 0];
		if(wea[1]) data[addra][15: 8] = dina[15: 8];
		if(wea[2]) data[addra][23:16] = dina[23:16];
		if(wea[3]) data[addra][31:24] = dina[31:24];
		douta <= data[addra];
	end
	
	always @ (posedge clkb)
		doutb <= data[addrb];

endmodule