How is it in handling say 50% code written in pure verilog, and 50% code handled by migen? Ditto for mixed verilog + vhdl. Because ideally you'd want to be able to mix & match. Say you want to use a PLL core from coregen, plus have some old already proven modules.
You can instantiate arbitrary Verilog modules (and VHDL too I think) easily. I almost did that with an external .v for our PLL, but I ended up instantiating the primitive straight from migen (
here).
Mmmh, might be interesting to just give it a try. Any good examples to be found besides the stuff provided with the download? As in, any magic places on the internet to find extra resources for it? Because that might be one other issue with using it, tiny userbase.
Well, yeah, the documentation is... not comprehensive and somewhat outdated. I definitely wouldn't suggest it if you can't deal with that
. But I'm happy to work things out myself considering the good parts of migen that I've seen so far. Anyway, reasonable examples are probably our stuff and the canonical project that migen was developed for, milkymist-ng. I hope it matures a bit and becomes better documented with time.
Generate an array of modules, and then generate constraints for those as well. Generate constraints, purely based on source file I mean. Mostly LOC's, but sometimes moderately creative ROUTE constraints as well. I have a solution for that, but sometimes it's not very pretty (nor maintainable).
I'm not sure if there's a built-in way to fire off constraints to the UCF file from a module, but it should be trivial to implement yourself; just keep an array of modules that need constraints and then read it off in the platform's do_finalize method to generate the UCF. You could even use the module walking stuff in migen to make it automagic (e.g. for every module instance in use, check for a magic property/method and generate UCF from that).
I do some trivial UCF generation (clock period constraints) in ov3
here.
The beauty is that since it's python, it's really hard to come up with something that you *can't* do (migen may or may not do it off the shelf, but you can always implement it yourself in whatever way you deem reasonable).