From Python to silicon

from myhdl import *
def RAM(dout, din, addr, we, clk, WORD_SZ=8, DEPTH=16384):
    mem = [Signal(intbv(0)[WORD_SZ:]) for i in range(DEPTH)]
    def write():
        if we:
            mem[int(addr)].next = din
    def read(): = mem[int(addr)]
    return write, read
users/cfelton/projects/zpu_iram.txt · Last modified: 2010/01/14 04:07 by cfelton
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki