Line 40... |
Line 40... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.1 2003/01/27 16:49:31 mihad
|
|
// Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
|
|
//
|
// Revision 1.4 2002/08/19 16:54:25 mihad
|
// Revision 1.4 2002/08/19 16:54:25 mihad
|
// Got rid of undef directives
|
// Got rid of undef directives
|
//
|
//
|
// Revision 1.3 2002/02/01 15:25:13 mihad
|
// Revision 1.3 2002/02/01 15:25:13 mihad
|
// Repaired a few bugs, updated specification, added test bench files and design document
|
// Repaired a few bugs, updated specification, added test bench files and design document
|
Line 443... |
Line 446... |
// only host implementation has access for generating interrupt acknowledge and configuration cycles
|
// only host implementation has access for generating interrupt acknowledge and configuration cycles
|
// configuration cycle data register hit
|
// configuration cycle data register hit
|
reg current_delayed_is_ccyc ;
|
reg current_delayed_is_ccyc ;
|
reg current_delayed_is_iack ;
|
reg current_delayed_is_iack ;
|
|
|
wire wccyc_hit = (wb_addr_in[8:2] == {1'b1, `CNF_DATA_ADDR}) && alligned_address ;
|
wire wccyc_hit = (wb_addr_in[8:2] == {1'b1, `CNF_DATA_ADDR}) `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif ;
|
wire wiack_hit = (wb_addr_in[8:2] == {1'b1, `INT_ACK_ADDR}) && alligned_address ;
|
wire wiack_hit = (wb_addr_in[8:2] == {1'b1, `INT_ACK_ADDR}) `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif ;
|
reg iack_hit ;
|
reg iack_hit ;
|
reg ccyc_hit ;
|
reg ccyc_hit ;
|
always@(posedge reset_in or posedge wb_clock_in)
|
always@(posedge reset_in or posedge wb_clock_in)
|
begin
|
begin
|
if (reset_in)
|
if (reset_in)
|
Line 863... |
Line 866... |
end // S_READ
|
end // S_READ
|
|
|
S_CONF_WRITE: begin
|
S_CONF_WRITE: begin
|
`ifdef HOST
|
`ifdef HOST
|
wbw_data_out_sel = SEL_CCYC_ADDR ;
|
wbw_data_out_sel = SEL_CCYC_ADDR ;
|
del_req = do_ccyc_req && ~burst_transfer && alligned_address ;
|
del_req = do_ccyc_req && ~burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif ;
|
del_done = do_ccyc_comp && ~burst_transfer && alligned_address ;
|
del_done = do_ccyc_comp && ~burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif ;
|
del_in_progress = do_ccyc_comp && ~burst_transfer && alligned_address ;
|
del_in_progress = do_ccyc_comp && ~burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif ;
|
`endif
|
`endif
|
|
|
n_state = S_IDLE ; // next state after configuration access is always idle
|
n_state = S_IDLE ; // next state after configuration access is always idle
|
|
|
if ( burst_transfer || ~alligned_address )
|
if ( burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else | ~alligned_address `endif )
|
begin
|
begin
|
err = 1'b1 ;
|
err = 1'b1 ;
|
end
|
end
|
else
|
else
|
begin
|
begin
|
Line 902... |
Line 905... |
end // S_CONF_WRITE
|
end // S_CONF_WRITE
|
|
|
S_CONF_READ: begin
|
S_CONF_READ: begin
|
`ifdef HOST
|
`ifdef HOST
|
wbw_data_out_sel = SEL_CCYC_ADDR ;
|
wbw_data_out_sel = SEL_CCYC_ADDR ;
|
del_req = ~burst_transfer && alligned_address && ( do_ccyc_req || do_iack_req );
|
del_req = ~burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif && ( do_ccyc_req || do_iack_req ) ;
|
del_done = ~burst_transfer && alligned_address && ( do_ccyc_comp || do_iack_comp ) ;
|
del_done = ~burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif && ( do_ccyc_comp || do_iack_comp ) ;
|
del_in_progress = ~burst_transfer && alligned_address && ( do_ccyc_comp || do_iack_comp ) ;
|
del_in_progress = ~burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif && ( do_ccyc_comp || do_iack_comp ) ;
|
wbr_fifo_renable = ~burst_transfer && alligned_address && ( do_ccyc_comp || do_iack_comp ) ;
|
wbr_fifo_renable = ~burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else && alligned_address `endif && ( do_ccyc_comp || do_iack_comp ) ;
|
`endif
|
`endif
|
|
|
n_state = S_IDLE ; // next state after configuration access is always idle
|
n_state = S_IDLE ; // next state after configuration access is always idle
|
|
|
if ( burst_transfer || ~alligned_address )
|
if ( burst_transfer `ifdef PCI_WBS_ALLOW_NON_ALLIGNED_CONFIG_ACCESS `else | ~alligned_address `endif )
|
begin
|
begin
|
err = 1'b1 ;
|
err = 1'b1 ;
|
end
|
end
|
else
|
else
|
begin
|
begin
|