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

Subversion Repositories softavrcore

[/] [softavrcore/] [trunk/] [peripherals/] [avr_io_out.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 apal
/*****************************************************************************/
2
/* avr_io_out.v                                                              */
3
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
4
/* (c) 2019-2020; Andras Pal <apal@szofi.net>                                */
5
/*****************************************************************************/
6
 
7
module avr_io_out
8
 (      input clk,
9
        input rst,
10
 
11
        input io_re,
12
        input io_we,
13
        output [7:0] io_do,
14
        input [7:0] io_di,
15
 
16
        output [7:0] port
17
 );
18
 
19
reg [7:0] PORT;
20
 
21
assign port[7:0] = PORT[7:0];
22
 
23
assign io_do = io_re ? PORT : 8'b00000000;
24
 
25
always @(posedge clk) begin
26
 
27
        if (io_we) begin
28
                PORT <= io_di;
29
        end
30
 
31
end
32
 
33
 
34
/*****************************************************************************/
35
/* Debug section starts here */
36
 
37
/* end of debug section */
38
/*****************************************************************************/
39
 
40
endmodule
41
 
42
/*****************************************************************************/

powered by: WebSVN 2.1.0

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