`timescale 1ns / 1ps
|
`timescale 1ns / 1ps
|
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
// Company: Dept. Architecture and Computing Technology. University of Seville
|
// Company: Dept. Architecture and Computing Technology. University of Seville
|
// Engineer: Miguel Angel Rodriguez Jodar. rodriguj@atc.us.es
|
// Engineer: Miguel Angel Rodriguez Jodar. rodriguj@atc.us.es
|
//
|
//
|
// Create Date: 19:13:39 4-Apr-2012
|
// Create Date: 19:13:39 4-Apr-2012
|
// Design Name: ULAplus replacement
|
// Design Name: ULAplus replacement
|
// Module Name: ulaplus_tld
|
// Module Name: ulaplus_tld
|
// Project Name:
|
// Project Name:
|
// Target Devices:
|
// Target Devices:
|
// Tool versions:
|
// Tool versions:
|
// Description:
|
// Description:
|
//
|
//
|
// Dependencies:
|
// Dependencies:
|
//
|
//
|
// Revision:
|
// Revision:
|
// Revision 1.00 - File Created
|
// Revision 1.00 - File Created
|
// Additional Comments: GPL License policies apply to the contents of this file.
|
// Additional Comments: GPL License policies apply to the contents of this file.
|
//
|
//
|
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
module ulaplus_tld(
|
module ulaplus_tld(
|
// Clock and reset
|
// Clock and reset
|
input clk50,
|
input clk50,
|
input reset,
|
input reset,
|
|
|
// CPU interface
|
// CPU interface
|
input a15,
|
input a15,
|
input a14,
|
input a14,
|
input a7,
|
input a7,
|
input a6,
|
input a6,
|
input a2,
|
input a2,
|
input mreq_n,
|
input mreq_n,
|
input ioreq_n,
|
input ioreq_n,
|
input iorq_n,
|
input iorq_n,
|
input rd_n,
|
input rd_n,
|
input wr_n,
|
input wr_n,
|
inout [7:0] d,
|
inout [7:0] d,
|
output int_n,
|
output int_n,
|
output cpuclk_n,
|
output cpuclk_n,
|
|
|
// DRAM interface
|
// DRAM interface
|
output [6:0] va,
|
output [6:0] va,
|
output ras_n,
|
output ras_n,
|
output cas_n,
|
output cas_n,
|
output dramwe_n,
|
output dramwe_n,
|
|
|
// ROM interface
|
// ROM interface
|
output romcs_n,
|
output romcs_n,
|
|
|
// Keyboard & audio interface
|
// Keyboard & audio interface
|
input [4:0] kbd,
|
input [4:0] kbd,
|
output audio_out,
|
output audio_out,
|
input ear,
|
input ear,
|
|
|
// RGB video interface
|
// RGB video interface
|
output [2:0] r,
|
output [2:0] r,
|
output [2:0] g,
|
output [2:0] g,
|
output [2:0] b,
|
output [2:0] b,
|
output csync
|
output csync
|
);
|
);
|
|
|
wire clk14;
|
wire clk28;
|
master_ula_clock clock14mhz (
|
master_ula_clock clock28mhz (
|
.CLKIN_IN(clk50),
|
.CLKIN_IN(clk50),
|
.CLKFX_OUT(clk14),
|
.CLKFX_OUT(clk28),
|
.CLKIN_IBUFG_OUT(),
|
.CLKIN_IBUFG_OUT(),
|
.CLK0_OUT()
|
.CLK0_OUT()
|
);
|
);
|
|
|
/////////////////////////////////////
|
/////////////////////////////////////
|
// The ULA
|
// The ULA
|
/////////////////////////////////////
|
/////////////////////////////////////
|
wire ula_r,ula_g,ula_b,ula_i,ulaplus_enabled;
|
wire ula_r,ula_g,ula_b,ula_i,ulaplus_enabled;
|
wire mic,spk;
|
wire mic,spk;
|
wire [7:0] rgbulaplus;
|
wire [7:0] rgbulaplus;
|
|
|
ula the_ula (
|
ula the_ula (
|
.clk14(clk14),
|
.clk28(clk28),
|
.reset_n(reset_n),
|
.reset_n(reset_n),
|
.a15(a15),
|
.a15(a15),
|
.a14(a14),
|
.a14(a14),
|
.a7(a7),
|
.a7(a7),
|
.a6(a6),
|
.a6(a6),
|
.a2(a2),
|
.a2(a2),
|
.din(uladin),
|
.d(d),
|
.dout(uladout),
|
|
.mreq_n(mreq_n),
|
.mreq_n(mreq_n),
|
.ioreq_n(ioreq_n),
|
.ioreq_n(ioreq_n),
|
.iorq_n(iorq_n),
|
.iorq_n(iorq_n),
|
.rd_n(rd_n),
|
.rd_n(rd_n),
|
.wr_n(wr_n),
|
.wr_n(wr_n),
|
.clkcpu(cpuclk_n),
|
.clkcpu(cpuclk_n),
|
.int_n(int_n),
|
.int_n(int_n),
|
.va(va),
|
.va(va),
|
|
.ras_n(ras_n),
|
|
.cas_n(cas_n),
|
|
.dramwe_n(dramwe_n),
|
.ear(ear),
|
.ear(ear),
|
.mic(mic),
|
.mic(mic),
|
.spk(spk),
|
.spk(spk),
|
.kbd(kbd),
|
.kbd(kbd),
|
.r(ula_r),
|
.r(ula_r),
|
.g(ula_g),
|
.g(ula_g),
|
.b(ula_b),
|
.b(ula_b),
|
.i(ula_i),
|
.i(ula_i),
|
.rgbulaplus(rgbulaplus),
|
.rgbulaplus(rgbulaplus),
|
.ulaplus_enabled(ulaplus_enabled),
|
.ulaplus_enabled(ulaplus_enabled),
|
.csync(csync)
|
.csync(csync)
|
);
|
);
|
|
|
/////////////////////////////////////
|
/////////////////////////////////////
|
// ULA/ULA+ video selector and enconding
|
// ULA/ULA+ video selector and enconding
|
/////////////////////////////////////
|
/////////////////////////////////////
|
rgb_builder video_final_stage (
|
rgb_builder video_final_stage (
|
.select(ulaplus_enabled),
|
.select(ulaplus_enabled),
|
.ri(ula_r),
|
.ri(ula_r),
|
.gi(ula_g),
|
.gi(ula_g),
|
.bi(ula_b),
|
.bi(ula_b),
|
.hi(ula_i),
|
.hi(ula_i),
|
.rgbulap(rgbulaplus),
|
.rgbulap(rgbulaplus),
|
.r(r),
|
.r(r),
|
.g(g),
|
.g(g),
|
.b(b)
|
.b(b)
|
);
|
);
|
|
|
/////////////////////////////////////
|
/////////////////////////////////////
|
// Audio mixer
|
// Audio mixer
|
/////////////////////////////////////
|
/////////////////////////////////////
|
mixer audio_mix (
|
mixer audio_mix (
|
.clkdac(clk14),
|
.clkdac(clk28),
|
.reset_n(reset_n),
|
.reset_n(reset_n),
|
.ear(ear),
|
.ear(ear),
|
.mic(mic),
|
.mic(mic),
|
.spk(spk),
|
.spk(spk),
|
.audio(audio_out)
|
.audio(audio_out)
|
);
|
);
|
endmodule
|
endmodule
|
|
|