X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fexperiment%2Fscore6600.py;h=212653b198714ed7c2291f8ed5152218185ec1c3;hb=3f398ff9e9bd3e27939ec837e0a64dad1a4720cf;hp=04a815c0a2ef409365e3265a780f9e36102b3bef;hpb=da51e08cf95b9de02c95953f5b56f5392aeeca29;p=soc.git diff --git a/src/experiment/score6600.py b/src/experiment/score6600.py index 04a815c0..212653b1 100644 --- a/src/experiment/score6600.py +++ b/src/experiment/score6600.py @@ -9,14 +9,55 @@ from scoreboard.global_pending import GlobalPending from scoreboard.group_picker import GroupPicker from scoreboard.issue_unit import IssueUnitGroup, IssueUnitArray, RegDecode from scoreboard.shadow import ShadowMatrix, BranchSpeculationRecord +from scoreboard.instruction_q import Instruction, InstructionQ from compalu import ComputationUnitNoDelay from alu_hier import ALU, BranchALU from nmutil.latch import SRLatch +from nmutil.nmoperator import eq from random import randint, seed 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<