UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
342 Views
Registered: ‎02-03-2019

AXI - UART 16550

Jump to solution

Can anybody please tell why block_value numbers 95,103,111 and so on assigning to lcr[3:0],I got the logic about (characters and stop bits),but i am not getting why the numbers 95,103 etc assigning.

https://opencores.org/websvn/filedetails?repname=uart16550&path=%2Fuart16550%2Ftrunk%2Frtl%2Fverilog%2Fuart_regs.v

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
243 Views
Registered: ‎01-09-2019

Re: AXI - UART 16550

Jump to solution

Hello shivunp8@gmail.com 

I just looked through the code you linked, but this is my interpretation.

It seems that those values are just the decimal value that would create a delay of a certain number of clock cycles.  If you look a few lines after those are defined it says that "on the posedge of the clock, if a write happened on the fifo, we will set that block_value to block_cnt".  Then for the next several clock cycles, the block_cnt is decremented until block_cnt is equal to all 0's.  The thre_set_en can be brought high because there is no 1's in the value for block_cnt.

Basically this entire logic is a delay function with variable delay depending on how the design was setup (if you have 2 stop bits you need more delay, and if you have 7 bits for each word that will take more delay than 5, but less than 8).  You can see these delays as comments in the switch-case statement for lcr (the value in the comments directly relates to the values in the Table 2-11 in PG143).

Thanks,

Caleb

Thanks,
Caleb
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
2 Replies
Xilinx Employee
Xilinx Employee
244 Views
Registered: ‎01-09-2019

Re: AXI - UART 16550

Jump to solution

Hello shivunp8@gmail.com 

I just looked through the code you linked, but this is my interpretation.

It seems that those values are just the decimal value that would create a delay of a certain number of clock cycles.  If you look a few lines after those are defined it says that "on the posedge of the clock, if a write happened on the fifo, we will set that block_value to block_cnt".  Then for the next several clock cycles, the block_cnt is decremented until block_cnt is equal to all 0's.  The thre_set_en can be brought high because there is no 1's in the value for block_cnt.

Basically this entire logic is a delay function with variable delay depending on how the design was setup (if you have 2 stop bits you need more delay, and if you have 7 bits for each word that will take more delay than 5, but less than 8).  You can see these delays as comments in the switch-case statement for lcr (the value in the comments directly relates to the values in the Table 2-11 in PG143).

Thanks,

Caleb

Thanks,
Caleb
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Scholar dgisselq
Scholar
232 Views
Registered: ‎05-21-2015

Re: AXI - UART 16550

Jump to solution

Do be aware that there are some serious flaws within that core, flaws that might even cause it to transmit something you didn't intend to transmit.

Just sayin,

Dan

0 Kudos