blob: 549ddc07acb7f694269d0e41edcab72dc7e3cc1a [file] [log] [blame]
// type: XOR2
`timescale 1ns/10ps
`celldefine
module sky130_osu_sc_XOR2XL (Y, A, B);
output Y;
input A, B;
// Function
wire A__bar, int_fwire_enable;
not (A__bar, A);
and (int_fwire_enable, A__bar, B);
bufif0 (Y, 1'b1, int_fwire_enable);
// Timing
specify
(A => Y) = 0;
ifnone (posedge A => (Y-:1'b0)) = 0;
(negedge A => (Y:1)) = 0;
ifnone (negedge B => (Y+:1'b0)) = 0;
(B => Y) = 0;
(posedge B => (Y:1)) = 0;
endspecify
endmodule
`endcelldefine
`ifdef _udp_def_altos_latch_
`else
`define _udp_def_altos_latch_
primitive altos_latch (q, v, clk, d);
output q;
reg q;
input v, clk, d;
table
* ? ? : ? : x;
? 1 0 : ? : 0;
? 1 1 : ? : 1;
? x 0 : 0 : -;
? x 1 : 1 : -;
? 0 ? : ? : -;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_err_
`else
`define _udp_def_altos_dff_err_
primitive altos_dff_err (q, clk, d);
output q;
reg q;
input clk, d;
table
(0x) ? : ? : 0;
(1x) ? : ? : 1;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_
`else
`define _udp_def_altos_dff_
primitive altos_dff (q, v, clk, d, xcr);
output q;
reg q;
input v, clk, d, xcr;
table
* ? ? ? : ? : x;
? (x1) 0 0 : ? : 0;
? (x1) 1 0 : ? : 1;
? (x1) 0 1 : 0 : 0;
? (x1) 1 1 : 1 : 1;
? (x1) ? x : ? : -;
? (bx) 0 ? : 0 : -;
? (bx) 1 ? : 1 : -;
? (x0) b ? : ? : -;
? (x0) ? x : ? : -;
? (01) 0 ? : ? : 0;
? (01) 1 ? : ? : 1;
? (10) ? ? : ? : -;
? b * ? : ? : -;
? ? ? * : ? : -;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_r_err_
`else
`define _udp_def_altos_dff_r_err_
primitive altos_dff_r_err (q, clk, d, r);
output q;
reg q;
input clk, d, r;
table
? 0 (0x) : ? : -;
? 0 (x0) : ? : -;
(0x) ? 0 : ? : 0;
(0x) 0 x : ? : 0;
(1x) ? 0 : ? : 1;
(1x) 0 x : ? : 1;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_r_
`else
`define _udp_def_altos_dff_r_
primitive altos_dff_r (q, v, clk, d, r, xcr);
output q;
reg q;
input v, clk, d, r, xcr;
table
* ? ? ? ? : ? : x;
? ? ? 1 ? : ? : 0;
? b ? (1?) ? : 0 : -;
? x 0 (1?) ? : 0 : -;
? ? ? (10) ? : ? : -;
? ? ? (x0) ? : ? : -;
? ? ? (0x) ? : 0 : -;
? (x1) 0 ? 0 : ? : 0;
? (x1) 1 0 0 : ? : 1;
? (x1) 0 ? 1 : 0 : 0;
? (x1) 1 0 1 : 1 : 1;
? (x1) ? ? x : ? : -;
? (bx) 0 ? ? : 0 : -;
? (bx) 1 0 ? : 1 : -;
? (x0) 0 ? ? : ? : -;
? (x0) 1 0 ? : ? : -;
? (x0) ? 0 x : ? : -;
? (01) 0 ? ? : ? : 0;
? (01) 1 0 ? : ? : 1;
? (10) ? ? ? : ? : -;
? b * ? ? : ? : -;
? ? ? ? * : ? : -;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_s_err_
`else
`define _udp_def_altos_dff_s_err_
primitive altos_dff_s_err (q, clk, d, s);
output q;
reg q;
input clk, d, s;
table
? 1 (0x) : ? : -;
? 1 (x0) : ? : -;
(0x) ? 0 : ? : 0;
(0x) 1 x : ? : 0;
(1x) ? 0 : ? : 1;
(1x) 1 x : ? : 1;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_s_
`else
`define _udp_def_altos_dff_s_
primitive altos_dff_s (q, v, clk, d, s, xcr);
output q;
reg q;
input v, clk, d, s, xcr;
table
* ? ? ? ? : ? : x;
? ? ? 1 ? : ? : 1;
? b ? (1?) ? : 1 : -;
? x 1 (1?) ? : 1 : -;
? ? ? (10) ? : ? : -;
? ? ? (x0) ? : ? : -;
? ? ? (0x) ? : 1 : -;
? (x1) 0 0 0 : ? : 0;
? (x1) 1 ? 0 : ? : 1;
? (x1) 1 ? 1 : 1 : 1;
? (x1) 0 0 1 : 0 : 0;
? (x1) ? ? x : ? : -;
? (bx) 1 ? ? : 1 : -;
? (bx) 0 0 ? : 0 : -;
? (x0) 1 ? ? : ? : -;
? (x0) 0 0 ? : ? : -;
? (x0) ? 0 x : ? : -;
? (01) 1 ? ? : ? : 1;
? (01) 0 0 ? : ? : 0;
? (10) ? ? ? : ? : -;
? b * ? ? : ? : -;
? ? ? ? * : ? : -;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_sr_err_
`else
`define _udp_def_altos_dff_sr_err_
primitive altos_dff_sr_err (q, clk, d, s, r);
output q;
reg q;
input clk, d, s, r;
table
? 1 (0x) ? : ? : -;
? 0 ? (0x) : ? : -;
? 0 ? (x0) : ? : -;
(0x) ? 0 0 : ? : 0;
(0x) 1 x 0 : ? : 0;
(0x) 0 0 x : ? : 0;
(1x) ? 0 0 : ? : 1;
(1x) 1 x 0 : ? : 1;
(1x) 0 0 x : ? : 1;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_sr_0
`else
`define _udp_def_altos_dff_sr_0
primitive altos_dff_sr_0 (q, v, clk, d, s, r, xcr);
output q;
reg q;
input v, clk, d, s, r, xcr;
table
// v, clk, d, s, r : q' : q;
* ? ? ? ? ? : ? : x;
? ? ? ? 1 ? : ? : 0;
? ? ? 1 0 ? : ? : 1;
? b ? (1?) 0 ? : 1 : -;
? x 1 (1?) 0 ? : 1 : -;
? ? ? (10) 0 ? : ? : -;
? ? ? (x0) 0 ? : ? : -;
? ? ? (0x) 0 ? : 1 : -;
? b ? 0 (1?) ? : 0 : -;
? x 0 0 (1?) ? : 0 : -;
? ? ? 0 (10) ? : ? : -;
? ? ? 0 (x0) ? : ? : -;
? ? ? 0 (0x) ? : 0 : -;
? (x1) 0 0 ? 0 : ? : 0;
? (x1) 1 ? 0 0 : ? : 1;
? (x1) 0 0 ? 1 : 0 : 0;
? (x1) 1 ? 0 1 : 1 : 1;
? (x1) ? ? 0 x : ? : -;
? (x1) ? 0 ? x : ? : -;
? (1x) 0 0 ? ? : 0 : -;
? (1x) 1 ? 0 ? : 1 : -;
? (x0) 0 0 ? ? : ? : -;
? (x0) 1 ? 0 ? : ? : -;
? (x0) ? 0 0 x : ? : -;
? (0x) 0 0 ? ? : 0 : -;
? (0x) 1 ? 0 ? : 1 : -;
? (01) 0 0 ? ? : ? : 0;
? (01) 1 ? 0 ? : ? : 1;
? (10) ? 0 ? ? : ? : -;
? (10) ? ? 0 ? : ? : -;
? b * 0 ? ? : ? : -;
? b * ? 0 ? : ? : -;
? ? ? ? ? * : ? : -;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_dff_sr_1
`else
`define _udp_def_altos_dff_sr_1
primitive altos_dff_sr_1 (q, v, clk, d, s, r, xcr);
output q;
reg q;
input v, clk, d, s, r, xcr;
table
// v, clk, d, s, r : q' : q;
* ? ? ? ? ? : ? : x;
? ? ? 0 1 ? : ? : 0;
? ? ? 1 ? ? : ? : 1;
? b ? (1?) 0 ? : 1 : -;
? x 1 (1?) 0 ? : 1 : -;
? ? ? (10) 0 ? : ? : -;
? ? ? (x0) 0 ? : ? : -;
? ? ? (0x) 0 ? : 1 : -;
? b ? 0 (1?) ? : 0 : -;
? x 0 0 (1?) ? : 0 : -;
? ? ? 0 (10) ? : ? : -;
? ? ? 0 (x0) ? : ? : -;
? ? ? 0 (0x) ? : 0 : -;
? (x1) 0 0 ? 0 : ? : 0;
? (x1) 1 ? 0 0 : ? : 1;
? (x1) 0 0 ? 1 : 0 : 0;
? (x1) 1 ? 0 1 : 1 : 1;
? (x1) ? ? 0 x : ? : -;
? (x1) ? 0 ? x : ? : -;
? (1x) 0 0 ? ? : 0 : -;
? (1x) 1 ? 0 ? : 1 : -;
? (x0) 0 0 ? ? : ? : -;
? (x0) 1 ? 0 ? : ? : -;
? (x0) ? 0 0 x : ? : -;
? (0x) 0 0 ? ? : 0 : -;
? (0x) 1 ? 0 ? : 1 : -;
? (01) 0 0 ? ? : ? : 0;
? (01) 1 ? 0 ? : ? : 1;
? (10) ? 0 ? ? : ? : -;
? (10) ? ? 0 ? : ? : -;
? b * 0 ? ? : ? : -;
? b * ? 0 ? : ? : -;
? ? ? ? ? * : ? : -;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_latch_r_
`else
`define _udp_def_altos_latch_r_
primitive altos_latch_r (q, v, clk, d, r);
output q;
reg q;
input v, clk, d, r;
table
* ? ? ? : ? : x;
? ? ? 1 : ? : 0;
? 0 ? 0 : ? : -;
? 0 ? x : 0 : -;
? 1 0 0 : ? : 0;
? 1 0 x : ? : 0;
? 1 1 0 : ? : 1;
? x 0 0 : 0 : -;
? x 0 x : 0 : -;
? x 1 0 : 1 : -;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_latch_s_
`else
`define _udp_def_altos_latch_s_
primitive altos_latch_s (q, v, clk, d, s);
output q;
reg q;
input v, clk, d, s;
table
* ? ? ? : ? : x;
? ? ? 1 : ? : 1;
? 0 ? 0 : ? : -;
? 0 ? x : 1 : -;
? 1 1 0 : ? : 1;
? 1 1 x : ? : 1;
? 1 0 0 : ? : 0;
? x 1 0 : 1 : -;
? x 1 x : 1 : -;
? x 0 0 : 0 : -;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_latch_sr_0
`else
`define _udp_def_altos_latch_sr_0
primitive altos_latch_sr_0 (q, v, clk, d, s, r);
output q;
reg q;
input v, clk, d, s, r;
table
* ? ? ? ? : ? : x;
? 1 1 ? 0 : ? : 1;
? 1 0 0 ? : ? : 0;
? ? ? 1 0 : ? : 1;
? ? ? ? 1 : ? : 0;
? 0 * ? ? : ? : -;
? 0 ? * 0 : 1 : 1;
? 0 ? 0 * : 0 : 0;
? * 1 ? 0 : 1 : 1;
? * 0 0 ? : 0 : 0;
? ? 1 * 0 : 1 : 1;
? ? 0 0 * : 0 : 0;
endtable
endprimitive
`endif
`ifdef _udp_def_altos_latch_sr_1
`else
`define _udp_def_altos_latch_sr_1
primitive altos_latch_sr_1 (q, v, clk, d, s, r);
output q;
reg q;
input v, clk, d, s, r;
table
* ? ? ? ? : ? : x;
? 1 1 ? 0 : ? : 1;
? 1 0 0 ? : ? : 0;
? ? ? 1 ? : ? : 1;
? ? ? 0 1 : ? : 0;
? 0 * ? ? : ? : -;
? 0 ? * 0 : 1 : 1;
? 0 ? 0 * : 0 : 0;
? * 1 ? 0 : 1 : 1;
? * 0 0 ? : 0 : 0;
? ? 1 * 0 : 1 : 1;
? ? 0 0 * : 0 : 0;
endtable
endprimitive
`endif