Skip to content

Instantly share code, notes, and snippets.

from random import randint
from myhdl import *
def m_2dlos(clock, reset, x, y, Nrows=4, Mcols=8):
mem2d = [[Signal(intbv(randint(1, 7689), min=0, max=7690))
for col in range(Mcols)]
for row in range(Nrows)]
rcnt = Signal(modbv(0, min=0, max=4))
ccnt = Signal(modbv(0, min=0, max=8))