generated from TinyTapeout/tt09-verilog-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
`default_nettype none | ||
|
||
`ifdef SIM | ||
`define MACRO_ROM_EMU | ||
`elsif FPGA | ||
`define MACRO_ROM_EMU | ||
`elsif SYNTH | ||
`define MACRO_ROM_EMU | ||
`endif | ||
|
||
`ifdef MACRO_ROM_EMU | ||
|
||
module rom_2600_0 ( | ||
`ifdef GL_TEST | ||
input wire VPWR, | ||
input wire VGND, | ||
`endif | ||
input wire [11:0] addr, | ||
output wire [ 7:0] q | ||
); | ||
reg [7:0] rom [4095:0]; assign q = rom[addr]; | ||
initial begin | ||
$readmemh("../roms/rom_macro_0.mem", rom, 0, 4095); | ||
end | ||
endmodule | ||
|
||
module rom_2600_1 ( | ||
`ifdef GL_TEST | ||
input wire VPWR, | ||
input wire VGND, | ||
`endif | ||
input wire [11:0] addr, | ||
output wire [ 7:0] q | ||
); | ||
reg [7:0] rom [4095:0]; assign q = rom[addr]; | ||
initial begin | ||
$readmemh("../roms/rom_macro_1.mem", rom, 0, 4095); | ||
end | ||
endmodule | ||
|
||
module rom_2600_2 ( | ||
`ifdef GL_TEST | ||
input wire VPWR, | ||
input wire VGND, | ||
`endif | ||
input wire [11:0] addr, | ||
output wire [ 7:0] q | ||
); | ||
reg [7:0] rom [4095:0]; assign q = rom[addr]; | ||
initial begin | ||
$readmemh("../roms/rom_macro_2.mem", rom, 0, 4095); | ||
end | ||
endmodule | ||
|
||
module rom_2600_3 ( | ||
`ifdef GL_TEST | ||
input wire VPWR, | ||
input wire VGND, | ||
`endif | ||
input wire [11:0] addr, | ||
output wire [ 7:0] q | ||
); | ||
reg [7:0] rom [4095:0]; assign q = rom[addr]; | ||
initial begin | ||
$readmemh("../roms/rom_macro_3.mem", rom, 0, 4095); | ||
end | ||
endmodule | ||
|
||
`endif |