ramMatrix function

Generate ram matrices based on ram input