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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [Projects/] [opencores.org/] [logic/] [ip/] [uart/] [rtl/] [verilog/] [top.body] - Blame information for rev 134

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 131 jt_eaton
assign  txd_break_n  = !txd_break ;
2
 
3
 
4
 
5
always@(posedge clk)
6
  if(reset)            rts_pad_out  <= 1'b0;
7
  else                 rts_pad_out  <= rts_in;
8
 
9
always@(posedge clk)
10
  if(reset)            cts_out      <= 1'b0;
11
  else                 cts_out      <= cts_pad_in;
12
 
13
 
14 134 jt_eaton
reg  [DIV_SIZE-1:0]        baud_divide_cnt;
15
reg                        baud_divider_out;
16 131 jt_eaton
 
17 134 jt_eaton
always@(posedge clk)
18
  if(reset)            baud_divider_out    <= 1'b1;
19
  else
20
  if(!baud_clk)        baud_divider_out    <= 1'b0;
21
  else                 baud_divider_out    <=  ( baud_divide_cnt == {DIV_SIZE{1'b0}} );
22 131 jt_eaton
 
23
 
24 134 jt_eaton
 
25
always@(posedge clk)
26
  if(reset)                  baud_divide_cnt    <= divider_in;
27
  else
28
  if(!baud_clk)              baud_divide_cnt    <= baud_divide_cnt;
29
  else
30
  if(!(|baud_divide_cnt))    baud_divide_cnt    <= divider_in;
31
  else                       baud_divide_cnt    <= baud_divide_cnt - 'b1;
32
 
33
 
34
 
35
 
36 131 jt_eaton
generate
37
 
38
if(DIV == 0)
39
  begin
40
assign    baud_clk_div = baud_clk;
41
  end
42
else
43
begin
44 134 jt_eaton
 
45
assign    baud_clk_div  = baud_divider_out;
46 131 jt_eaton
end
47
 
48
endgenerate
49
 
50
 
51
 
52
 
53
 
54
 
55
     always@(*)  xmit_start       = txd_load;
56
     assign fifo_data_out    = txd_data_in;
57
     assign txd_buffer_empty = cde_buffer_empty;
58
 
59
 
60
 
61
 
62
 
63
 

powered by: WebSVN 2.1.0

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