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

Subversion Repositories microriscii

[/] [microriscii/] [trunk/] [verilog/] [rtl/] [wb.v] - Blame information for rev 19

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

Line No. Rev Author Line
1 12 alikat
//--------------------------------------------------------------------------------------------------
2
//
3
// Title       : wb
4
// Design      : MicroRISCII
5
// Author      : Ali Mashtizadeh
6
//
7
//-------------------------------------------------------------------------------------------------
8
`timescale 1ps / 1ps
9
 
10
module wb(clk,wb_halt,d_in,d_out,d_sel_in,d_sel_out,dwe_in,dwe_out,wb_flush);
11
        // Inputs
12
        input                   clk;
13
        wire                    clk;
14
        input                   wb_halt;
15
        wire                    wb_halt;
16
        input   [31:0]   d_in;
17
        wire    [31:0]   d_in;
18
        input   [3:0]    d_sel_in;
19
        wire    [3:0]    d_sel_in;
20
        input                   dwe_in;
21
        wire                    dwe_in;
22
        input                   wb_flush;
23
        wire                    wb_flush;
24
 
25
        // Outputs
26
        output  [31:0]   d_out;
27
        reg             [31:0]   d_out;
28
        output  [3:0]    d_sel_out;
29
        reg             [3:0]    d_sel_out;
30
        output                  dwe_out;
31
        reg                             dwe_out;
32
 
33
        always @ (posedge clk)
34
                begin
35
                        if (wb_halt == 1'b0)
36
                                begin
37
                                        d_out = d_in;
38
                                        d_sel_out = d_sel_in;
39
                                        if (wb_flush == 1'b1)
40
                                                dwe_out = 1'b0;
41
                                        else
42
                                                dwe_out = dwe_in;
43
                                end
44
                end
45
 
46
endmodule

powered by: WebSVN 2.1.0

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