OpenCores
URL https://opencores.org/ocsvn/nysa_sata/nysa_sata/trunk

Subversion Repositories nysa_sata

[/] [nysa_sata/] [trunk/] [sim/] [hd_data_writer.v] - Blame information for rev 4

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 cospan
module hd_data_writer(
2
    input               clk,
3
    input               rst,
4
    input               enable,
5
 
6
    output  reg [31:0]  data,
7
    input               strobe
8
);
9
 
10
//Registers and Wires
11
reg             [31:0]  test_data;
12
 
13
//Submodules
14
 
15
//Asynchronous Logic
16
 
17
 
18
//Synchronous Logic
19
always @ (posedge clk) begin
20
    if (rst) begin
21
        test_data       <=  0;
22
        data            <=  0;
23
    end
24
    else begin
25
        if (enable) begin
26
            data            <=  test_data;
27
            if (strobe) begin
28
                test_data   <=  test_data + 1;
29
            end
30
        end
31
        else begin
32
            test_data   <=  0;
33
        end
34
    end
35
end
36
 
37
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.