|
module(
4 B5 R7 Q; |) } input [7:0] ADD,
2 d9 d5 E, N& O/ K9 }2 M. N input [7:0] DI,, m' X6 f! W* ^/ N
input CE,
% {6 r9 ?6 f+ W6 @# Q5 D input WE,
& v0 s, k5 E7 P output reg [7:0] DO
$ D+ |) h3 b; s! ^+ `8 h3 }0 R);
4 j ~% a t& X( V X4 N reg [7:0] memory[255:0];
. [, m9 b9 ?2 z, v! V7 u5 Y% w always @(posedge CLK)
' @0 q; H! C; j( k! [) h if(CE & WE) memory[ADD] <= DI;6 g% y4 T- y; A2 Q6 j" H# h% r2 [8 i
always @(posedge CLK)6 ?" w' _/ g/ I, s3 O8 k2 T9 M
DO <= memory[ADD];
# q( W3 R6 C7 H$ Z: X( l! ^$ Hendmodule8 U' a& {* ?$ E
你要注意gata count很大喔。 |
|