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 // synthesis attribute ram_style of reg is block
25 reg [7:0] ram [8191:0];
27 wire decode = address[15:13] == 3'b110;
30 assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
34 if (decode) // This has to go this way. The only way XST knows how to do
35 begin // block ram is chip select, write enable, and always
36 if (wr) // reading. "else if rd" does not cut it ...
37 ram[address[12:0]] <= data;
38 odata <= ram[address[12:0]];
49 output reg [7:0] ledout = 0);
51 wire decode = address == 16'hFF51;
53 assign data = (rd && decode) ? odata : 8'bzzzzzzzz;
59 else if (decode && wr)
68 output wire [7:0] leds,
70 output wire [3:0] digits,
71 output wire [7:0] seven);
74 CPUDCM dcm (.CLKIN_IN(xtal), .CLKFX_OUT(clk));
117 UART nouart ( /* no u */
168 always #10 clk <= ~clk;