Use new 'specials' API

This commit is contained in:
Sebastien Bourdeauducq 2013-02-24 13:07:25 +01:00
parent a22ada36d7
commit 0caac2246d
5 changed files with 11 additions and 8 deletions

View File

@ -1,4 +1,5 @@
from migen.fhdl.structure import *
from migen.fhdl.specials import Instance
from migen.flow.actor import *
from migen.flow.network import *
from migen.flow.transactions import *
@ -155,7 +156,7 @@ class FIFO(Actor):
self.busy.eq(0)
],
instances=[asfifo])
specials={asfifo})
def sim_fifo_gen():
while True:

View File

@ -1,4 +1,5 @@
from migen.fhdl.structure import *
from migen.fhdl.specials import Instance
from migen.bus import wishbone
class LM32:
@ -49,4 +50,4 @@ class LM32:
self.ibus.adr.eq(self._i_adr_o[2:]),
self.dbus.adr.eq(self._d_adr_o[2:])
]
return Fragment(comb=comb, instances=[self._inst])
return Fragment(comb, specials={self._inst})

View File

@ -1,6 +1,7 @@
from fractions import Fraction
from migen.fhdl.structure import *
from migen.fhdl.specials import Instance
from mibuild.crg import CRG
class M1CRG(CRG):
@ -58,4 +59,4 @@ class M1CRG(CRG):
self._inst = Instance("m1crg", *inst_items)
def get_fragment(self):
return Fragment(instances=[self._inst])
return Fragment(specials={self._inst})

View File

@ -1,4 +1,5 @@
from migen.fhdl.structure import *
from migen.fhdl.specials import Instance
from migen.bank.description import *
from migen.bank.eventmanager import *
from migen.bank import csrgen
@ -59,8 +60,7 @@ class MiniMAC:
rx_pending_0_r.eq(rx_pending_0),
rx_pending_1_r.eq(rx_pending_1)
]
inst = [
Instance("minimac3",
inst = Instance("minimac3",
Instance.ClockPort("sys_clk"),
Instance.ResetPort("sys_rst"),
@ -94,7 +94,6 @@ class MiniMAC:
Instance.Input("phy_rx_er", self.phy_rx_er),
Instance.Input("phy_col", self.phy_col),
Instance.Input("phy_crs", self.phy_crs))
]
return Fragment(comb, sync, instances=inst) \
return Fragment(comb, sync, specials={inst}) \
+ self.events.get_fragment() \
+ self.bank.get_fragment()

View File

@ -1,4 +1,5 @@
from migen.fhdl.structure import *
from migen.fhdl.specials import Instance
from migen.bus import dfi
class S6DDRPHY:
@ -41,4 +42,4 @@ class S6DDRPHY:
self._inst = Instance("s6ddrphy", *inst_items)
def get_fragment(self):
return Fragment(instances=[self._inst])
return Fragment(specials={self._inst})