Line 1... |
Line 1... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// $Id: wb_lpc_periph.v,v 1.1 2008-03-02 20:46:40 hharte Exp $
|
//// $Id: wb_lpc_periph.v,v 1.2 2008-03-05 05:50:59 hharte Exp $ ////
|
//// wb_lpc_periph.v - LPC Peripheral to Wishbone Master Bridge ////
|
//// wb_lpc_periph.v - LPC Peripheral to Wishbone Master 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 80... |
Line 80... |
// DMA-Specific sideband signals
|
// DMA-Specific sideband signals
|
output [2:0] dma_chan_o; // DMA Channel
|
output [2:0] dma_chan_o; // DMA Channel
|
output dma_tc_o; // DMA Terminal Count
|
output dma_tc_o; // DMA Terminal Count
|
|
|
reg [12:0] state; // Current state
|
reg [12:0] state; // Current state
|
reg [2:0] adr_cnt; // Address nibbe counter
|
reg [2:0] adr_cnt; // Address nibble counter
|
reg [3:0] dat_cnt; // Data nibble counter
|
reg [3:0] dat_cnt; // Data nibble counter
|
wire [2:0] byte_cnt = dat_cnt[3:1]; // Byte counter
|
wire [2:0] byte_cnt = dat_cnt[3:1]; // Byte counter
|
wire nibble_cnt = dat_cnt[0]; // Nibble counter
|
wire nibble_cnt = dat_cnt[0]; // Nibble counter
|
|
|
reg [31:0] lpc_dat_i; // Temporary storage for input data.
|
reg [31:0] lpc_dat_i; // Temporary storage for input data.
|
Line 360... |
Line 360... |
lad_o <= lpc_dat_i[31:28];
|
lad_o <= lpc_dat_i[31:28];
|
endcase
|
endcase
|
|
|
dat_cnt <= dat_cnt + 1;
|
dat_cnt <= dat_cnt + 1;
|
|
|
// if(nibble_cnt == 1'b1)
|
|
// state <= `LPC_ST_P_TAR1;
|
|
|
|
if(nibble_cnt == 1'b1) // Byte transfer complete
|
if(nibble_cnt == 1'b1) // Byte transfer complete
|
if (byte_cnt == xfr_len-1) // Byte transfer complete
|
if (byte_cnt == xfr_len-1) // Byte transfer complete
|
state <= `LPC_ST_P_TAR1;
|
state <= `LPC_ST_P_TAR1;
|
else
|
else
|
state <= `LPC_ST_SYNC;
|
state <= `LPC_ST_SYNC;
|
Line 403... |
Line 400... |
end
|
end
|
|
|
endmodule
|
endmodule
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|
|
|
No newline at end of file
|
No newline at end of file
|