Last active
August 12, 2018 09:13
-
-
Save diningyo/5d0bb6b1b943b3b16022b53b8be764b9 to your computer and use it in GitHub Desktop.
シミュレーションテスト用FF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`timescale 1ns / 1ps | |
// FF | |
module test_ff( | |
input wire clk | |
,input wire rst_n | |
,input wire [31:0] i_data | |
,input wire wren | |
,output reg [31:0] o_data | |
); | |
always @(posedge clk or negedge rst_n) begin | |
if (!rst_n) begin | |
o_data <= #1 {32{1'b0}}; | |
end | |
else if (wren) begin | |
o_data <= #1 i_data; | |
end | |
end | |
endmodule // test_ff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment