485 lines
13 KiB
Plaintext
485 lines
13 KiB
Plaintext
/*************************************************************************
|
|
*
|
|
* This file is part of ACT dataflow neuro library
|
|
*
|
|
* Copyright (c) 2022 University of Groningen - Ole Richter
|
|
* Copyright (c) 2022 University of Groningen - Hugh Greatorex
|
|
* Copyright (c) 2022 University of Groningen - Michele Mastella
|
|
*
|
|
* This source describes Open Hardware and is licensed under the CERN-OHL-W v2 or later
|
|
*
|
|
* You may redistribute and modify this documentation and make products
|
|
* using it under the terms of the CERN-OHL-W v2 (https:/cern.ch/cern-ohl).
|
|
* This documentation is distributed WITHOUT ANY EXPRESS OR IMPLIED
|
|
* WARRANTY, INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY
|
|
* AND FITNESS FOR A PARTICULAR PURPOSE. Please see the CERN-OHL-W v2
|
|
* for applicable conditions.
|
|
*
|
|
* Source location: https://git.web.rug.nl/bics/actlib_dataflow_neuro
|
|
*
|
|
* As per CERN-OHL-W v2 section 4.1, should You produce hardware based on
|
|
* these sources, You must maintain the Source Location visible in its
|
|
* documentation.
|
|
*
|
|
**************************************************************************
|
|
*/
|
|
|
|
namespace tmpl {
|
|
namespace dataflow_neuro{
|
|
export defcell A_1C1P2N_RB_X1 (bool! y; bool? c1,p1,n1,n2,pr_B, sr_B; bool vdd, vss) {
|
|
bool _y;
|
|
prs{
|
|
(~p1 & ~c1)|~pr_B -> _y+
|
|
c1 & n1 & n2 & sr_B -> _y-
|
|
_y => y-
|
|
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}
|
|
}
|
|
}
|
|
|
|
export defcell A_1C1P2N_R_X1 (bool! y; bool? c1,p1,n1,n2,pr_B, sr_B; bool vdd, vss) {
|
|
prs{
|
|
(~p1 & ~c1)|~pr_B -> y-
|
|
c1 & n1 & n2 & sr_B -> y+
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}
|
|
}
|
|
}
|
|
|
|
|
|
export defcell A_1C1P_1N_X1 (bool! y; bool? c1, p1, n1; bool vdd, vss)
|
|
{
|
|
prs{
|
|
~p1 & ~c1 -> y+
|
|
c1 & n1 -> y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_1C1P_B (bool! y; bool? c1, p1; bool vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
~p1 & ~c1 -> _y-
|
|
c1 -> _y+
|
|
_y => y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1} }
|
|
}
|
|
|
|
|
|
export defcell A_1C1P_X1 (bool! y; bool? c1, p1; bool vdd, vss)
|
|
{
|
|
prs{
|
|
~p1 & ~c1 -> y+
|
|
c1 -> y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_1C2P1N_X1 (bool! y; bool? c1, p1, p2, n1; bool vdd, vss)
|
|
{
|
|
prs{
|
|
~p1 & ~p2 & ~c1 -> y+
|
|
c1 & n1 -> y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_1C2P_B_X1 (bool! y; bool? c1, p1, p2; bool vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
~p1 & ~p2 & ~c1 -> _y-
|
|
c1 -> _y+
|
|
_y => y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1} }
|
|
}
|
|
|
|
|
|
export defcell A_1C2P (bool! y; bool? c1, p1, p2; bool vdd, vss)
|
|
{
|
|
prs{
|
|
~p1 & ~p2 & ~c1 -> y+
|
|
c1 -> y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_1C3P2P2N_R_X1 (bool! y; bool? c1, p1, p2, p3, p4, p5, n1, n2, pr_B, sr_B; bool vdd, vss)
|
|
{
|
|
prs{
|
|
(~p1 & ~p2 & ~p3 & ~c1)|(~p4&~p5&~c1)|~pr_B -> y+
|
|
c1 & n1 & n2 & sr_B -> y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_2C2N2N_RB_X1 (bool ! y; bool? c1, c2, n1, n2, n3, n4, pr_B, sr_B; bool vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~pr_B -> _y+
|
|
c1 & c2 & ((n1 & n2) | (n3 & n4)) & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_2C2N2N_RB_X2 (bool ! y; bool? c1, c2, n1, n2, n3, n4, pr_B, sr_B; bool vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~pr_B -> _y+
|
|
c1 & c2 & ((n1 & n2) | (n3 & n4)) & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-2}; _y{-1}}
|
|
}
|
|
|
|
|
|
export defcell A_2C2N2N_RB_X4 (bool ! y; bool? c1, c2, n1, n2, n3, n4, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~pr_B -> _y+
|
|
c1 & c2 & ((n1 & n2) | (n3 & n4)) & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-4}; _y{-1}}
|
|
}
|
|
|
|
|
|
export defcell A_2C2N2N_R_X1 (bool ! y; bool? c1, c2, n1, n2, n3, n4, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
prs{
|
|
(~c1 & ~c2) | ~pr_B -> y+
|
|
c1 & c2 & ((n1 & n2) | (n3 & n4)) & sr_B -> y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_2C2N_R_B_X1 (bool ! y; bool? c1, c2, n1, n2, rp_B, rs_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~rp_B -> _y+
|
|
c1 & c2 & n1 & n2 & rs_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_2C2N_R_B_X2 (bool ! y; bool? c1, c2, n1, n2, rp_B, rs_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~rp_B -> _y+
|
|
c1 & c2 & n1 & n2 & rs_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-2}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_2C2N_R_B_X4 (bool ! y; bool? c1, c2, n1, n2, rp_B, rs_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~rp_B -> _y+
|
|
c1 & c2 & n1 & n2 & rs_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-4}; _y{-1}}
|
|
}
|
|
|
|
|
|
export defcell A_2C2N_R_X1 (bool ! y; bool? c1, c2, n1, n2, rp_B, rs_B; bool? vdd, vss)
|
|
{
|
|
prs{
|
|
(~c1 & ~c2) | ~rp_B -> y+
|
|
c1 & c2 & n1 & n2 & rs_B -> y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_2C_B_X1 (bool ! y; bool? c1, c2; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
~c1 & ~c2 -> _y+
|
|
c1 & c2 -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_2C_RB_X1 (bool ! y; bool? c1, c2, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~pr_B -> _y+
|
|
c1 & c2 & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_2C_R_X1 (bool ! y; bool? c1, c2, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
prs{
|
|
(~c1 & ~c2) | ~pr_B -> y+
|
|
c1 & c2 & sr_B -> y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
export defcell A_2C1N_RB_X1(bool ! y; bool? c1, c2, n1, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~pr_B -> _y+
|
|
c1 & c2 & n1 & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}}
|
|
}
|
|
export defcell A_2C1N_RB_X4(bool ! y; bool? c1, c2, n1, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2) | ~pr_B -> _y+
|
|
c1 & c2 & n1 & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-4}; _y{-1}}
|
|
}
|
|
export defcell A_2C_X1 (bool ! y; bool? c1, c2; bool? vdd, vss)
|
|
{
|
|
prs{
|
|
~c1 & ~c2 -> y+
|
|
c1 & c2 -> y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_3C_B_X1 (bool ! y; bool? c1, c2, c3; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
~c1 & ~c2 & ~c3 -> _y+
|
|
c1 & c2 & c3 -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_3C_RB_X1 (bool ! y; bool? c1, c2, c3, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2 & ~c3) | ~pr_B -> _y+
|
|
c1 & c2 & c3 & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_3C_RB_X2 (bool ! y; bool? c1, c2, c3, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2 & ~c3) | ~pr_B -> _y+
|
|
c1 & c2 & c3 & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-2}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_3C_RB_X4 (bool ! y; bool? c1, c2, c3, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2 & ~c3) | ~pr_B -> _y+
|
|
c1 & c2 & c3 & sr_B -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-4}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_3C_R_X1 (bool ! y; bool? c1, c2, c3, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
prs{
|
|
(~c1 & ~c2 & ~c3) | ~pr_B -> y+
|
|
c1 & c2 & c3 & sr_B -> y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_3C_X1 (bool ! y; bool? c1, c2, c3; bool? vdd, vss)
|
|
{
|
|
prs{
|
|
~c1 & ~c2 & ~c3 -> y+
|
|
c1 & c2 & c3 -> y-
|
|
}
|
|
sizing {
|
|
leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_4C_RB_X1 (bool! y; bool? c1, c2, c3, c4, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2 & ~c3 & ~c4) | ~pr_B -> _y+
|
|
c1 & c2 & c3 & c4 & sr_B-> _y-
|
|
_y => y-
|
|
}
|
|
sizing { leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_4C_RB_X2 (bool! y; bool? c1, c2, c3, c4, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2 & ~c3 & ~c4) | ~pr_B -> _y+
|
|
c1 & c2 & c3 & c4 & sr_B-> _y-
|
|
_y => y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-2}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_4C_RB_X4 (bool! y; bool? c1, c2, c3, c4, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
(~c1 & ~c2 & ~c3 & ~c4) | ~pr_B -> _y+
|
|
c1 & c2 & c3 & c4 & sr_B-> _y-
|
|
_y => y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-4}; _y{-1}}
|
|
}
|
|
|
|
export defcell A_4C_R_X1 (bool! y; bool? c1, c2, c3, c4, pr_B, sr_B; bool? vdd, vss)
|
|
{
|
|
prs{
|
|
(~c1 & ~c2 & ~c3 & ~c4) | ~pr_B -> y+
|
|
c1 & c2 & c3 & c4 & sr_B-> y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
|
|
export defcell A_4P1N1N_B_X1 (bool! y; bool? n1, n2, p1, p2, p3, p4; bool? vdd, vss)
|
|
{
|
|
bool _y;
|
|
prs{
|
|
~p1 & ~p2 & ~p3 & ~p4 -> _y+
|
|
n1 | n2 -> _y-
|
|
_y => y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}; _y{-1} }
|
|
}
|
|
|
|
export defcell A_4P1N1N_X1 (bool! y; bool? n1, n2, p1, p2, p3, p4; bool? vdd, vss)
|
|
{
|
|
prs{
|
|
~p1 & ~p2 & ~p3 & ~p4 -> y+
|
|
n1 | n2 -> y-
|
|
}
|
|
sizing {leak_adjust <- 1;
|
|
p_n_mode <- 1;
|
|
y {-1}}
|
|
}
|
|
}}
|
|
|
|
|
|
|