X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fexperiment%2Fscore6600.py;h=ccb26c1c516ad5b24391e440a954a8e0bb3c0c7b;hb=cdfffd55cf53cd4a18ffadedb927129393abf089;hp=d9144826c73ee3408152833088efb0f1f3006419;hpb=5f82e9d7705c06d5ac1db3568024e4e6bd6a71b6;p=soc.git diff --git a/src/experiment/score6600.py b/src/experiment/score6600.py index d9144826..ccb26c1c 100644 --- a/src/experiment/score6600.py +++ b/src/experiment/score6600.py @@ -1,6 +1,6 @@ from nmigen.compat.sim import run_simulation from nmigen.cli import verilog, rtlil -from nmigen import Module, Const, Signal, Array, Cat, Elaboratable +from nmigen import Module, Const, Signal, Array, Cat, Elaboratable, Memory from regfile.regfile import RegFileArray, treereduce from scoreboard.fu_fu_matrix import FUFUDepMatrix @@ -9,14 +9,57 @@ 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 scoreboard.memfu import MemFunctionUnits from compalu import ComputationUnitNoDelay +from compldst import LDSTCompUnit 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 TestMemory(Elaboratable): + def __init__(self, regwid, addrw): + self.ddepth = 1 # regwid //8 + depth = (1<>self.ddepth] + + def st(self, addr, data): + self.mem[addr>>self.ddepth] = data & ((1<