X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fexperiment%2Fscore6600.py;h=212653b198714ed7c2291f8ed5152218185ec1c3;hb=3f398ff9e9bd3e27939ec837e0a64dad1a4720cf;hp=4ed9acbd1aa215b05a61046979426ad7bd32bdb8;hpb=cf8a2129f2622c99e28703a9049e697ec83b67f2;p=soc.git diff --git a/src/experiment/score6600.py b/src/experiment/score6600.py index 4ed9acbd..212653b1 100644 --- a/src/experiment/score6600.py +++ b/src/experiment/score6600.py @@ -22,6 +22,44 @@ from copy import deepcopy from math import log +class Memory(Elaboratable): + def __init__(self, regwid, addrw): + self.ddepth = regwid/8 + depth = (1<>self.ddepth] + + def st(self, addr, data): + self.mem[addr>>self.ddepth] = data & ((1<