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

Subversion Repositories wbuart32

[/] [wbuart32/] [trunk/] [bench/] [verilog/] [linetest.v] - Diff between revs 13 and 15

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

Rev 13 Rev 15
Line 52... Line 52...
//
//
`ifndef VERILATOR
`ifndef VERILATOR
`define OPT_STANDALONE
`define OPT_STANDALONE
`endif
`endif
//
//
 
//
 
// Two versions of the UART can be found in the rtl directory: a full featured
 
// UART, and a LITE UART that only handles 8N1 -- no break sending, break
 
// detection, parity error detection, etc.  If we set USE_LITE_UART here, those
 
// simplified UART modules will be used.
 
//
 
// `define      USE_LITE_UART
 
//
 
//
module  linetest(i_clk,
module  linetest(i_clk,
`ifndef OPT_STANDALONE
`ifndef OPT_STANDALONE
                        i_setup,
                        i_setup,
`endif
`endif
                        i_uart_rx, o_uart_tx);
                        i_uart_rx, o_uart_tx);
Line 94... Line 103...
        // frame errors will also be valid at that time.  Finally, we'll ignore
        // frame errors will also be valid at that time.  Finally, we'll ignore
        // errors, and even the clocked uart input distributed from here.
        // errors, and even the clocked uart input distributed from here.
        wire    rx_stb, rx_break, rx_perr, rx_ferr, rx_ignored;
        wire    rx_stb, rx_break, rx_perr, rx_ferr, rx_ignored;
        wire    [7:0]    rx_data;
        wire    [7:0]    rx_data;
 
 
 
`ifdef  USE_LITE_UART
 
        rxuartlite #(24'd868)
 
                receiver(i_clk, i_uart_rx, rx_stb, rx_data);
 
`else
        rxuart  receiver(i_clk, pwr_reset, i_setup, i_uart_rx, rx_stb, rx_data,
        rxuart  receiver(i_clk, pwr_reset, i_setup, i_uart_rx, rx_stb, rx_data,
                        rx_break, rx_perr, rx_ferr, rx_ignored);
                        rx_break, rx_perr, rx_ferr, rx_ignored);
 
`endif
 
 
 
 
        // The next step in this process is to dump everything we read into a 
        // The next step in this process is to dump everything we read into a 
        // FIFO.  First step: writing into the FIFO.  Always write into FIFO
        // FIFO.  First step: writing into the FIFO.  Always write into FIFO
        // memory.  (The next step will step the memory address if rx_stb was
        // memory.  (The next step will step the memory address if rx_stb was
Line 199... Line 213...
                        tail <= 8'h00;
                        tail <= 8'h00;
                else if ((tx_stb)&&(!tx_busy))
                else if ((tx_stb)&&(!tx_busy))
                        tail <= tail + 8'h01;
                        tail <= tail + 8'h01;
 
 
        // Bypass any hardwaare flow control
        // Bypass any hardwaare flow control
        wire    rts;
        wire    cts_n;
        assign  rts = 1'b1;
        assign  cts_n = 1'b0;
 
 
 
`ifdef  USE_LITE_UART
 
        txuartlite #(24'd868)
 
                transmitter(i_clk, tx_stb, tx_data, o_uart_tx, tx_busy);
 
`else
        txuart  transmitter(i_clk, pwr_reset, i_setup, tx_break,
        txuart  transmitter(i_clk, pwr_reset, i_setup, tx_break,
                        tx_stb, tx_data, rts, o_uart_tx, tx_busy);
                        tx_stb, tx_data, cts_n, o_uart_tx, tx_busy);
 
`endif
 
 
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.