Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `timescale 1ns / 1ps
- //////////////////////////////////////////////////////////////////////////////////
- // Company:
- // Engineer:
- //
- // Create Date: 20:14:52 08/15/2018
- // Design Name:
- // Module Name: delay
- // Project Name:
- // Target Devices:
- // Tool versions:
- // Description:
- //
- // Dependencies:
- //
- // Revision:
- // Revision 0.01 - File Created
- // Additional Comments:
- //
- //////////////////////////////////////////////////////////////////////////////////
- module delay(
- input as,
- input dtack,
- output out
- );
- parameter DELAYS = 15;
- wire [DELAYS:0] dtack_int;
- genvar c;
- generate
- for (c = 0; c < DELAYS; c = c + 1) begin: dtackint
- FDCP #(.INIT(1'b1))
- DTTACK_FF (
- .Q(dtack_int[c+1]), // Data output
- .C(~dtack_int[c]), // Clock input
- .CLR(1'b0), // Asynchronous clear input
- .D(1'b0), // Data input
- .PRE(as) // Asynchronous set input
- );
- end
- endgenerate
- assign dtack_int[0] = dtack;
- assign out = dtack_int[DELAYS];
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement