-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfsm.v
More file actions
46 lines (44 loc) · 924 Bytes
/
fsm.v
File metadata and controls
46 lines (44 loc) · 924 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 17.01.2026 18:41:44
// Design Name:
// Module Name: fsm
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module fsm();
reg D;
reg Clk,Rst;
wire O;
moore_fsm dut(.data(D),.rst(Rst),.clk(Clk),.out(O));
initial begin
Clk=0;
D=0; Rst=0;
@(posedge Clk) Rst=1;
@(posedge Clk) Rst=0; D=1;
@(posedge Clk) D=1;
@(posedge Clk) D=0;
@(posedge Clk) D=1;
@(posedge Clk) D=1;
@(posedge Clk) D=0;
@(posedge Clk) D=0;
@(posedge Clk) D=1;
@(posedge Clk) D=0;
@(posedge Clk) D=1;
@( posedge Clk) Rst=1;
$stop;
end
always #5 Clk=~Clk;
endmodule