From 3ed4e34380036c63d6177f41f43767b41201e4a8 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 16 Jan 2015 15:50:42 +0100 Subject: [PATCH] Added cells.lib --- techlibs/common/Makefile.inc | 1 + techlibs/common/cells.lib | 108 +++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 techlibs/common/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"; } + } +} -- 2.30.2