-
Notifications
You must be signed in to change notification settings - Fork 0
/
D_FF.v
31 lines (30 loc) · 850 Bytes
/
D_FF.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer: Het soni
//
// Create Date: 17:27:10 10/11/2022
// Design Name:
// Module Name: D_FF
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module D_FF (q, d, rst_n, clk,init_value);
output q; //fpga4student.com: FPga projects, Verilog projects, VHDL projects
input d, rst_n, clk,init_value;
reg q; // Indicate that q is stateholding
always @(posedge clk or negedge rst_n)
if (~rst_n)
q <= init_value; // On reset, set to 0
else
q <= d; // Otherwise out = d
endmodule