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

Subversion Repositories wb_lpc

[/] [wb_lpc/] [trunk/] [rtl/] [verilog/] [wb_lpc_host.v] - Diff between revs 5 and 15

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

Rev 5 Rev 15
Line 1... Line 1...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
////                                                              ////
////                                                              ////
////  $Id: wb_lpc_host.v,v 1.2 2008-03-05 05:50:25 hharte Exp $   ////
////  $Id: wb_lpc_host.v,v 1.3 2008-07-22 13:46:42 hharte Exp $   ////
////  wb_lpc_host.v - Wishbone Slave to LPC Host Bridge           ////
////  wb_lpc_host.v - Wishbone Slave to LPC Host Bridge           ////
////                                                              ////
////                                                              ////
////  This file is part of the Wishbone LPC Bridge project        ////
////  This file is part of the Wishbone LPC Bridge project        ////
////  http://www.opencores.org/projects/wb_lpc/                   ////
////  http://www.opencores.org/projects/wb_lpc/                   ////
////                                                              ////
////                                                              ////
Line 163... Line 163...
                    begin
                    begin
                        lframe_o <= 1'b0;       // In case we came here from a Firmware cycle, which skips CYCTYP.
                        lframe_o <= 1'b0;       // In case we came here from a Firmware cycle, which skips CYCTYP.
 
 
                        // The LPC Bus Address is sent across the bus a nibble at a time;
                        // The LPC Bus Address is sent across the bus a nibble at a time;
                        // however, the most significant nibble is sent first.  For firmware and
                        // however, the most significant nibble is sent first.  For firmware and
                        // memory cycles, the address is 32-bits.  Actually, for memeory accesses,
                        // memory cycles, the address is 32-bits.  Actually, for firmware accesses,
                        // the most significant nibble is known as the IDSEL field.  For I/O,
                        // the most significant nibble is known as the IDSEL field.  For I/O,
                        // the address is only 16-bits wide.
                        // the address is only 16-bits wide.
                        case(adr_cnt)
                        case(adr_cnt)
                            3'h0:
                            3'h0:
                                lad_o <= wbs_adr_i[31:28];
                                lad_o <= wbs_adr_i[31:28];
Line 269... Line 269...
 
 
                        dat_cnt <= dat_cnt + 1;
                        dat_cnt <= dat_cnt + 1;
 
 
                        if(nibble_cnt == 1'b1) // end of byte
                        if(nibble_cnt == 1'b1) // end of byte
                            begin
                            begin
 
                                if((fw_xfr) && (byte_cnt != xfr_len-1)) // Firmware transfer does not have TAR between bytes.
 
                                    state <= `LPC_ST_H_DATA;
 
                                else
                                state <= `LPC_ST_H_TAR1;
                                state <= `LPC_ST_H_TAR1;
                            end
                            end
                        else
                        else
                            state <= `LPC_ST_H_DATA;
                            state <= `LPC_ST_H_DATA;
                    end
                    end
Line 326... Line 329...
                        dat_cnt <= dat_cnt + 1;
                        dat_cnt <= dat_cnt + 1;
 
 
                        if(nibble_cnt == 1'b1)          // Byte transfer complete
                        if(nibble_cnt == 1'b1)          // Byte transfer complete
                            if (byte_cnt == xfr_len-1)  // End of data transfer phase
                            if (byte_cnt == xfr_len-1)  // End of data transfer phase
                                state <= `LPC_ST_P_TAR1;
                                state <= `LPC_ST_P_TAR1;
 
                            else begin
 
                                if(fw_xfr) // Firmware transfer does not have TAR between bytes.
 
                                    state <= `LPC_ST_P_DATA;
                            else
                            else
                                state <= `LPC_ST_SYNC;
                                state <= `LPC_ST_SYNC;
 
                            end
                        else                            // Go to next nibble
                        else                            // Go to next nibble
                            state <= `LPC_ST_P_DATA;
                            state <= `LPC_ST_P_DATA;
                    end
                    end
                `LPC_ST_P_TAR1:
                `LPC_ST_P_TAR1:
                    begin
                    begin

powered by: WebSVN 2.1.0

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