aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-03-30 10:02:18 +0200
committerClifford Wolf <clifford@clifford.at>2016-03-30 10:02:18 +0200
commit2c15a3a9d0aad62f92c37bd76b763d6c2cf079b1 (patch)
tree7f41e75a28ef24ed589f5f2a462bea41012e4ce6
parenta47f69536a1ac93657d334f57dac2a800ab34f3f (diff)
parent19c20235b55648c150df294320b9f2515d2f3c5b (diff)
downloadyosys-2c15a3a9d0aad62f92c37bd76b763d6c2cf079b1.tar.gz
yosys-2c15a3a9d0aad62f92c37bd76b763d6c2cf079b1.tar.bz2
yosys-2c15a3a9d0aad62f92c37bd76b763d6c2cf079b1.zip
Merge branch 'master' of github.com:cliffordwolf/yosys
-rw-r--r--techlibs/common/simlib.v73
-rw-r--r--techlibs/greenpak4/gp_dff.lib10
2 files changed, 78 insertions, 5 deletions
diff --git a/techlibs/common/simlib.v b/techlibs/common/simlib.v
index a2dc466d4..00f90bd4a 100644
--- a/techlibs/common/simlib.v
+++ b/techlibs/common/simlib.v
@@ -33,6 +33,12 @@
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $not (A, Y)
+//-
+//- A bit-wise inverter. This corresponds to the Verilog unary prefix '~' operator.
+//-
module \$not (A, Y);
parameter A_SIGNED = 0;
@@ -55,6 +61,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $pos (A, Y)
+//-
+//- A buffer. This corresponds to the Verilog unary prefix '+' operator.
+//-
module \$pos (A, Y);
parameter A_SIGNED = 0;
@@ -76,6 +88,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $neg (A, Y)
+//-
+//- An arithmetic inverter. This corresponds to the Verilog unary prefix '-' operator.
+//-
module \$neg (A, Y);
parameter A_SIGNED = 0;
@@ -97,6 +115,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $and (A, B, Y)
+//-
+//- A bit-wise AND. This corresponds to the Verilog '&' operator.
+//-
module \$and (A, B, Y);
parameter A_SIGNED = 0;
@@ -121,6 +145,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $or (A, B, Y)
+//-
+//- A bit-wise OR. This corresponds to the Verilog '|' operator.
+//-
module \$or (A, B, Y);
parameter A_SIGNED = 0;
@@ -145,6 +175,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $xor (A, B, Y)
+//-
+//- A bit-wise XOR. This corresponds to the Verilog '^' operator.
+//-
module \$xor (A, B, Y);
parameter A_SIGNED = 0;
@@ -169,6 +205,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $xnor (A, B, Y)
+//-
+//- A bit-wise XNOR. This corresponds to the Verilog '~^' operator.
+//-
module \$xnor (A, B, Y);
parameter A_SIGNED = 0;
@@ -193,6 +235,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $reduce_and (A, B, Y)
+//-
+//- An AND reduction. This corresponds to the Verilog unary prefix '&' operator.
+//-
module \$reduce_and (A, Y);
parameter A_SIGNED = 0;
@@ -214,6 +262,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $reduce_or (A, B, Y)
+//-
+//- An OR reduction. This corresponds to the Verilog unary prefix '|' operator.
+//-
module \$reduce_or (A, Y);
parameter A_SIGNED = 0;
@@ -235,6 +289,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $reduce_xor (A, B, Y)
+//-
+//- A XOR reduction. This corresponds to the Verilog unary prefix '^' operator.
+//-
module \$reduce_xor (A, Y);
parameter A_SIGNED = 0;
@@ -256,6 +316,12 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $reduce_xnor (A, B, Y)
+//-
+//- A XNOR reduction. This corresponds to the Verilog unary prefix '~^' operator.
+//-
module \$reduce_xnor (A, Y);
parameter A_SIGNED = 0;
@@ -277,6 +343,13 @@ endmodule
// --------------------------------------------------------
+// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+//-
+//- $reduce_bool (A, B, Y)
+//-
+//- An OR reduction. This cell type is used instead of $reduce_or when a signal is
+//- implicitly converted to a boolean signal, e.g. for operands of '&&' and '||'.
+//-
module \$reduce_bool (A, Y);
parameter A_SIGNED = 0;
diff --git a/techlibs/greenpak4/gp_dff.lib b/techlibs/greenpak4/gp_dff.lib
index bc41d18ef..b4b8c1028 100644
--- a/techlibs/greenpak4/gp_dff.lib
+++ b/techlibs/greenpak4/gp_dff.lib
@@ -2,9 +2,9 @@ library(gp_dff) {
cell(GP_DFF) {
area: 1;
ff("IQ", "IQN") { clocked_on: CLK;
- next_state: D; }
+ next_state: D; }
pin(CLK) { direction: input;
- clock: true; }
+ clock: true; }
pin(D) { direction: input; }
pin(Q) { direction: output;
function: "IQ"; }
@@ -24,10 +24,10 @@ library(gp_dff) {
cell(GP_DFFR) {
area: 1;
ff("IQ", "IQN") { clocked_on: CLK;
- next_state: D;
- clear: "nRST'"; }
+ next_state: D;
+ clear: "nRST'"; }
pin(CLK) { direction: input;
- clock: true; }
+ clock: true; }
pin(D) { direction: input; }
pin(Q) { direction: output;
function: "IQ"; }