|
module(# ^& H0 v: R6 P7 n3 L+ a$ ~; f# l
input [7:0] ADD,! J- F, p. t% F- F$ K4 v' P
input [7:0] DI,0 t3 g! D3 i; {) L. j9 g
input CE,' z1 l- X5 D+ D* v6 O
input WE,
, }$ `( Y8 u- h* t) p. t output reg [7:0] DO
$ n1 J: h) Y2 C# d; Z/ ^8 ]);
6 L5 `9 P4 T, x! r j reg [7:0] memory[255:0];" V7 V3 B5 @% o" a
always @(posedge CLK)& `8 A# C; b7 @1 p' h
if(CE & WE) memory[ADD] <= DI;
! v" o. m4 P- C% R always @(posedge CLK)
/ b: I" J3 d2 D' L# ?; M* y. o DO <= memory[ADD];
9 p, X2 ?; x3 u" u3 b8 j8 H9 h3 wendmodule
* T# g$ W# V, c/ M4 _你要注意gata count很大喔。 |
|