/***************************** memory *****************************/ include "LIBRARY/memory.lib"; define base = 16, n = 8, m = 2; path clock; path action; path read, write; path load, store; path dataIn[ n ], dataOut[ n ]; path address[ m ]; counter( "clock", 10, 50, base, 1 ) { out clock }; input( "action read 0, write 1", 10, 150, base, 1 ) { out action }; { in action } decode( 1 ) { out write read }; { in clock write } and( 2 ) { out store }; { in clock read } and( 2 ) { out load }; input( "address", 10, 200, base, m ) { out address }; { in store, load, clear, set, dataOut } memory( "value", 10, 250, base, n, 0 ) { out dataIn }; { in load, store, clear, address, dataIn } memoryArray( "memory", 10, 300, base, m, n ) { out dataOut };