cores/dinofly: add initial support.
parent
28becc090c
commit
d611d8c5e1
@ -0,0 +1,13 @@
|
||||
check unique --depth=15 --skip=10
|
||||
check cia --depth=15
|
||||
check gpr --depth=15
|
||||
check causal --depth=15
|
||||
|
||||
check insn:addi --depth=15
|
||||
check insn:addis --depth=15
|
||||
check insn:ori --depth=15
|
||||
check insn:oris --depth=15
|
||||
check insn:xori --depth=15
|
||||
check insn:xoris --depth=15
|
||||
|
||||
build --build-dir=./build
|
@ -0,0 +1,13 @@
|
||||
from pathlib import PurePath
|
||||
from power_fv.session import PowerFVSession
|
||||
|
||||
from .core import DinoflyCore
|
||||
|
||||
|
||||
class DinoflySession(PowerFVSession, core_cls=DinoflyCore):
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PROG = "python -m {}".format(PurePath(__file__).parent.name)
|
||||
DinoflySession().main(prog=PROG)
|
@ -0,0 +1,35 @@
|
||||
from amaranth import *
|
||||
from amaranth.asserts import *
|
||||
|
||||
from dinofly.core import DinoflyCPU
|
||||
|
||||
from power_fv.core import PowerFVCore
|
||||
|
||||
|
||||
__all__ = ["DinoflyWrapper"]
|
||||
|
||||
|
||||
class DinoflyWrapper(Elaboratable):
|
||||
def __init__(self, **kwargs):
|
||||
self._cpu = DinoflyCPU(with_pfv=True)
|
||||
self.pfv = self._cpu.pfv
|
||||
self.ibus = self._cpu.ibus
|
||||
|
||||
def elaborate(self, platform):
|
||||
m = Module()
|
||||
|
||||
m.submodules.cpu = self._cpu
|
||||
|
||||
m.d.comb += [
|
||||
self.ibus.dat_r.eq(AnySeq(self.ibus.data_width)),
|
||||
self.ibus.ack .eq(AnySeq(1)),
|
||||
self.ibus.err .eq(AnySeq(1)),
|
||||
]
|
||||
|
||||
return m
|
||||
|
||||
|
||||
class DinoflyCore(PowerFVCore):
|
||||
@classmethod
|
||||
def wrapper(cls, **kwargs):
|
||||
return DinoflyWrapper(**kwargs)
|
Loading…
Reference in New Issue