commit
4592e3235b
|
@ -43,12 +43,12 @@ class EndpointDescription:
|
||||||
|
|
||||||
|
|
||||||
class Endpoint(Record):
|
class Endpoint(Record):
|
||||||
def __init__(self, description_or_layout):
|
def __init__(self, description_or_layout, name=None, **kwargs):
|
||||||
if isinstance(description_or_layout, EndpointDescription):
|
if isinstance(description_or_layout, EndpointDescription):
|
||||||
self.description = description_or_layout
|
self.description = description_or_layout
|
||||||
else:
|
else:
|
||||||
self.description = EndpointDescription(description_or_layout)
|
self.description = EndpointDescription(description_or_layout)
|
||||||
Record.__init__(self, self.description.get_full_layout())
|
Record.__init__(self, self.description.get_full_layout(), name, **kwargs)
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -651,7 +651,7 @@ class SRAM(Module):
|
||||||
# generate write enable signal
|
# generate write enable signal
|
||||||
if not read_only:
|
if not read_only:
|
||||||
self.comb += [port.we[i].eq(self.bus.cyc & self.bus.stb & self.bus.we & self.bus.sel[i])
|
self.comb += [port.we[i].eq(self.bus.cyc & self.bus.stb & self.bus.we & self.bus.sel[i])
|
||||||
for i in range(4)]
|
for i in range(bus_data_width//8)]
|
||||||
# address and data
|
# address and data
|
||||||
self.comb += [
|
self.comb += [
|
||||||
port.adr.eq(self.bus.adr[:len(port.adr)]),
|
port.adr.eq(self.bus.adr[:len(port.adr)]),
|
||||||
|
|
Loading…
Reference in New Issue