data/full_repos/permissive/212495825/src/gaplus_cpus.v
 line:194: before: ","
1: b'%Warning-MULTITOP: data/full_repos/permissive/212495825/src/gaplus_cpus.v:113: 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 \'GAPLUS_MAIN\'\nmodule GAPLUS_MAIN\n       ^~~~~~~~~~~\n                                                                             : ... Top module \'GAPLUS_SUB\'\nmodule GAPLUS_SUB\n       ^~~~~~~~~~\n%Error: data/full_repos/permissive/212495825/src/gaplus_cpus.v:199: Cannot find file containing module: \'mc6809i\'\nmc6809i core (\n^~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/212495825/src,data/full_repos/permissive/212495825/mc6809i\n             data/full_repos/permissive/212495825/src,data/full_repos/permissive/212495825/mc6809i.v\n             data/full_repos/permissive/212495825/src,data/full_repos/permissive/212495825/mc6809i.sv\n             mc6809i\n             mc6809i.v\n             mc6809i.sv\n             obj_dir/mc6809i\n             obj_dir/mc6809i.v\n             obj_dir/mc6809i.sv\n%Error: data/full_repos/permissive/212495825/src/gaplus_cpus.v:141: Cannot find file containing module: \'SUB_ROM\'\nSUB_ROM isb( SCPU_CLK, scpu_ma, srom_d, ROMCL,ROMAD,ROMDT,ROMEN );\n^~~~~~~\n%Error: data/full_repos/permissive/212495825/src/gaplus_cpus.v:143: Cannot find file containing module: \'dataselector2\'\ndataselector2 scpu_disel( scpu_di, scpu_irom_cs, srom_d, scpu_mram_cs, scpu_mr, 8\'hFF );\n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/212495825/src/gaplus_cpus.v:53: Cannot find file containing module: \'MAIN_ROM\'\nMAIN_ROM imn( MCPU_CLK, mcpu_ma, mrom_d, ROMCL,ROMAD,ROMDT,ROMEN );\n^~~~~~~~\n%Error: data/full_repos/permissive/212495825/src/gaplus_cpus.v:75: Cannot find file containing module: \'dataselector4\'\ndataselector4 mcpudsel( \n^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/212495825/src/gaplus_cpus.v:99: Cannot find file containing module: \'GAPLUS_IO\'\nGAPLUS_IO io(\n^~~~~~~~~\n%Error: Exiting due to 6 error(s), 1 warning(s)\n'
module GAPLUS_SUB
(
	input SCPU_CLK,
	input	RESET,
	input VBLK,

	input   [7:0] scpu_mr,
	output [15:0] scpu_ma,
	output        scpu_we,
	output  [7:0] scpu_do,


	input				ROMCL,
	input  [17:0]	ROMAD,
	input	  [7:0]	ROMDT,
	input				ROMEN
);

wire [7:0]  scpu_di;
wire        scpu_rw, scpu_vma;
wire        scpu_wr = ~scpu_rw;
wire        scpu_rd =  scpu_rw;

wire scpu_irom_cs = ( scpu_ma[15]               ) & scpu_vma;
wire scpu_mram_cs = ( scpu_ma[15:13] == 3'b000  ) & scpu_vma;
wire scpu_irqe_cs = ( scpu_ma[15:12] == 4'b0110 ) & scpu_vma;

wire	[7:0]	srom_d;
SUB_ROM isb( SCPU_CLK, scpu_ma, srom_d, ROMCL,ROMAD,ROMDT,ROMEN );

dataselector2 scpu_disel( scpu_di, scpu_irom_cs, srom_d, scpu_mram_cs, scpu_mr, 8'hFF );

assign scpu_we =  scpu_mram_cs & scpu_wr;

reg	sirq_en  = 1'b1;
wire	scpu_irq = (~sirq_en) & VBLK;

always @ ( negedge SCPU_CLK or posedge RESET ) begin
	if ( RESET ) begin
		sirq_en <= 1'b1;
	end else begin
		if ( scpu_irqe_cs ) sirq_en <= (~scpu_ma[0]);
	end
end

cpu6809 subcpu (
	.clkx2(SCPU_CLK),
	.rst(RESET),
	.rw(scpu_rw),
	.vma(scpu_vma),
	.address(scpu_ma),
	.data_in(scpu_di),
	.data_out(scpu_do),
	.halt(1'b0),
	.hold(1'b0),
	.irq(scpu_irq),
	.firq(1'b0),
	.nmi(1'b0)
);

endmodule
module GAPLUS_SUB
(
	input SCPU_CLK,
	input	RESET,
	input VBLK,

	input   [7:0] scpu_mr,
	output [15:0] scpu_ma,
	output        scpu_we,
	output  [7:0] scpu_do,


	input				ROMCL,
	input  [17:0]	ROMAD,
	input	  [7:0]	ROMDT,
	input				ROMEN
);


wire [7:0]  scpu_di;
wire        scpu_rw, scpu_vma;
wire        scpu_wr = ~scpu_rw;
wire        scpu_rd =  scpu_rw;

wire scpu_irom_cs = ( scpu_ma[15]               ) & scpu_vma;
wire scpu_mram_cs = ( scpu_ma[15:13] == 3'b000  ) & scpu_vma;
wire scpu_irqe_cs = ( scpu_ma[15:12] == 4'b0110 ) & scpu_vma;

wire	[7:0]	srom_d;
SUB_ROM isb( SCPU_CLK, scpu_ma, srom_d, ROMCL,ROMAD,ROMDT,ROMEN );

dataselector2 scpu_disel( scpu_di, scpu_irom_cs, srom_d, scpu_mram_cs, scpu_mr, 8'hFF );

assign scpu_we =  scpu_mram_cs & scpu_wr;

reg	sirq_en  = 1'b1;
wire	scpu_irq = (~sirq_en) & VBLK;

always @ ( negedge SCPU_CLK or posedge RESET ) begin
	if ( RESET ) begin
		sirq_en <= 1'b1;
	end else begin
		if ( scpu_irqe_cs ) sirq_en <= (~scpu_ma[0]);
	end
end

cpu6809 subcpu (
	.clkx2(SCPU_CLK),
	.rst(RESET),
	.rw(scpu_rw),
	.vma(scpu_vma),
	.address(scpu_ma),
	.data_in(scpu_di),
	.data_out(scpu_do),
	.halt(1'b0),
	.hold(1'b0),
	.irq(scpu_irq),
	.firq(1'b0),
	.nmi(1'b0)
);

endmodule