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 = ({0,address} >= 17'hC000) && ({0,address} < 17'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)
65 output wire [7:0] leds,
67 output wire [3:0] digits,
68 output wire [7:0] seven);
71 //IBUFG ibuf (.O(clk), .I(iclk));
73 CPUDCM dcm (.CLKIN_IN(xtal), .CLKFX_OUT(clk));
135 // wire [7:0] switches;
137 always #10 clk <= ~clk;
174 // .switches(switches),