uart fifo full

OP (Company: ISO) #4583003
hello.

from pang chu book

"""The full and empty status of the respective FIFO buffers can be
tested by consecutively receiving and transmitting more than four data 
words.
my question is it possible to increase the number of data word that fifo 
can contain"""


in the uart code the fifo just 4 data words like when u send from 
hypertermianl word "" hello""
the fpga board turn it back like this "hellh"

it is possible to increase it, to make the word " hello " when i send 
from hypertermianl to fpga .. the fpga turn it back to hyperwindow " 
hello" not hellh"?

if it possible how can i do it ? if it not, why??!

thanks alot ..
(Company: www.dossmatik.de) #4583139
> if it possible how can i do it ? if it not, why??!

Yes this possible. the next size is 8,15,32,64,128.


You have to increase the vector type, that is yuse for RAM and also the 
addresssize of FIFO.
OP (Company: ISO) #4583288
do u mean
1
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.NUMERIC_STD.ALL;
4

5
entity fifo is
6
  generic(
7
    B: natural := 8;  -- Number of bits
8
    W: natural := 4    -- Number of address bits
9
  );
10
  port(
11
    clk, rst: in std_logic;
12
    rd, wr: in std_logic;
13
    w_data: in std_logic_vector(B-1 downto 0);
14
    empty, full: out std_logic;
15
    r_data: out std_logic_vector(B-1 downto 0)
16
  );

do u mean the w to change to 5? this is the number of adress bits in 
fifo ..

add it already the number of bits is 8
(Company: www.dossmatik.de) #4583671
Anan H. wrote:
> do u mean
>
>
1
library IEEE;
2
> use IEEE.STD_LOGIC_1164.ALL;
3
> use IEEE.NUMERIC_STD.ALL;
4
> 
5
> entity fifo is
6
>   generic(
7
>     B: natural := 8;  -- Number of bits
8
>     W: natural := 4    -- Number of address bits
9
>   );
10
>   port(
11
>     clk, rst: in std_logic;
12
>     rd, wr: in std_logic;
13
>     w_data: in std_logic_vector(B-1 downto 0);
14
>     empty, full: out std_logic;
15
>     r_data: out std_logic_vector(B-1 downto 0)
16
>   );
>
> do u mean the w to change to 5? this is the number of adress bits in
> fifo ..
>
> add it already the number of bits is 8

B have to be 8. This is 8bit -> 1byte

I mean W.

Reply

A question of your own? This thread is over 10 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.