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

Subversion Repositories spacewiresystemc

[/] [spacewiresystemc/] [trunk/] [rtl/] [RTL_VB/] [rx_spw.v] - Diff between revs 38 and 39

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

Rev 38 Rev 39
Line 405... Line 405...
        begin
        begin
                dta_timec_p  <= dta_timec;
                dta_timec_p  <= dta_timec;
        end
        end
end
end
 
 
always@(*)
always@(posedge ready_data_p or negedge rx_resetn )
begin
begin
 
 
        rx_error_d = 1'b0;
        if(!rx_resetn)
 
        begin
        if(last_is_control && ready_data_p)
                rx_error_d <= 1'b0;
 
        end
 
        else
 
        begin
 
                if(last_is_control)
        begin
        begin
                if(!(dta_timec[8]^control[0]^control[1]) != parity_rec_d)
                if(!(dta_timec[8]^control[0]^control[1]) != parity_rec_d)
                begin
                begin
                        rx_error_d = 1'b1;
                                rx_error_d <= 1'b1;
                end
                end
        end
        end
        else if(last_is_data && ready_data_p)
                else if(last_is_data)
        begin
        begin
                if(!(dta_timec[8]^data[7]^data[6]^data[5]^data[4]^data[3]^data[2]^data[1]^data[0]) != parity_rec_d)
                if(!(dta_timec[8]^data[7]^data[6]^data[5]^data[4]^data[3]^data[2]^data[1]^data[0]) != parity_rec_d)
                begin
                begin
                        rx_error_d = 1'b1;
                                rx_error_d <= 1'b1;
 
                        end
                end
                end
        end
        end
end
end
 
 
always@(*)
always@(posedge ready_control_p or negedge rx_resetn )
begin
begin
        rx_error_c = 1'b0;
 
 
 
        if(last_is_control && ready_control_p)
        if(!rx_resetn)
 
        begin
 
                rx_error_c <= 1'b0;
 
 
 
        end
 
        else
 
        begin
 
                if(last_is_control)
        begin
        begin
                if(!(control_r[2]^control[0]^control[1]) != parity_rec_c)
                if(!(control_r[2]^control[0]^control[1]) != parity_rec_c)
                begin
                begin
                        rx_error_c = 1'b1;
                                rx_error_c <= 1'b1;
                end
                end
        end
        end
        else if(last_is_data && ready_control_p)
                else if(last_is_data)
        begin
        begin
                if(!(control_r[2]^data[7]^data[6]^data[5]^data[4]^data[3]^data[2]^data[1]^data[0]) != parity_rec_c)
                if(!(control_r[2]^data[7]^data[6]^data[5]^data[4]^data[3]^data[2]^data[1]^data[0]) != parity_rec_c)
                begin
                begin
                        rx_error_c = 1'b1;
                                rx_error_c <= 1'b1;
                end
                end
        end
        end
end
end
 
 
 
end
 
 
always@(posedge negedge_clk or negedge rx_resetn)
always@(posedge negedge_clk or negedge rx_resetn)
begin
begin
 
 
        if(!rx_resetn)
        if(!rx_resetn)
        begin
        begin

powered by: WebSVN 2.1.0

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