9 reg [7:0] rom [2047:0];
10 initial $readmemh("rom.hex", rom);
12 wire decode = address[15:13] == 0;
13 wire [7:0] odata = rom[address[11:0]];
14 assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
15 //assign data = rd ? odata : 8'bzzzzzzzz;
24 reg [7:0] ram [8191:0];
26 wire decode = (address >= 16'hC000) && (address < 16'hFE00);
29 assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
34 odata <= ram[address[12:0]];
35 else if (decode && wr)
36 ram[address[12:0]] <= data;
46 output reg [7:0] ledout);
48 wire decode = address == 16'hFF51;
50 assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
56 else if (decode && wr)
64 output wire [7:0] leds,
66 output wire [3:0] digits,
67 output wire [7:0] seven);
70 //IBUFG ibuf (.O(clk), .I(iclk));
72 CPUDCM dcm (.CLKIN_IN(xtal), .CLKFX_OUT(clk));
126 // wire [7:0] switches;
128 always #10 clk <= ~clk;
165 // .switches(switches),