-
I have tried read_verilog A.v; synth_verilog -top A; write_json A.json (edit out all but the top level module in [A-Z].json) read_verilog Top.v; read_json [A-Z].json; synth_xilinx -top Top; write_json Top.json and that synthesizes to a finish, but is it right? How do I do this? Notes: comparing with read_verilog Top.v [A-Z].v; synth_xilinx -top Top; write_json Top.json the modules in the latter output have fewer input and output wires because some can be seen by the synthesis to be not needed in the context in which they are embedded, and the internal variable names are a bit different (locals! I don't think they can collide; can they?), and the "top" attribute has been stripped from the submodules, and that's all I can see as differences. (I would go about 75/25 as a computer scientist that none of that matters, given any slight piece of luck at all, basically because local names don't mean anything in principle and I think those are deliberately constructed to miss other modules' locals, and i don't care about extra dangling wires if we end up with those). Why? One way needs 153GB memory and 110h cpu time, the other needs 52GB memory and 13h cpu time (for final assembly - up till there the components take about 20GB and an hour or less each). So peak memory requirements are way down and that's the biggie. Also failure/mistake along the way doesn't mean go back to Go and start again from zero. Any help/scorn, advice where to find 160GB RAM cheaply? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Unless you use
RTLIL is the best format for saving intermediate state, so the way I would go about experimenting with this is to:
I think that should work, but this is off the top of my head and completely untested. Try it on a much smaller example first! |
Beta Was this translation helpful? Give feedback.
-
@nakengelhardt thank you very much! I have been going through and get to a problem, but my interpretation needs checking. I did this:
It dies with
So it seems I should either not be getting rid of stuff with select, or should be adding it in where needed. I'd be grateful for the lowdown on what the crash dummy here should really have done! Thanks again! |
Beta Was this translation helpful? Give feedback.
-
@nakengelhardt Makefile is attached. Creative commons licence, you are credited, please add more specifics as you prefer.
Does this align with what is expected? PTB PS. Yes, removing the blackbox attribute in the submodule descriptions makes the submodules visible when I do read_json Top.json; stat -tech xilinx, but it just lists them and doesn't see them as a hierarchy (except for the one next-to-top submodule). I think this command could be required in yosys but the select command doesn't find anything but Top to select, which is useless:
What is the proper way to deal with this, if it is indeed a problem? Could connections between submodules be missing? |
Beta Was this translation helpful? Give feedback.
-
@nakengelhardt I now have a properly working process and makefile. I followed your general idea in using the steps listed in help synth_xilinx. (1) i guessed how far to go monolithically (pass 33, just before the map_cells label in the listed program) and I stop there and write the modules out as .il files. (2) Each is then read in individually and processed to the check label in the listed program and written out again. Then (3) they are all read in at once to one monolithic process for running from check label onwards n the listed program and are written as a single .json file. Here is a shell script inline, and I'll attach a Makefile. Please do improve it. I likely took step (1) too far into the standard process and could have broken out earlier. (LC count is a half-percent higher this way so at least I am doing something that has an affect! It's not so bad a loss given the speed-up, provided it is correct). `#! /bin/bash -x 1) monolthic start up to map_cells phase and writes indivdual .ril files.prog="read_verilog *.v; 2) run each module individually through map_cells up to check phase & turning .ril into .ilfor f in *.ril; do 3) put together all the .il monolithically producing .jsonprog="read_rtlil ${top}.il; read_rtlil -nooverwrite Synth*.il" |
Beta Was this translation helpful? Give feedback.
@nakengelhardt I now have a properly working process and makefile. I followed your general idea in using the steps listed in help synth_xilinx. (1) i guessed how far to go monolithically (pass 33, just before the map_cells label in the listed program) and I stop there and write the modules out as .il files. (2) Each is then read in individually and processed to the check label in the listed program and written out again. Then (3) they are all read in at once to one monolithic process for running from check label onwards n the listed program and are written as a single .json file.
Here is a shell script inline, and I'll attach a Makefile. Please do improve it. I likely took step (1) too fa…