mirror of
https://github.com/aolofsson/oh.git
synced 2025-01-17 20:02:53 +08:00
Adding asiclib
-Represent set of cells that need hard coded cells or hard coded gate level designs.
This commit is contained in:
parent
f91d839e11
commit
3dbb3755af
16
asiclib/hdl/asic_and2.v
Normal file
16
asiclib/hdl/asic_and2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2-Input And Gate #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_and2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a & b;
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_and3.v
Normal file
17
asiclib/hdl/asic_and3.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: 3-Input And Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_and3
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a & b & c;
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_and4.v
Normal file
18
asiclib/hdl/asic_and4.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: 4-Input And Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_and4
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
input d,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a & b & c & d;
|
||||
|
||||
endmodule
|
13
asiclib/hdl/asic_antenna.v
Normal file
13
asiclib/hdl/asic_antenna.v
Normal file
@ -0,0 +1,13 @@
|
||||
//#############################################################################
|
||||
//# Function: Antenna Diode #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_antenna
|
||||
(
|
||||
input vss,
|
||||
output z
|
||||
);
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_ao21.v
Normal file
17
asiclib/hdl/asic_ao21.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao21) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao21
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1) | b0;
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_ao211.v
Normal file
18
asiclib/hdl/asic_ao211.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao211) Gate #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao211
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1) | b0 | c0;
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_ao22.v
Normal file
18
asiclib/hdl/asic_ao22.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao22) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao22
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1) | (b0 & b1);
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_ao221.v
Normal file
19
asiclib/hdl/asic_ao221.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao221) Gate #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao221
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1) | (b0 & b1) | (c0);
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_ao222.v
Normal file
20
asiclib/hdl/asic_ao222.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao222) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao222
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
input c0,
|
||||
input c1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1) | (b0 & b1) | (c0 & c1);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_ao31.v
Normal file
18
asiclib/hdl/asic_ao31.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao31) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao31
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1 & a2) | b0;
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_ao311.v
Normal file
19
asiclib/hdl/asic_ao311.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao311) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao311
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1 & a2) | b0 | c0;
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_ao32.v
Normal file
19
asiclib/hdl/asic_ao32.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao32) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao32
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input b1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1 & a2) | (b0 & b1);
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_ao33.v
Normal file
20
asiclib/hdl/asic_ao33.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or (ao33) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_ao33
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input b1,
|
||||
input b2,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 & a1 & a2) | (b0 & b1 & b2);
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_aoi21.v
Normal file
17
asiclib/hdl/asic_aoi21.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi21) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi21
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1) | b0);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_aoi211.v
Normal file
18
asiclib/hdl/asic_aoi211.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi211) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi211
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1) | b0 | c0);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_aoi22.v
Normal file
18
asiclib/hdl/asic_aoi22.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi22) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi22
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1) | (b0 & b1));
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_aoi221.v
Normal file
19
asiclib/hdl/asic_aoi221.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi221) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi221
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1) | (b0 & b1) | c0);
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_aoi222.v
Normal file
20
asiclib/hdl/asic_aoi222.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi222) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi222
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
input c0,
|
||||
input c1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1) | (b0 & b1) | (c0 & c1));
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_aoi31.v
Normal file
18
asiclib/hdl/asic_aoi31.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi31) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi31
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1 & a2) | b0);
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_aoi311.v
Normal file
19
asiclib/hdl/asic_aoi311.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi311) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi311
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1 & a2) | b0 | c0);
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_aoi32.v
Normal file
19
asiclib/hdl/asic_aoi32.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi32) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi32
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input b1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1 & a2) | (b0 & b1));
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_aoi33.v
Normal file
20
asiclib/hdl/asic_aoi33.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: And-Or-Inverter (aoi33) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_aoi33
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input b1,
|
||||
input b2,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 & a1 & a2) | (b0 & b1 & b2));
|
||||
|
||||
endmodule
|
15
asiclib/hdl/asic_buf.v
Normal file
15
asiclib/hdl/asic_buf.v
Normal file
@ -0,0 +1,15 @@
|
||||
//#############################################################################
|
||||
//# Function: Non-inverting Buffer #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_buf
|
||||
(
|
||||
input a,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a;
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_clkand2.v
Normal file
16
asiclib/hdl/asic_clkand2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2 Input Clock And Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clkand2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a & b;
|
||||
|
||||
endmodule
|
15
asiclib/hdl/asic_clkbuf.v
Normal file
15
asiclib/hdl/asic_clkbuf.v
Normal file
@ -0,0 +1,15 @@
|
||||
//#############################################################################
|
||||
//# Function: Non-inverting Clock Buffer #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clkbuf
|
||||
(
|
||||
input a,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a;
|
||||
|
||||
endmodule
|
23
asiclib/hdl/asic_clkicgand.v
Normal file
23
asiclib/hdl/asic_clkicgand.v
Normal file
@ -0,0 +1,23 @@
|
||||
//#############################################################################
|
||||
//# Function: Integrated "And" Clock Gating Cell (And) #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clkicgand
|
||||
(
|
||||
input clk, // clock input
|
||||
input te, // test enable
|
||||
input en, // enable (from positive edge FF)
|
||||
output eclk // enabled clock output
|
||||
);
|
||||
|
||||
reg en_stable;
|
||||
|
||||
always @ (clk or en or te)
|
||||
if (~clk)
|
||||
en_stable <= en | te;
|
||||
|
||||
assign eclk = clk & en_stable;
|
||||
|
||||
endmodule
|
23
asiclib/hdl/asic_clkicgor.v
Normal file
23
asiclib/hdl/asic_clkicgor.v
Normal file
@ -0,0 +1,23 @@
|
||||
//#############################################################################
|
||||
//# Function: Integrated "Or" Clock Gating Cell #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clkicgor
|
||||
(
|
||||
input clk,// clock input
|
||||
input te, // test enable
|
||||
input en, // enable
|
||||
output eclk // enabled clock output
|
||||
);
|
||||
|
||||
reg en_stable;
|
||||
|
||||
always @ (clk or en or te)
|
||||
if (clk)
|
||||
en_stable <= en | te;
|
||||
|
||||
assign eclk = clk | ~en_stable;
|
||||
|
||||
endmodule
|
15
asiclib/hdl/asic_clkinv.v
Normal file
15
asiclib/hdl/asic_clkinv.v
Normal file
@ -0,0 +1,15 @@
|
||||
//#############################################################################
|
||||
//# Function: Clock Inverter #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clkinv
|
||||
(
|
||||
input a,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~a;
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_clkmux2.v
Normal file
18
asiclib/hdl/asic_clkmux2.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: 2:1 Clock Mux #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clkmux2
|
||||
(
|
||||
input clk0,
|
||||
input clk1,
|
||||
input sel,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = sel ? clk0 : clk1;
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_clknand2.v
Normal file
16
asiclib/hdl/asic_clknand2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2 Input Clock Nand Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clknand2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~(a & b);
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_clknor2.v
Normal file
16
asiclib/hdl/asic_clknor2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2-Input Clock NOr Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clknor2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~(a | b);
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_clkor2.v
Normal file
16
asiclib/hdl/asic_clkor2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2-Input Clock Or Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clkor2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a | b;
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_clkxor2.v
Normal file
16
asiclib/hdl/asic_clkxor2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2-Input Clock Xor Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_clkxor2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a ^ b;
|
||||
|
||||
endmodule
|
39
asiclib/hdl/asic_csa32.v
Normal file
39
asiclib/hdl/asic_csa32.v
Normal file
@ -0,0 +1,39 @@
|
||||
//#############################################################################
|
||||
//# Function: Carry Save Adder (3:2) #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_csa32
|
||||
#(parameter N = 1, // vector width
|
||||
parameter SYN = "TRUE", // synthesizable (or not)
|
||||
parameter TYPE = "DEFAULT" // scell type/size
|
||||
)
|
||||
( input [N-1:0] in0, // input
|
||||
input [N-1:0] in1, // input
|
||||
input [N-1:0] in2, // input
|
||||
output [N-1:0] s, // sum
|
||||
output [N-1:0] c // carry
|
||||
);
|
||||
|
||||
generate
|
||||
if(SYN == "TRUE") begin
|
||||
assign s[N-1:0] = in0[N-1:0] ^ in1[N-1:0] ^ in2[N-1:0];
|
||||
|
||||
assign c[N-1:0] = (in0[N-1:0] & in1[N-1:0]) |
|
||||
(in1[N-1:0] & in2[N-1:0]) |
|
||||
(in2[N-1:0] & in0[N-1:0] );
|
||||
end
|
||||
else begin
|
||||
genvar i;
|
||||
for (i=0;i<N;i=i+1) begin
|
||||
asic_csa32 #(.TYPE(TYPE))
|
||||
asic_csa32 (.s(s[i]),
|
||||
.c(c[i]),
|
||||
.in2(in2[i]),
|
||||
.in1(in1[i]),
|
||||
.in0(in0[i]));
|
||||
end
|
||||
end
|
||||
endgenerate
|
||||
endmodule
|
23
asiclib/hdl/asic_csa42.v
Normal file
23
asiclib/hdl/asic_csa42.v
Normal file
@ -0,0 +1,23 @@
|
||||
//#############################################################################
|
||||
//# Function: Carry Save Adder (4:2) (aka 5:3) #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_csa42
|
||||
( input a,
|
||||
input b,
|
||||
input c,
|
||||
input d,
|
||||
input cin,
|
||||
output sum,
|
||||
output carry,
|
||||
output cout
|
||||
);
|
||||
|
||||
assign cout = (a & b) | (b & c) | (a & c);
|
||||
assign sumint = a ^ b ^ c;
|
||||
assign sum = cin ^ d ^ sumint;
|
||||
assign carry = (cin & d) | (cin & sumint) | (d & sumint);
|
||||
|
||||
endmodule
|
13
asiclib/hdl/asic_decap.v
Normal file
13
asiclib/hdl/asic_decap.v
Normal file
@ -0,0 +1,13 @@
|
||||
//#############################################################################
|
||||
//# Function: Decap Cell #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_decap
|
||||
(
|
||||
input vss,
|
||||
output vdd
|
||||
);
|
||||
|
||||
endmodule
|
15
asiclib/hdl/asic_delay.v
Normal file
15
asiclib/hdl/asic_delay.v
Normal file
@ -0,0 +1,15 @@
|
||||
//#############################################################################
|
||||
//# Function: Non-inverting Delay Cell #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_delay
|
||||
(
|
||||
input a,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a;
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_dffnq.v
Normal file
17
asiclib/hdl/asic_dffnq.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: Negative edge-triggered static D-type flop-flop #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dffnq
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (negedge clk)
|
||||
q <= d;
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_dffq.v
Normal file
17
asiclib/hdl/asic_dffq.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static D-type flop-flop #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dffq
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (posedge clk)
|
||||
q <= d;
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_dffqn.v
Normal file
17
asiclib/hdl/asic_dffqn.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered inverting static D-type flop-flop #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dffqn
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
output reg qn
|
||||
);
|
||||
|
||||
always @ (posedge clk)
|
||||
qn <= ~d;
|
||||
|
||||
endmodule
|
22
asiclib/hdl/asic_dffrq.v
Normal file
22
asiclib/hdl/asic_dffrq.v
Normal file
@ -0,0 +1,22 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static D-type flop-flop with async #
|
||||
//# active low reset. #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dffrq
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
input nreset,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (posedge clk or negedge nreset)
|
||||
if(!nreset)
|
||||
q <= 1'b0;
|
||||
else
|
||||
q <= d;
|
||||
|
||||
endmodule
|
22
asiclib/hdl/asic_dffrqn.v
Normal file
22
asiclib/hdl/asic_dffrqn.v
Normal file
@ -0,0 +1,22 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static inverting D-type flop-flop with #
|
||||
// async active low reset. #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dffrqn
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
input nreset,
|
||||
output reg qn
|
||||
);
|
||||
|
||||
always @ (posedge clk or negedge nreset)
|
||||
if(!nreset)
|
||||
qn <= 1'b1;
|
||||
else
|
||||
qn <= ~d;
|
||||
|
||||
endmodule
|
22
asiclib/hdl/asic_dffsq.v
Normal file
22
asiclib/hdl/asic_dffsq.v
Normal file
@ -0,0 +1,22 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static D-type flop-flop with async #
|
||||
//# active low preset. #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dffsq
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
input nset,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (posedge clk or negedge nset)
|
||||
if(!nset)
|
||||
q <= 1'b1;
|
||||
else
|
||||
q <= d;
|
||||
|
||||
endmodule
|
22
asiclib/hdl/asic_dffsqn.v
Normal file
22
asiclib/hdl/asic_dffsqn.v
Normal file
@ -0,0 +1,22 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static inverting D-type flop-flop with #
|
||||
// async active low set. #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dffsqn
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
input nset,
|
||||
output reg qn
|
||||
);
|
||||
|
||||
always @ (posedge clk or negedge nset)
|
||||
if(!nset)
|
||||
qn <= 1'b0;
|
||||
else
|
||||
qn <= ~d;
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_dmux2.v
Normal file
20
asiclib/hdl/asic_dmux2.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: 2:1 one hot mux #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dmux2
|
||||
(
|
||||
input sel1,
|
||||
input sel0,
|
||||
input in1,
|
||||
input in0,
|
||||
output out
|
||||
);
|
||||
|
||||
assign out = sel0 & in0 |
|
||||
sel1 & in1;
|
||||
|
||||
endmodule
|
23
asiclib/hdl/asic_dmux3.v
Normal file
23
asiclib/hdl/asic_dmux3.v
Normal file
@ -0,0 +1,23 @@
|
||||
//#############################################################################
|
||||
//# Function: 3:1 one hot mux #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dmux3
|
||||
(
|
||||
input sel2,
|
||||
input sel1,
|
||||
input sel0,
|
||||
input in2,
|
||||
input in1,
|
||||
input in0,
|
||||
output out
|
||||
);
|
||||
|
||||
assign out = sel0 & in0 |
|
||||
sel1 & in1 |
|
||||
sel2 & in2;
|
||||
|
||||
endmodule
|
26
asiclib/hdl/asic_dmux4.v
Normal file
26
asiclib/hdl/asic_dmux4.v
Normal file
@ -0,0 +1,26 @@
|
||||
//#############################################################################
|
||||
//# Function: 4:1 one hot mux #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dmux4
|
||||
(
|
||||
input sel3,
|
||||
input sel2,
|
||||
input sel1,
|
||||
input sel0,
|
||||
input in3,
|
||||
input in2,
|
||||
input in1,
|
||||
input in0,
|
||||
output out
|
||||
);
|
||||
|
||||
assign out = sel0 & in0 |
|
||||
sel1 & in1 |
|
||||
sel2 & in2 |
|
||||
sel3 & in3;
|
||||
|
||||
endmodule
|
29
asiclib/hdl/asic_dmux5.v
Normal file
29
asiclib/hdl/asic_dmux5.v
Normal file
@ -0,0 +1,29 @@
|
||||
//#############################################################################
|
||||
//# Function: 5:1 one hot mux #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dmux5
|
||||
(
|
||||
input sel4,
|
||||
input sel3,
|
||||
input sel2,
|
||||
input sel1,
|
||||
input sel0,
|
||||
input in4,
|
||||
input in3,
|
||||
input in2,
|
||||
input in1,
|
||||
input in0,
|
||||
output out
|
||||
);
|
||||
|
||||
assign out = sel0 & in0 |
|
||||
sel1 & in1 |
|
||||
sel2 & in2 |
|
||||
sel3 & in3 |
|
||||
sel4 & in4;
|
||||
|
||||
endmodule
|
32
asiclib/hdl/asic_dmux6.v
Normal file
32
asiclib/hdl/asic_dmux6.v
Normal file
@ -0,0 +1,32 @@
|
||||
//#############################################################################
|
||||
//# Function: 6:1 one hot mux #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dmux6
|
||||
(
|
||||
input sel5,
|
||||
input sel4,
|
||||
input sel3,
|
||||
input sel2,
|
||||
input sel1,
|
||||
input sel0,
|
||||
input in5,
|
||||
input in4,
|
||||
input in3,
|
||||
input in2,
|
||||
input in1,
|
||||
input in0,
|
||||
output out
|
||||
);
|
||||
|
||||
assign out = sel0 & in0 |
|
||||
sel1 & in1 |
|
||||
sel2 & in2 |
|
||||
sel3 & in3 |
|
||||
sel4 & in4 |
|
||||
sel5 & in5;
|
||||
|
||||
endmodule
|
35
asiclib/hdl/asic_dmux7.v
Normal file
35
asiclib/hdl/asic_dmux7.v
Normal file
@ -0,0 +1,35 @@
|
||||
//#############################################################################
|
||||
//# Function: 7:1 one hot mux #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dmux7
|
||||
(
|
||||
input sel6,
|
||||
input sel5,
|
||||
input sel4,
|
||||
input sel3,
|
||||
input sel2,
|
||||
input sel1,
|
||||
input sel0,
|
||||
input in6,
|
||||
input in5,
|
||||
input in4,
|
||||
input in3,
|
||||
input in2,
|
||||
input in1,
|
||||
input in0,
|
||||
output out
|
||||
);
|
||||
|
||||
assign out = sel0 & in0 |
|
||||
sel1 & in1 |
|
||||
sel2 & in2 |
|
||||
sel3 & in3 |
|
||||
sel4 & in4 |
|
||||
sel5 & in5 |
|
||||
sel6 & in6;
|
||||
|
||||
endmodule
|
38
asiclib/hdl/asic_dmux8.v
Normal file
38
asiclib/hdl/asic_dmux8.v
Normal file
@ -0,0 +1,38 @@
|
||||
//#############################################################################
|
||||
//# Function: 8:1 one hot mux #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dmux8
|
||||
(
|
||||
input sel7,
|
||||
input sel6,
|
||||
input sel5,
|
||||
input sel4,
|
||||
input sel3,
|
||||
input sel2,
|
||||
input sel1,
|
||||
input sel0,
|
||||
input in7,
|
||||
input in6,
|
||||
input in5,
|
||||
input in4,
|
||||
input in3,
|
||||
input in2,
|
||||
input in1,
|
||||
input in0,
|
||||
output out
|
||||
);
|
||||
|
||||
assign out = sel0 & in0 |
|
||||
sel1 & in1 |
|
||||
sel2 & in2 |
|
||||
sel3 & in3 |
|
||||
sel4 & in4 |
|
||||
sel5 & in5 |
|
||||
sel6 & in6 |
|
||||
sel7 & in7;
|
||||
|
||||
endmodule
|
27
asiclib/hdl/asic_dsync.v
Normal file
27
asiclib/hdl/asic_dsync.v
Normal file
@ -0,0 +1,27 @@
|
||||
//#############################################################################
|
||||
//# Function: Data Syncrhonizer #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_dsync
|
||||
(
|
||||
input clk, // clock
|
||||
input nreset, // async active low reset
|
||||
input in, // input data
|
||||
output out // synchronized data
|
||||
);
|
||||
|
||||
localparam SYNCPIPE=2;
|
||||
|
||||
reg [SYNCPIPE-1:0] sync_pipe;
|
||||
always @ (posedge clk or negedge nreset)
|
||||
if(!nreset)
|
||||
sync_pipe[SYNCPIPE-1:0] <= 'b0;
|
||||
else
|
||||
sync_pipe[SYNCPIPE-1:0] <= {sync_pipe[SYNCPIPE-1:0],in};
|
||||
|
||||
assign out = sync_pipe[SYNCPIPE-1];
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_footer.v
Normal file
18
asiclib/hdl/asic_footer.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: Power supply header switch #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_footer
|
||||
(
|
||||
input nsleep, // 0 = disabled ground
|
||||
input vssin, // input supply
|
||||
output vssout // gated output supply
|
||||
);
|
||||
|
||||
// Primitive Device
|
||||
nmos m0 (vddout, vddin, nsleep); //d,s,g
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_header.v
Normal file
18
asiclib/hdl/asic_header.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: Power supply header switch #
|
||||
//#############################################################################
|
||||
//# Author: Andreas Olofsson #
|
||||
//# License: MIT (see LICENSE file in OH! repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_header
|
||||
(
|
||||
input sleep, // 1 = disabled vdd
|
||||
input vddin, // input supply
|
||||
output vddout // gated output supply
|
||||
);
|
||||
|
||||
// Primitive Device
|
||||
pmos m0 (vddout, vssin, sleep); //d,s,g
|
||||
|
||||
endmodule
|
28
asiclib/hdl/asic_iddr.v
Normal file
28
asiclib/hdl/asic_iddr.v
Normal file
@ -0,0 +1,28 @@
|
||||
//#############################################################################
|
||||
//# Function: Dual data rate input buffer #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
module asic_iddr
|
||||
(
|
||||
input clk, // clock
|
||||
input in, // data input sampled on both edges of clock
|
||||
output reg outrise, // rising edge sample
|
||||
output reg outfall // falling edge sample
|
||||
);
|
||||
|
||||
// Negedge Sample
|
||||
always @ (negedge clk)
|
||||
outfall <= in;
|
||||
|
||||
// Posedge Sample
|
||||
reg inrise;
|
||||
always @ (posedge clk)
|
||||
inrise <= in;
|
||||
|
||||
// Posedge Latch (for hold)
|
||||
always @ (clk or inrise)
|
||||
if(~clk)
|
||||
outrise <= inrise;
|
||||
|
||||
endmodule
|
15
asiclib/hdl/asic_inv.v
Normal file
15
asiclib/hdl/asic_inv.v
Normal file
@ -0,0 +1,15 @@
|
||||
//#############################################################################
|
||||
//# Function: Inverter #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_inv
|
||||
(
|
||||
input a,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~a;
|
||||
|
||||
endmodule
|
12
asiclib/hdl/asic_keeper.v
Normal file
12
asiclib/hdl/asic_keeper.v
Normal file
@ -0,0 +1,12 @@
|
||||
//#############################################################################
|
||||
//# Function: Charge Keeper Cell #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_keeper
|
||||
(
|
||||
inout z
|
||||
);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_latnq.v
Normal file
18
asiclib/hdl/asic_latnq.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: D-type active-low transparent latch #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_latnq
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (clk or d)
|
||||
if(~clk)
|
||||
q <= d;
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_latq.v
Normal file
18
asiclib/hdl/asic_latq.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: D-type active-high transparent latch #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_latq
|
||||
(
|
||||
input d,
|
||||
input clk,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (clk or d)
|
||||
if(clk)
|
||||
q <= d;
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_mux2.v
Normal file
17
asiclib/hdl/asic_mux2.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: 2-Input Mux #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_mux2
|
||||
(
|
||||
input d0,
|
||||
input d1,
|
||||
input s,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (d0 & ~s) | (d1 & s);
|
||||
|
||||
endmodule
|
22
asiclib/hdl/asic_mux3.v
Normal file
22
asiclib/hdl/asic_mux3.v
Normal file
@ -0,0 +1,22 @@
|
||||
//#############################################################################
|
||||
//# Function: 3-Input Mux #
|
||||
//# #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_mx3
|
||||
(
|
||||
input d0,
|
||||
input d1,
|
||||
input d2,
|
||||
input s0,
|
||||
input s1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (d0 & ~s0 & ~s1) |
|
||||
(d1 & s0 & ~s1) |
|
||||
(d2 & s1);
|
||||
|
||||
endmodule
|
23
asiclib/hdl/asic_mux4.v
Normal file
23
asiclib/hdl/asic_mux4.v
Normal file
@ -0,0 +1,23 @@
|
||||
//#############################################################################
|
||||
//# Function: 4-Input Mux #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_mux4
|
||||
(
|
||||
input d0,
|
||||
input d1,
|
||||
input d2,
|
||||
input d3,
|
||||
input s0,
|
||||
input s1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (d0 & ~s1 & ~s0) |
|
||||
(d1 & ~s1 & s0) |
|
||||
(d2 & s1 & ~s0) |
|
||||
(d2 & s1 & s0);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_muxi2.v
Normal file
18
asiclib/hdl/asic_muxi2.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: 2-Input Inverting Mux #
|
||||
//# #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_muxi2
|
||||
(
|
||||
input d0,
|
||||
input d1,
|
||||
input s,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((d0 & ~s) | (d1 & s));
|
||||
|
||||
endmodule
|
21
asiclib/hdl/asic_muxi3.v
Normal file
21
asiclib/hdl/asic_muxi3.v
Normal file
@ -0,0 +1,21 @@
|
||||
//#############################################################################
|
||||
//# Function: 3-Input Inverting Mux #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_muxi3
|
||||
(
|
||||
input d0,
|
||||
input d1,
|
||||
input d2,
|
||||
input s0,
|
||||
input s1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((d0 & ~s0 & ~s1) |
|
||||
(d1 & s0 & ~s1) |
|
||||
(d2 & s1));
|
||||
|
||||
endmodule
|
24
asiclib/hdl/asic_muxi4.v
Normal file
24
asiclib/hdl/asic_muxi4.v
Normal file
@ -0,0 +1,24 @@
|
||||
//#############################################################################
|
||||
//# Function: 4-Input Inverting Mux #
|
||||
//# #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_muxi4
|
||||
(
|
||||
input d0,
|
||||
input d1,
|
||||
input d2,
|
||||
input d3,
|
||||
input s0,
|
||||
input s1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((d0 & ~s1 & ~s0) |
|
||||
(d1 & ~s1 & s0) |
|
||||
(d2 & s1 & ~s0) |
|
||||
(d2 & s1 & s0));
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_nand2.v
Normal file
16
asiclib/hdl/asic_nand2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2 Input Nand Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_nand2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~(a & b);
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_nand3.v
Normal file
17
asiclib/hdl/asic_nand3.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: 3 Input Nand Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_nand3
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~(a & b & c);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_nand4.v
Normal file
18
asiclib/hdl/asic_nand4.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: 4 Input Nand Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_nand4
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
input d,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~(a & b & c & d);
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_nor2.v
Normal file
16
asiclib/hdl/asic_nor2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2 Input Nor Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_nor2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~(a | b);
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_nor3.v
Normal file
17
asiclib/hdl/asic_nor3.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: 3 Input Nor Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_nor3
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~(a | b | c);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_nor4.v
Normal file
18
asiclib/hdl/asic_nor4.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: 4 Input Nor Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_nor4
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
input d,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~(a | b | c | d);
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_oa21.v
Normal file
17
asiclib/hdl/asic_oa21.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa21) Gate #
|
||||
//# Copyright: asic
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa21
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1) & b0;
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_oa211.v
Normal file
18
asiclib/hdl/asic_oa211.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa211) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa211
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1) & b0 & c0;
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_oa22.v
Normal file
18
asiclib/hdl/asic_oa22.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa22) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa22
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1) & (b0 | b1);
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_oa221.v
Normal file
19
asiclib/hdl/asic_oa221.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa221) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa221
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1) & (b0 | b1) & (c0);
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_oa222.v
Normal file
20
asiclib/hdl/asic_oa222.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa222) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa222
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
input c0,
|
||||
input c1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1) & (b0 | b1) & (c0 | c1);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_oa31.v
Normal file
18
asiclib/hdl/asic_oa31.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa31) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa31
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1 | a2) & b0;
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_oa311.v
Normal file
19
asiclib/hdl/asic_oa311.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa311) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa311
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1 | a2) & b0 & c0;
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_oa32.v
Normal file
19
asiclib/hdl/asic_oa32.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa32) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa32
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input b1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1 | a2) & (b0 | b1);
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_oa33.v
Normal file
20
asiclib/hdl/asic_oa33.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And (oa33) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oa33
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input b1,
|
||||
input b2,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = (a0 | a1 | a2) & (b0 | b1 | b2);
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_oai21.v
Normal file
17
asiclib/hdl/asic_oai21.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And-Inverter (oai21) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oai21
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 | a1) & b0);
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_oai22.v
Normal file
18
asiclib/hdl/asic_oai22.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And-Inverter (oai22) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oai22
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 | a1) & (b0 | b1));
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_oai221.v
Normal file
19
asiclib/hdl/asic_oai221.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And-Inverter (oai221) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oai221
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 | a1) & (b0 | b1) & (c0));
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_oai222.v
Normal file
20
asiclib/hdl/asic_oai222.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And-Inverter (oai222) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oai222
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input b0,
|
||||
input b1,
|
||||
input c0,
|
||||
input c1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 | a1) & (b0 | b1) & (c0 | c1));
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_oai31.v
Normal file
18
asiclib/hdl/asic_oai31.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And-Inverter (oai31) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oai31
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 | a1 | a2) & b0);
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_oai311.v
Normal file
19
asiclib/hdl/asic_oai311.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And-Inverter (oai311) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oai311
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input c0,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 | a1 | a2) & b0 & c0);
|
||||
|
||||
endmodule
|
19
asiclib/hdl/asic_oai32.v
Normal file
19
asiclib/hdl/asic_oai32.v
Normal file
@ -0,0 +1,19 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And-Inverter (oai32) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oai32
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input b1,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 | a1 | a2) & (b0 | b1));
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_oai33.v
Normal file
20
asiclib/hdl/asic_oai33.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: Or-And-Inverter (oai33) Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oai33
|
||||
(
|
||||
input a0,
|
||||
input a1,
|
||||
input a2,
|
||||
input b0,
|
||||
input b1,
|
||||
input b2,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = ~((a0 | a1 | a2) & (b0 | b1 | b2));
|
||||
|
||||
endmodule
|
24
asiclib/hdl/asic_oddr.v
Normal file
24
asiclib/hdl/asic_oddr.v
Normal file
@ -0,0 +1,24 @@
|
||||
//#############################################################################
|
||||
//# Function: Dual data rate output buffer #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_oddr
|
||||
(
|
||||
input clk, // clock input
|
||||
input in0, // data for clk=0
|
||||
input in1, // data for clk=1
|
||||
output out // dual data rate output
|
||||
);
|
||||
|
||||
//Making in1 stable for clk=1
|
||||
reg in1_sh;
|
||||
always @ (clk or in1)
|
||||
if(~clk)
|
||||
in1_sh <= in1;
|
||||
|
||||
//Using clock as data selctor
|
||||
assign out = clk ? in1_sh : in0;
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_or2.v
Normal file
16
asiclib/hdl/asic_or2.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: 2 Input Or Gate #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_or2
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a | b;
|
||||
|
||||
endmodule
|
17
asiclib/hdl/asic_or3.v
Normal file
17
asiclib/hdl/asic_or3.v
Normal file
@ -0,0 +1,17 @@
|
||||
//#############################################################################
|
||||
//# Function: 3 Input Or Gate #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_or3
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a | b | c ;
|
||||
|
||||
endmodule
|
18
asiclib/hdl/asic_or4.v
Normal file
18
asiclib/hdl/asic_or4.v
Normal file
@ -0,0 +1,18 @@
|
||||
//#############################################################################
|
||||
//# Function: 4 Input Or Gate #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_or4
|
||||
(
|
||||
input a,
|
||||
input b,
|
||||
input c,
|
||||
input d,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = a | b | c | d;
|
||||
|
||||
endmodule
|
25
asiclib/hdl/asic_rsync.v
Normal file
25
asiclib/hdl/asic_rsync.v
Normal file
@ -0,0 +1,25 @@
|
||||
//#############################################################################
|
||||
//# Function: Reset synchronizer #
|
||||
// (async assert, sync deassert) #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_rsync
|
||||
(
|
||||
input clk,
|
||||
input nrst_in,
|
||||
output nrst_out
|
||||
);
|
||||
|
||||
localparam SYNCPIPE=2;
|
||||
|
||||
reg [SYNCPIPE-1:0] sync_pipe;
|
||||
always @ (posedge clk or negedge nrst_in)
|
||||
if(!nrst_in)
|
||||
sync_pipe[SYNCPIPE-1:0] <= 'b0;
|
||||
else
|
||||
sync_pipe[SYNCPIPE-1:0] <= {sync_pipe[SYNCPIPE-2:0],1'b1};
|
||||
assign nrst_out = sync_pipe[SYNCPIPE-1];
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_sdffq.v
Normal file
20
asiclib/hdl/asic_sdffq.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static D-type flop-flop with scan input #
|
||||
//# #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_sdffq
|
||||
(
|
||||
input d,
|
||||
input si,
|
||||
input se,
|
||||
input clk,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (posedge clk)
|
||||
q <= se ? si : d;
|
||||
|
||||
endmodule
|
20
asiclib/hdl/asic_sdffqn.v
Normal file
20
asiclib/hdl/asic_sdffqn.v
Normal file
@ -0,0 +1,20 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered inverting static D-type flop-flop #
|
||||
//# with scan input. #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_sdffqn
|
||||
(
|
||||
input d,
|
||||
input si,
|
||||
input se,
|
||||
input clk,
|
||||
output reg qn
|
||||
);
|
||||
|
||||
always @ (posedge clk)
|
||||
qn <= se ? ~si : ~d;
|
||||
|
||||
endmodule
|
25
asiclib/hdl/asic_sdffrq.v
Normal file
25
asiclib/hdl/asic_sdffrq.v
Normal file
@ -0,0 +1,25 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static D-type flop-flop with async #
|
||||
//# active low reset and scan input #
|
||||
//# #
|
||||
//# Copyright: OH Project Authors. All rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_sdffrq
|
||||
(
|
||||
input d,
|
||||
input si,
|
||||
input se,
|
||||
input clk,
|
||||
input nreset,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (posedge clk or negedge nreset)
|
||||
if(!nreset)
|
||||
q <= 1'b0;
|
||||
else
|
||||
q <= se ? si : d;
|
||||
|
||||
endmodule
|
24
asiclib/hdl/asic_sdffrqn.v
Normal file
24
asiclib/hdl/asic_sdffrqn.v
Normal file
@ -0,0 +1,24 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static inverting D-type flop-flop with #
|
||||
// async active low reset and scan input #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_sdffrqn
|
||||
(
|
||||
input d,
|
||||
input si,
|
||||
input se,
|
||||
input clk,
|
||||
input nreset,
|
||||
output reg qn
|
||||
);
|
||||
|
||||
always @ (posedge clk or negedge nreset)
|
||||
if(!nreset)
|
||||
qn <= 1'b1;
|
||||
else
|
||||
qn <= se ? ~si : ~d;
|
||||
|
||||
endmodule
|
24
asiclib/hdl/asic_sdffsq.v
Normal file
24
asiclib/hdl/asic_sdffsq.v
Normal file
@ -0,0 +1,24 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static D-type flop-flop with async #
|
||||
//# active low preset and scan input. #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_sdffsq
|
||||
(
|
||||
input d,
|
||||
input si,
|
||||
input se,
|
||||
input clk,
|
||||
input nset,
|
||||
output reg q
|
||||
);
|
||||
|
||||
always @ (posedge clk or negedge nset)
|
||||
if(!nset)
|
||||
q <= 1'b1;
|
||||
else
|
||||
q <= se ? si : d;
|
||||
|
||||
endmodule
|
24
asiclib/hdl/asic_sdffsqn.v
Normal file
24
asiclib/hdl/asic_sdffsqn.v
Normal file
@ -0,0 +1,24 @@
|
||||
//#############################################################################
|
||||
//# Function: Positive edge-triggered static inverting D-type flop-flop with #
|
||||
// async active low set and scan input #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_sdffsqn
|
||||
(
|
||||
input d,
|
||||
input si,
|
||||
input se,
|
||||
input clk,
|
||||
input nset,
|
||||
output reg qn
|
||||
);
|
||||
|
||||
always @ (posedge clk or negedge nset)
|
||||
if(!nset)
|
||||
qn <= 1'b0;
|
||||
else
|
||||
qn <= se ? ~si : ~d;
|
||||
|
||||
endmodule
|
16
asiclib/hdl/asic_tbuf.v
Normal file
16
asiclib/hdl/asic_tbuf.v
Normal file
@ -0,0 +1,16 @@
|
||||
//#############################################################################
|
||||
//# Function: Tristate Buffer #
|
||||
//# Copyright: OH Project Authors. ALl rights Reserved. #
|
||||
//# License: MIT (see LICENSE file in OH repository) #
|
||||
//#############################################################################
|
||||
|
||||
module asic_tbuf
|
||||
(
|
||||
input a,
|
||||
input oe,
|
||||
output z
|
||||
);
|
||||
|
||||
assign z = oe ? a : 1'bz;
|
||||
|
||||
endmodule
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user