Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/misoc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c092887f6e01
Choose a base ref
...
head repository: m-labs/misoc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 517c25e4b39e
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 26, 2017

  1. wishbone: style

    sbourdeauducq committed Aug 26, 2017
    Copy the full SHA
    584c73d View commit details
  2. Copy the full SHA
    d49a452 View commit details
  3. Copy the full SHA
    517c25e View commit details
Showing with 14 additions and 2 deletions.
  1. +1 −1 misoc/integration/cpu_interface.py
  2. +12 −0 misoc/interconnect/csr.py
  3. +1 −1 misoc/interconnect/wishbone.py
2 changes: 1 addition & 1 deletion misoc/integration/cpu_interface.py
Original file line number Diff line number Diff line change
@@ -295,6 +295,6 @@ def get_csr_csv(regions):
if not isinstance(obj, Memory):
for csr in obj:
nr = (csr.size + busword - 1)//busword
r += "{}_{},0x{:08x},{},{}\n".format(name, csr.name, origin, nr, "ro" if is_readonly(csr) else "rw")
r += "{}.{},0x{:08x},{},{}\n".format(name, csr.name, origin, nr, "ro" if is_readonly(csr) else "rw")
origin += 4*nr
return r
12 changes: 12 additions & 0 deletions misoc/interconnect/csr.py
Original file line number Diff line number Diff line change
@@ -56,6 +56,9 @@ def read(self):
"""Read method for simulation."""
return self.value.value

def __str__(self):
return "<CSRConstant {}>".format(self.name)


class CSR(_CSRBase):
"""Basic CSR register.
@@ -101,6 +104,9 @@ def write(self, value):
yield
yield self.re.eq(0)

def __str__(self):
return "<CSR {}({})>".format(self.name, self.size)


class _CompoundCSR(_CSRBase, Module):
def __init__(self, size, name):
@@ -166,6 +172,9 @@ def read(self):
"""Read method for simulation."""
return (yield self.status)

def __str__(self):
return "<CSRStatus {}({})>".format(self.name, self.size)


class CSRStorage(_CompoundCSR):
"""Control Register.
@@ -273,6 +282,9 @@ def write(self, value):
yield
yield self.re.eq(0)

def __str__(self):
return "<CSRStorage {}({})>".format(self.name, self.size)


def csrprefix(prefix, csrs, done):
for csr in csrs:
2 changes: 1 addition & 1 deletion misoc/interconnect/wishbone.py
Original file line number Diff line number Diff line change
@@ -647,7 +647,7 @@ def __init__(self, mem_or_size, read_only=None, init=None, bus=None):
# generate ack
self.sync += [
self.bus.ack.eq(0),
If(self.bus.cyc & self.bus.stb & ~self.bus.ack, self.bus.ack.eq(1))
If(self.bus.cyc & self.bus.stb & ~self.bus.ack, self.bus.ack.eq(1))
]