2021-02-15 22:40:12 +01:00
|
|
|
module gb (
|
|
|
|
input logic clk_i,
|
|
|
|
input logic nreset_i
|
|
|
|
);
|
|
|
|
|
2021-02-20 23:10:47 +01:00
|
|
|
logic we;
|
2021-02-15 23:55:09 +01:00
|
|
|
logic [15:0] address;
|
|
|
|
logic [ 7:0] rdata;
|
2021-02-20 23:10:47 +01:00
|
|
|
logic [ 7:0] wdata;
|
2021-02-15 22:40:12 +01:00
|
|
|
|
2021-02-15 23:55:09 +01:00
|
|
|
cpu cpu_inst (
|
|
|
|
.clk_i (clk_i),
|
|
|
|
.nreset_i (nreset_i),
|
|
|
|
.address_o(address),
|
2021-02-20 23:10:47 +01:00
|
|
|
.rdata_i (rdata),
|
|
|
|
.we_o (we),
|
|
|
|
.wdata_o (wdata)
|
2021-02-15 23:55:09 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
rom #(
|
|
|
|
.FILE_NAME("DMG_ROM.bin"),
|
|
|
|
.ADDR_W (8),
|
|
|
|
.DATA_W (8)
|
|
|
|
) rom_inst (
|
|
|
|
.clk_i (clk_i),
|
|
|
|
.address_i(address[7:0]),
|
|
|
|
.rdata_o (rdata)
|
|
|
|
);
|
2021-02-15 22:40:12 +01:00
|
|
|
|
|
|
|
endmodule : gb
|