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: 5b36f688ea53
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: 939f01cee2eb
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jul 17, 2013

  1. fhdl/tools: BUGFIX: fix group_by_target grouping

    group_by_target does not properly combine target groups if statements
    are presented in the order:
    
     ({A}, statement1)
     ({B}, statement2)
     ({A, B}, statement3)
    
    which returns groups:
    
     ({A, B}, [statement1, statement3])
     ({B}, [statement2])
    
    This patch fixes group_by_target such that the resulting group is:
    
     ({A, B}, [statement1, statement2, statement3])
    davidcarne authored and Sebastien Bourdeauducq committed Jul 17, 2013
    Copy the full SHA
    16ebe41 View commit details
  2. fhdl/tools/group_by_target: remove resort_statements

    Sebastien Bourdeauducq committed Jul 17, 2013
    Copy the full SHA
    939f01c View commit details
Showing with 13 additions and 9 deletions.
  1. +13 −9 migen/fhdl/tools.py
22 changes: 13 additions & 9 deletions migen/fhdl/tools.py
Original file line number Diff line number Diff line change
@@ -52,15 +52,19 @@ def group_by_targets(sl):
groups = []
for statement in flat_iteration(sl):
targets = list_targets(statement)
processed = False
for g in groups:
if not targets.isdisjoint(g[0]):
g[0].update(targets)
g[1].append(statement)
processed = True
break
if not processed:
groups.append((targets, [statement]))

chk_groups = [(targets.isdisjoint(g[0]), g) for g in groups]
merge_groups = [g for dj, g in chk_groups if not dj]
groups = [g for dj, g in chk_groups if dj]

new_group = (set(targets), [])
for g in merge_groups:
new_group[0].update(g[0])
new_group[1].extend(g[1])
new_group[1].append(statement)

groups.append(new_group)

return groups

def list_special_ios(f, ins, outs, inouts):