div_rom.v 1.34 KB
// div_rom.v v1 Frank Berndt
// wrapper for NEC divide rom;
// :set tabstop=4

module div_rom (
	clk, a, out
);
	input clk;			// sync clock;
	input [9:0] a;		// address;
	output [15:0] out;	// read data;

	// instantiate NEC ROM;
	// 1kx16 synchronous ROM;
	// however, smallest NEC ROM is 2kx16;

	wire csb;			// rom enable;
	wire xa10;			// unused address bit;
	wire [10:0] ta;		// test address;

	assign csb = 1'b0;		// always enabled;
	assign xa10 = 1'b0;		// use first half;
	assign ta = 10'd0;

	WBROMSMHS2048W16C5N01 rom (
		.DO0(out[0]),
		.DO1(out[1]),
		.DO2(out[2]),
		.DO3(out[3]),
		.DO4(out[4]),
		.DO5(out[5]),
		.DO6(out[6]),
		.DO7(out[7]),
		.DO8(out[8]),
		.DO9(out[9]),
		.DO10(out[10]),
		.DO11(out[11]),
		.DO12(out[12]),
		.DO13(out[13]),
		.DO14(out[14]),
		.DO15(out[15]),
		.TDO0(),
		.TDO1(),
		.TDO2(),
		.TDO3(),
		.TDO4(),
		.TDO5(),
		.TDO6(),
		.TDO7(),
		.TDO8(),
		.TDO9(),
		.TDO10(),
		.TDO11(),
		.TDO12(),
		.TDO13(),
		.TDO14(),
		.TDO15(),
		.A0(a[0]),
		.A1(a[1]),
		.A2(a[2]),
		.A3(a[3]),
		.A4(a[4]),
		.A5(a[5]),
		.A6(a[6]),
		.A7(a[7]),
		.A8(a[8]),
		.A9(a[9]),
		.A10(xa10),
		.BE(clk),
		.CSB(csb),
		.TA0(ta[0]),
		.TA1(ta[1]),
		.TA2(ta[2]),
		.TA3(ta[3]),
		.TA4(ta[4]),
		.TA5(ta[5]),
		.TA6(ta[6]),
		.TA7(ta[7]),
		.TA8(ta[8]),
		.TA9(ta[9]),
		.TA10(ta[10]),
		.TBE(1'b0),
		.BUNRI(1'b0),
		.TEST(1'b0)
	);

endmodule