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

Subversion Repositories wbuart32

[/] [wbuart32/] [trunk/] [bench/] [verilog/] [helloworld.v] - Diff between revs 5 and 10

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 5 Rev 10
Line 55... Line 55...
                        o_uart_tx);
                        o_uart_tx);
        //
        //
        input           i_clk;
        input           i_clk;
        output  wire    o_uart_tx;
        output  wire    o_uart_tx;
`ifndef OPT_STANDALONE
`ifndef OPT_STANDALONE
        input   [29:0]   i_setup;
        input   [30:0]   i_setup;
`endif
`endif
 
 
        // If i_setup isnt set up as an input parameter, it needs to be set.
        // If i_setup isnt set up as an input parameter, it needs to be set.
        // We do so here, to a setting appropriate to create a 115200 Baud
        // We do so here, to a setting appropriate to create a 115200 Baud
        // comms system from a 100MHz clock.  This also sets us to an 8-bit
        // comms system from a 100MHz clock.  This also sets us to an 8-bit
        // data word, 1-stop bit, and no parity.
        // data word, 1-stop bit, and no parity.
`ifdef  OPT_STANDALONE
`ifdef  OPT_STANDALONE
        wire    [29:0]   i_setup;
        wire    [30:0]   i_setup;
        assign          i_setup = 30'd868;       // 115200 Baud, if clk @ 100MHz
        assign          i_setup = 31'd868;      // 115200 Baud, if clk @ 100MHz
`endif
`endif
 
 
        reg     pwr_reset;
        reg     pwr_reset;
        initial pwr_reset = 1'b1;
        initial pwr_reset = 1'b1;
        always @(posedge i_clk)
        always @(posedge i_clk)
Line 119... Line 119...
                if (&counter)
                if (&counter)
                        tx_stb <= 1'b1;
                        tx_stb <= 1'b1;
                else if ((tx_stb)&&(!tx_busy)&&(tx_index==4'hf))
                else if ((tx_stb)&&(!tx_busy)&&(tx_index==4'hf))
                        tx_stb <= 1'b0;
                        tx_stb <= 1'b0;
 
 
 
        // Bypass any hardware flow control
 
        wire    rts;
 
        assign  rts = 1'b1;
 
 
        txuart  transmitter(i_clk, pwr_reset, i_setup, tx_break,
        txuart  transmitter(i_clk, pwr_reset, i_setup, tx_break,
                        tx_stb, tx_data, o_uart_tx, tx_busy);
                        tx_stb, tx_data, rts, o_uart_tx, tx_busy);
 
 
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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