m-labs / migen

A Python toolbox for building complex digital hardware
https://m-labs.hk/migen
Other
1.23k stars 210 forks source link

Unable to build gateware for Kasli v2.0 #255

Closed rgresia closed 2 years ago

rgresia commented 2 years ago

Building gateware with this command:

python -m demo

Using this code (demo.py):

from migen import * from migen.build.platforms.sinara import kasli

plat = kasli.Platform("v2.0") led = plat.request("user_led") m = Module() counter = Signal(26) m.comb += led.eq(counter[25]) m.sync += counter.eq(counter + 1) plat.build(m)

Error Log:

Traceback (most recent call last): File "/nix/store/5bh6rpya1ar6l49vrhx1rg58dsa42906-python3-3.9.6/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/nix/store/5bh6rpya1ar6l49vrhx1rg58dsa42906-python3-3.9.6/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/rgresia/WRPLL/artiq/demo.py", line 10, in plat.build(m) File "/nix/store/4mr4f2jjqikxhbg79ar3dghbkzc9zaj1-python3-3.9.6-env/lib/python3.9/site-packages/migen/build/xilinx/platform.py", line 59, in build return self.toolchain.build(self, *args, *kwargs) File "/nix/store/4mr4f2jjqikxhbg79ar3dghbkzc9zaj1-python3-3.9.6-env/lib/python3.9/site-packages/migen/build/xilinx/vivado.py", line 209, in build platform.finalize(fragment) File "/nix/store/4mr4f2jjqikxhbg79ar3dghbkzc9zaj1-python3-3.9.6-env/lib/python3.9/site-packages/migen/build/generic_platform.py", line 280, in finalize crg = CRG(self.request(self.default_clk_name)) File "/nix/store/4mr4f2jjqikxhbg79ar3dghbkzc9zaj1-python3-3.9.6-env/lib/python3.9/site-packages/migen/build/generic_platform.py", line 246, in request return self.constraint_manager.request(args, **kwargs) File "/nix/store/4mr4f2jjqikxhbg79ar3dghbkzc9zaj1-python3-3.9.6-env/lib/python3.9/site-packages/migen/build/generic_platform.py", line 165, in request resource = _lookup(self.available, name, number) File "/nix/store/4mr4f2jjqikxhbg79ar3dghbkzc9zaj1-python3-3.9.6-env/lib/python3.9/site-packages/migen/build/generic_platform.py", line 74, in _lookup raise ConstraintError("Resource not found: {}:{}".format(name, number)) migen.build.generic_platform.ConstraintError: Resource not found: clk50:None

sbourdeauducq commented 2 years ago

Kasli 2.0 is clocked through the GTP and needs manual clocking with instantiation and configuration of the specific buffer. The basic Migen infrastructure cannot support this edge case.