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/migen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6ffffd6712c4
Choose a base ref
...
head repository: m-labs/migen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d98502c6a633
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 11, 2016

  1. verilog: stable attr ordering

    jordens committed Nov 11, 2016
    3
    Copy the full SHA
    58126e0 View commit details
  2. Copy the full SHA
    d98502c View commit details
Showing with 5 additions and 5 deletions.
  1. +4 −4 migen/fhdl/specials.py
  2. +1 −1 migen/fhdl/verilog.py
8 changes: 4 additions & 4 deletions migen/fhdl/specials.py
Original file line number Diff line number Diff line change
@@ -282,7 +282,7 @@ def gn(e):
data_regs = {}
for port in memory.ports:
if not port.async_read:
if port.mode == WRITE_FIRST and port.we is not None:
if port.mode == WRITE_FIRST:
adr_reg = Signal(name_override="memadr")
r += "reg [" + str(adrbits-1) + ":0] " \
+ gn(adr_reg) + ";\n"
@@ -308,11 +308,11 @@ def gn(e):
r += "\tif (" + gn(port.we) + ")\n"
r += "\t\t" + gn(memory) + "[" + gn(port.adr) + "] <= " + gn(port.dat_w) + ";\n"
if not port.async_read:
if port.mode == WRITE_FIRST and port.we is not None:
if port.mode == WRITE_FIRST:
rd = "\t" + gn(adr_regs[id(port)]) + " <= " + gn(port.adr) + ";\n"
else:
bassign = gn(data_regs[id(port)]) + " <= " + gn(memory) + "[" + gn(port.adr) + "];\n"
if port.mode == READ_FIRST or port.we is None:
if port.mode == READ_FIRST:
rd = "\t" + bassign
elif port.mode == NO_CHANGE:
rd = "\tif (!" + gn(port.we) + ")\n" \
@@ -328,7 +328,7 @@ def gn(e):
if port.async_read:
r += "assign " + gn(port.dat_r) + " = " + gn(memory) + "[" + gn(port.adr) + "];\n"
else:
if port.mode == WRITE_FIRST and port.we is not None:
if port.mode == WRITE_FIRST:
r += "assign " + gn(port.dat_r) + " = " + gn(memory) + "[" + gn(adr_regs[id(port)]) + "];\n"
else:
r += "assign " + gn(port.dat_r) + " = " + gn(data_regs[id(port)]) + ";\n"
2 changes: 1 addition & 1 deletion migen/fhdl/verilog.py
Original file line number Diff line number Diff line change
@@ -168,7 +168,7 @@ def _list_comb_wires(f):
def _printattr(sig, attr_translate):
r = ""
firsta = True
for attr in sig.attr:
for attr in sorted(sig.attr):
if isinstance(attr, tuple):
# platform-dependent attribute
attr_name, attr_value = attr