aboutsummaryrefslogtreecommitdiffstats
path: root/tests/techmap/dfflibmap.lib
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2020-07-02 18:22:43 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2020-07-09 18:51:03 +0200
commit7ed9d189079135ef53e8a19a5e3a38e240994103 (patch)
treee16e3a1c9a3593c62b8ab26e1ba020fdb7542bc8 /tests/techmap/dfflibmap.lib
parent68babb2ae4cf86e099f28ada45f7e86b37405a4c (diff)
downloadyosys-7ed9d189079135ef53e8a19a5e3a38e240994103.tar.gz
yosys-7ed9d189079135ef53e8a19a5e3a38e240994103.tar.bz2
yosys-7ed9d189079135ef53e8a19a5e3a38e240994103.zip
dfflibmap: Refactor to use dfflegalize internally.
Diffstat (limited to 'tests/techmap/dfflibmap.lib')
-rw-r--r--tests/techmap/dfflibmap.lib55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/techmap/dfflibmap.lib b/tests/techmap/dfflibmap.lib
new file mode 100644
index 000000000..ce460877e
--- /dev/null
+++ b/tests/techmap/dfflibmap.lib
@@ -0,0 +1,55 @@
+library(test) {
+ /* D-type flip-flop with asynchronous reset and preset */
+ cell (dffn) {
+ area : 6;
+ ff("IQ", "IQN") {
+ next_state : "D";
+ clocked_on : "!CLK";
+ }
+ pin(D) {
+ direction : input;
+ }
+ pin(CLK) {
+ direction : input;
+ }
+ pin(Q) {
+ direction: output;
+ function : "IQ";
+ }
+ pin(QN) {
+ direction: output;
+ function : "IQN";
+ }
+ }
+ cell (dffsr) {
+ area : 6;
+ ff("IQ", "IQN") {
+ next_state : "D";
+ clocked_on : "CLK";
+ clear : "CLEAR";
+ preset : "PRESET";
+ clear_preset_var1 : L;
+ clear_preset_var2 : L;
+ }
+ pin(D) {
+ direction : input;
+ }
+ pin(CLK) {
+ direction : input;
+ }
+ pin(CLEAR) {
+ direction : input;
+ }
+ pin(PRESET) {
+ direction : input;
+ }
+ pin(Q) {
+ direction: output;
+ function : "IQ";
+ }
+ pin(QN) {
+ direction: output;
+ function : "IQN";
+ }
+ }
+}