mirror of https://github.com/YosysHQ/yosys.git
Merge ec54c36850 into b864f70e52
This commit is contained in:
commit
665e695e3a
|
|
@ -694,6 +694,8 @@ struct DfflibmapPass : public Pass {
|
||||||
for (auto it : cell_mappings)
|
for (auto it : cell_mappings)
|
||||||
dfflegalize_cmd += stringf(" -cell %s 01", it.first);
|
dfflegalize_cmd += stringf(" -cell %s 01", it.first);
|
||||||
dfflegalize_cmd += " t:$_DFF* t:$_SDFF*";
|
dfflegalize_cmd += " t:$_DFF* t:$_SDFF*";
|
||||||
|
for (auto module : design->selected_modules())
|
||||||
|
dfflegalize_cmd += " " + module -> name.str();
|
||||||
if (info_mode) {
|
if (info_mode) {
|
||||||
log("dfflegalize command line: %s\n", dfflegalize_cmd);
|
log("dfflegalize command line: %s\n", dfflegalize_cmd);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -97,3 +97,14 @@ select -assert-count 1 t:dffe
|
||||||
# but we have to invert it because the CLEAR pin is active low.
|
# but we have to invert it because the CLEAR pin is active low.
|
||||||
# ff2.CLEAR = !R
|
# ff2.CLEAR = !R
|
||||||
select -assert-count 1 c:ff2 %x:+[CLEAR] %ci t:$_NOT_ %i
|
select -assert-count 1 c:ff2 %x:+[CLEAR] %ci t:$_NOT_ %i
|
||||||
|
|
||||||
|
# Test that dfflibmap respects selection and doesn't run dfflegalize on unselected modules
|
||||||
|
design -load orig
|
||||||
|
copy top top_unmapped
|
||||||
|
dfflibmap -liberty dfflibmap.lib top
|
||||||
|
# top should be mapped
|
||||||
|
select -module top -assert-count 1 t:dffn
|
||||||
|
# top_unmapped should have no mapped cells
|
||||||
|
select -module top_unmapped -assert-none t:dffn
|
||||||
|
select -module top_unmapped -assert-none t:dffe
|
||||||
|
select -module top_unmapped -assert-none t:dffsr
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue