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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_diligent_s3board/] [rtl/] [verilog/] [omsp_uart.v] - Diff between revs 136 and 197

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

Rev 136 Rev 197
Line 97... Line 97...
                       DATA_TX     =  'h4,
                       DATA_TX     =  'h4,
                       DATA_RX     =  'h5;
                       DATA_RX     =  'h5;
 
 
 
 
// Register one-hot decoder utilities
// Register one-hot decoder utilities
parameter              DEC_SZ      =  2**DEC_WD;
parameter              DEC_SZ      =  (1 << DEC_WD);
parameter [DEC_SZ-1:0] BASE_REG    =  {{DEC_SZ-1{1'b0}}, 1'b1};
parameter [DEC_SZ-1:0] BASE_REG    =  {{DEC_SZ-1{1'b0}}, 1'b1};
 
 
// Register one-hot decoder
// Register one-hot decoder
parameter [DEC_SZ-1:0] CTRL_D      = (BASE_REG << CTRL),
parameter [DEC_SZ-1:0] CTRL_D      = (BASE_REG << CTRL),
                       STATUS_D    = (BASE_REG << STATUS),
                       STATUS_D    = (BASE_REG << STATUS),
Line 229... Line 229...
wire       baud_hi_wr  = BAUD_HI[0] ? reg_hi_wr[BAUD_HI] : reg_lo_wr[BAUD_HI];
wire       baud_hi_wr  = BAUD_HI[0] ? reg_hi_wr[BAUD_HI] : reg_lo_wr[BAUD_HI];
wire [7:0] baud_hi_nxt = BAUD_HI[0] ? per_din[15:8]      : per_din[7:0];
wire [7:0] baud_hi_nxt = BAUD_HI[0] ? per_din[15:8]      : per_din[7:0];
 
 
always @ (posedge mclk or posedge puc_rst)
always @ (posedge mclk or posedge puc_rst)
  if (puc_rst)         baud_hi <=  8'h00;
  if (puc_rst)         baud_hi <=  8'h00;
  else if (baud_lo_wr) baud_hi <=  baud_hi_nxt;
  else if (baud_hi_wr) baud_hi <=  baud_hi_nxt;
 
 
 
 
wire [15:0] baudrate = {baud_hi, baud_lo};
wire [15:0] baudrate = {baud_hi, baud_lo};
 
 
 
 
Line 295... Line 295...
//--------------------------------
//--------------------------------
wire     uart_rxd_sync_n;
wire     uart_rxd_sync_n;
 
 
omsp_sync_cell sync_cell_uart_rxd (
omsp_sync_cell sync_cell_uart_rxd (
    .data_out (uart_rxd_sync_n),
    .data_out (uart_rxd_sync_n),
    .clk      (mclk),
    .data_meta (),
    .data_in  (~uart_rxd),
    .data_in  (~uart_rxd),
 
    .clk       (mclk),
    .rst      (puc_rst)
    .rst      (puc_rst)
);
);
wire uart_rxd_sync = ~uart_rxd_sync_n;
wire uart_rxd_sync = ~uart_rxd_sync_n;
 
 
// RXD input buffer
// RXD input buffer

powered by: WebSVN 2.1.0

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