home *** CD-ROM | disk | FTP | other *** search
- TITLE NFX780 RAM demonstration
-
- CHIP memory2 NFX780_84
-
- PIN 47 rw ;* read/write control line
- PIN [77:78] a[0:1] ;* address lines
- PIN [48:51] in[0:3] ;* input bus
- PIN [34:37] s[0:3] ;* LED segments
- PIN [39:41] s[4:6] ;* LED segments
- PIN mem[9:0] RAM ;* 128 x 10 RAM
- MODULE leddigit( d[3:0]=mem[3:0], s[0:6]=s[0:6] )
-
- EQUATIONS
- mem.BE = VCC
- mem.WE = /rw
- mem[9:0].TRST = VCC
- mem[1:0].ADDR = a[1:0]
- mem[6:2].ADDR = GND
- mem[3:0].DATA = in[3:0]
- mem[9:4].DATA = GND
-
- SIMULATION
- VECTOR in := [in3,in2,in1,in0]
- VECTOR out := [mem3,mem2,mem1,mem0]
- VECTOR address := [a1,a0]
- TRACE_ON address rw in out
- SETF rw ;* initialize read/write control
- ;* write addresses into NFX780 RAM
- FOR i := 0 TO 3 DO
- BEGIN
- SETF address := i
- SETF in := i
- CLOCKF rw ;* pulse write line low then high
- END
- ;* read stored data from NFX780 RAM
- FOR i := 0 to 3 DO
- BEGIN
- SETF address := i
- END
-