aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sim/dffsr.v
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sim/dffsr.v')
-rw-r--r--tests/sim/dffsr.v9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/sim/dffsr.v b/tests/sim/dffsr.v
new file mode 100644
index 000000000..2158708f1
--- /dev/null
+++ b/tests/sim/dffsr.v
@@ -0,0 +1,9 @@
+module dffsr( input clk, d, clr, set, output reg q );
+ always @( posedge clk, posedge set, posedge clr)
+ if ( clr )
+ q <= 0;
+ else if (set)
+ q <= 1;
+ else
+ q <= d;
+endmodule