diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-05-06 23:02:37 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-05-06 23:02:37 +0200 |
commit | 6fe3d5a1cf938081110db0470def2b2687dd665f (patch) | |
tree | 16803fc7b1fd542af0e338c127e199515d0c7eb8 /techlibs | |
parent | d10dfccabb6bf4b1ba3f334b899f57093b8a0ddc (diff) | |
download | yosys-6fe3d5a1cf938081110db0470def2b2687dd665f.tar.gz yosys-6fe3d5a1cf938081110db0470def2b2687dd665f.tar.bz2 yosys-6fe3d5a1cf938081110db0470def2b2687dd665f.zip |
Added synth_ice40 support for latches via logic loops
Diffstat (limited to 'techlibs')
-rw-r--r-- | techlibs/ice40/Makefile.inc | 1 | ||||
-rw-r--r-- | techlibs/ice40/latches_map.v | 11 | ||||
-rw-r--r-- | techlibs/ice40/synth_ice40.cc | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/techlibs/ice40/Makefile.inc b/techlibs/ice40/Makefile.inc index 83009d176..14761c6c8 100644 --- a/techlibs/ice40/Makefile.inc +++ b/techlibs/ice40/Makefile.inc @@ -23,6 +23,7 @@ techlibs/ice40/brams_init3.vh: techlibs/ice40/brams_init.mk $(eval $(call add_share_file,share/ice40,techlibs/ice40/arith_map.v)) $(eval $(call add_share_file,share/ice40,techlibs/ice40/cells_map.v)) $(eval $(call add_share_file,share/ice40,techlibs/ice40/cells_sim.v)) +$(eval $(call add_share_file,share/ice40,techlibs/ice40/latches_map.v)) $(eval $(call add_share_file,share/ice40,techlibs/ice40/brams.txt)) $(eval $(call add_share_file,share/ice40,techlibs/ice40/brams_map.v)) diff --git a/techlibs/ice40/latches_map.v b/techlibs/ice40/latches_map.v new file mode 100644 index 000000000..c28f88cf7 --- /dev/null +++ b/techlibs/ice40/latches_map.v @@ -0,0 +1,11 @@ +module \$_DLATCH_N_ (E, D, Q); + wire [1023:0] _TECHMAP_DO_ = "simplemap; opt"; + input E, D; + output Q = !E ? D : Q; +endmodule + +module \$_DLATCH_P_ (E, D, Q); + wire [1023:0] _TECHMAP_DO_ = "simplemap; opt"; + input E, D; + output Q = E ? D : Q; +endmodule diff --git a/techlibs/ice40/synth_ice40.cc b/techlibs/ice40/synth_ice40.cc index cadf3b038..0134c13c1 100644 --- a/techlibs/ice40/synth_ice40.cc +++ b/techlibs/ice40/synth_ice40.cc @@ -214,6 +214,7 @@ struct SynthIce40Pass : public ScriptPass run("abc", " (only if -abc2)"); run("ice40_opt", "(only if -abc2)"); } + run("techmap -map +/ice40/latches_map.v"); run("abc -lut 4"); run("clean"); } |