From: Clifford Wolf Date: Fri, 16 Jan 2015 14:50:42 +0000 (+0100) Subject: Added cells.lib X-Git-Tag: yosys-0.5~98 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ed4e34380036c63d6177f41f43767b41201e4a8;p=yosys.git Added cells.lib --- diff --git a/techlibs/common/Makefile.inc b/techlibs/common/Makefile.inc index dc1e0ef66..d2ce61cf6 100644 --- a/techlibs/common/Makefile.inc +++ b/techlibs/common/Makefile.inc @@ -15,4 +15,5 @@ $(eval $(call add_share_file,share,techlibs/common/techmap.v)) $(eval $(call add_share_file,share,techlibs/common/blackbox.v)) $(eval $(call add_share_file,share,techlibs/common/pmux2mux.v)) $(eval $(call add_share_file,share,techlibs/common/adff2dff.v)) +$(eval $(call add_share_file,share,techlibs/common/cells.lib)) diff --git a/techlibs/common/cells.lib b/techlibs/common/cells.lib new file mode 100644 index 000000000..eb89036d7 --- /dev/null +++ b/techlibs/common/cells.lib @@ -0,0 +1,108 @@ +library(yosys_cells) { + cell(DFF_N) { + ff(IQ, IQN) { + clocked_on: "!C"; + next_state: "D"; + } + pin(D) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_P) { + ff(IQ, IQN) { + clocked_on: "C"; + next_state: "D"; + } + pin(D) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_NN0) { + ff(IQ, IQN) { + clocked_on: "!C"; + next_state: "D"; + clear: "!R"; + } + pin(D) { direction: input; } + pin(R) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_NN1) { + ff(IQ, IQN) { + clocked_on: "!C"; + next_state: "D"; + preset: "!R"; + } + pin(D) { direction: input; } + pin(R) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_NP0) { + ff(IQ, IQN) { + clocked_on: "!C"; + next_state: "D"; + clear: "R"; + } + pin(D) { direction: input; } + pin(R) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_NP1) { + ff(IQ, IQN) { + clocked_on: "!C"; + next_state: "D"; + preset: "R"; + } + pin(D) { direction: input; } + pin(R) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_PN0) { + ff(IQ, IQN) { + clocked_on: "C"; + next_state: "D"; + clear: "!R"; + } + pin(D) { direction: input; } + pin(R) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_PN1) { + ff(IQ, IQN) { + clocked_on: "C"; + next_state: "D"; + preset: "!R"; + } + pin(D) { direction: input; } + pin(R) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_PP0) { + ff(IQ, IQN) { + clocked_on: "C"; + next_state: "D"; + clear: "R"; + } + pin(D) { direction: input; } + pin(R) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } + cell(DFF_PP1) { + ff(IQ, IQN) { + clocked_on: "C"; + next_state: "D"; + preset: "R"; + } + pin(D) { direction: input; } + pin(R) { direction: input; } + pin(C) { direction: input; clock: true; } + pin(Q) { direction: output; function: "IQ"; } + } +}