aboutsummaryrefslogtreecommitdiffstats
path: root/tests/xilinx/latches.v
diff options
context:
space:
mode:
Diffstat (limited to 'tests/xilinx/latches.v')
-rw-r--r--tests/xilinx/latches.v40
1 files changed, 3 insertions, 37 deletions
diff --git a/tests/xilinx/latches.v b/tests/xilinx/latches.v
index 83bad7f35..adb5d5319 100644
--- a/tests/xilinx/latches.v
+++ b/tests/xilinx/latches.v
@@ -1,19 +1,19 @@
module latchp
- ( input d, en, output reg q );
+ ( input d, clk, en, output reg q );
always @*
if ( en )
q <= d;
endmodule
module latchn
- ( input d, en, output reg q );
+ ( input d, clk, en, output reg q );
always @*
if ( !en )
q <= d;
endmodule
module latchsr
- ( input d, en, clr, pre, output reg q );
+ ( input d, clk, en, clr, pre, output reg q );
always @*
if ( clr )
q <= 1'b0;
@@ -22,37 +22,3 @@ module latchsr
else if ( en )
q <= d;
endmodule
-
-
-module top (
-input clk,
-input clr,
-input pre,
-input a,
-output b,b1,b2
-);
-
-
-latchp u_latchp (
- .en (clk ),
- .d (a ),
- .q (b )
- );
-
-
-latchn u_latchn (
- .en (clk ),
- .d (a ),
- .q (b1 )
- );
-
-
-latchsr u_latchsr (
- .en (clk ),
- .clr (clr),
- .pre (pre),
- .d (a ),
- .q (b2 )
- );
-
-endmodule