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

Subversion Repositories spacewire_light

[/] [spacewire_light/] [trunk/] [rtl/] [vhdl/] [spwstream.vhd] - Diff between revs 3 and 4

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

Rev 3 Rev 4
Line 406... Line 406...
            -- not connected
            -- not connected
            v.rxpacket  := '0';
            v.rxpacket  := '0';
            v.txpacket  := '0';
            v.txpacket  := '0';
        end if;
        end if;
 
 
        -- Clear the discard flags when the link is explicitly disabled.
        -- Clear the discard flag when the link is explicitly disabled.
        if linkdis = '1' then
        if linkdis = '1' then
            v.rxeep     := '0';
 
            v.txdiscard := '0';
            v.txdiscard := '0';
        end if;
        end if;
 
 
        -- Update RX fifo pointers.
        -- Update RX fifo pointers.
        if (rxread = '1') and (r.rxfifo_rvalid = '1') then
        if (rxread = '1') and (r.rxfifo_rvalid = '1') then
Line 456... Line 455...
 
 
        -- Keep track of whether the TX fifo contains valid data.
        -- Keep track of whether the TX fifo contains valid data.
        -- (use new value of txfifo_raddr)
        -- (use new value of txfifo_raddr)
        v.txfifo_rvalid := bool_to_logic(v.txfifo_raddr /= r.txfifo_waddr);
        v.txfifo_rvalid := bool_to_logic(v.txfifo_raddr /= r.txfifo_waddr);
 
 
        -- Update room in TX fifo (use new value of both txfifo_waddr).
        -- Update room in TX fifo (use new value of txfifo_waddr).
        v_tmptxroom := unsigned(r.txfifo_raddr) - unsigned(v.txfifo_waddr) - 1;
        v_tmptxroom := unsigned(r.txfifo_raddr) - unsigned(v.txfifo_waddr) - 1;
        v.txfull    := bool_to_logic(v_tmptxroom = 0);
        v.txfull    := bool_to_logic(v_tmptxroom = 0);
        v.txhalff   := not v_tmptxroom(v_tmptxroom'high);
        v.txhalff   := not v_tmptxroom(v_tmptxroom'high);
 
 
        -- If an error occurs, set a flag to discard the current packet.
        -- If an error occurs, set a flag to discard the current packet.
        if (linko.errdisc or linko.errpar or
        if (linko.errdisc or linko.errpar or
            linko.erresc or linko.errcred) = '1' then
            linko.erresc or linko.errcred) = '1' then
            v.rxeep     := v.rxeep or v.rxpacket;   -- use new value of rxpacket
            v.rxeep     := v.rxeep or v.rxpacket;   -- use new value of rxpacket
            v.txdiscard := v.txdiscard or r.txpacket;
            v.txdiscard := v.txdiscard or v.txpacket;   -- use new value of txpacket
            v.rxpacket  := '0';
            v.rxpacket  := '0';
            v.txpacket  := '0';
            v.txpacket  := '0';
        end if;
        end if;
 
 
        -- Drive control signals to RX fifo.
        -- Drive control signals to RX fifo.

powered by: WebSVN 2.1.0

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