|
|
|

|
|
|
|
|
|

|
|
 |
D latch
|
|
|

|
|
 |
Regular D Latch
|
|
|

|
|
|
1 //-----------------------------------------------------
2 // Design Name : dlatch_reset
3 // File Name : dlatch_reset.sv
4 // Function : DLATCH async reset
5 // Coder : Deepak Kumar Tala
6 //-----------------------------------------------------
7 module dlatch_reset (
8 input wire data , // Data Input
9 input wire en , // LatchInput
10 input wire reset , // Reset input
11 output reg q // Q output
12 );
13 //-------------Code Starts Here---------
14 always_latch
15 if (~reset) begin
16 q <= 1'b0;
17 end else if (en) begin
18 q <= data;
19 end
20
21 endmodule //End Of Module dlatch_reset
You could download file sv_examples here
|
|
|

|
|
|

|
|
|

|
|
|
|
|
|

|
|
|
|
|
|

|
|
Copyright © 1998-2025 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|