Rev 398 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 398 | Rev 425 | ||
---|---|---|---|
Line 50... | Line 50... | ||
50 | input [10:0] rdaddress; |
50 | input [10:0] rdaddress; |
51 | input rden; |
51 | input rden; |
52 | input [10:0] wraddress; |
52 | input [10:0] wraddress; |
53 | input wren; |
53 | input wren; |
54 | output [7:0] q; |
54 | output [7:0] q; |
55 | - | ||
- | 55 | `ifndef MODEL_TECH |
|
56 | wire [7:0] sub_wire0; |
56 | wire [7:0] sub_wire0; |
57 | wire [7:0] q = sub_wire0[7:0]; |
57 | wire [7:0] q = sub_wire0[7:0]; |
58 | 58 | ||
59 | altdpram altdpram_component ( |
59 | altdpram altdpram_component ( |
60 | .wren (wren), |
60 | .wren (wren), |
Line 87... | Line 87... | ||
87 | altdpram_component.widthad = 11, |
87 | altdpram_component.widthad = 11, |
88 | altdpram_component.wraddress_aclr = "OFF", |
88 | altdpram_component.wraddress_aclr = "OFF", |
89 | altdpram_component.wraddress_reg = "INCLOCK", |
89 | altdpram_component.wraddress_reg = "INCLOCK", |
90 | altdpram_component.wrcontrol_aclr = "OFF", |
90 | altdpram_component.wrcontrol_aclr = "OFF", |
91 | altdpram_component.wrcontrol_reg = "INCLOCK"; |
91 | altdpram_component.wrcontrol_reg = "INCLOCK"; |
- | 92 | `else |
|
- | 93 | reg [7:0] q; |
|
- | 94 | ||
- | 95 | integer fd; |
|
- | 96 | ||
- | 97 | reg [7:0] font [0:2047]; |
|
- | 98 | ||
- | 99 | initial |
|
- | 100 | begin |
|
- | 101 | fd = $fopen("../video/atm.fnt","rb"); |
|
- | 102 | ||
- | 103 | if( 2048!=$fread(font,fd) ) |
|
- | 104 | begin |
|
- | 105 | $display("Couldn't load atm.fnt!\n"); |
|
- | 106 | $stop; |
|
- | 107 | end |
|
- | 108 | ||
- | 109 | $fclose(fd); |
|
- | 110 | end |
|
- | 111 | ||
- | 112 | always @(posedge clock) |
|
- | 113 | if( wren ) |
|
- | 114 | font[wraddress] <= data; |
|
- | 115 | ||
- | 116 | always @(posedge clock) |
|
- | 117 | if( rden ) |
|
- | 118 | q <= font[rdaddress]; |
|
92 | 119 | ||
- | 120 | `endif |
|
93 | 121 | ||
94 | endmodule |
122 | endmodule |
95 | 123 | ||
96 | // ============================================================ |
124 | // ============================================================ |
97 | // CNX file retrieval info |
125 | // CNX file retrieval info |