2 * yosys -- Yosys Open SYnthesis Suite
4 * Copyright (C) 2012 Clifford Wolf <clifford@clifford.at>
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 * The internal logic cell simulation library.
22 * This Verilog library contains simple simulation models for the internal
23 * logic cells (_NOT_, _AND_, ...) that are generated by the default technology
24 * mapper (see "stdcells.v" in this directory) and expected by the "abc" pass.
34 module _AND_(A, B, Y);
46 module _XOR_(A, B, Y);
52 module _MUX_(A, B, S, Y);
63 module _DFF_N_(D, Q, C);
66 always @(negedge C) begin
71 module _DFF_P_(D, Q, C);
74 always @(posedge C) begin
79 module _DFF_NN0_(D, Q, C, R);
82 always @(negedge C or negedge R) begin
90 module _DFF_NN1_(D, Q, C, R);
93 always @(negedge C or negedge R) begin
101 module _DFF_NP0_(D, Q, C, R);
104 always @(negedge C or posedge R) begin
112 module _DFF_NP1_(D, Q, C, R);
115 always @(negedge C or posedge R) begin
123 module _DFF_PN0_(D, Q, C, R);
126 always @(posedge C or negedge R) begin
134 module _DFF_PN1_(D, Q, C, R);
137 always @(posedge C or negedge R) begin
145 module _DFF_PP0_(D, Q, C, R);
148 always @(posedge C or posedge R) begin
156 module _DFF_PP1_(D, Q, C, R);
159 always @(posedge C or posedge R) begin