Line 39... |
Line 39... |
//// Public License along with this source; if not, download it ////
|
//// Public License along with this source; if not, download it ////
|
//// from <http://www.opencores.org/lgpl.shtml> ////
|
//// from <http://www.opencores.org/lgpl.shtml> ////
|
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// $Id: sxp.v,v 1.6 2001-12-05 18:12:08 samg Exp $
|
// $Id: sxp.v,v 1.7 2001-12-06 16:12:06 samg Exp $
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.6 2001/12/05 18:12:08 samg
|
|
// Rewrote verilog for write enable signals for different destinations in the last stage.
|
|
// The code is much easier to read and more liner to follow.
|
|
//
|
// Revision 1.5 2001/12/05 05:58:10 samg
|
// Revision 1.5 2001/12/05 05:58:10 samg
|
// fixed sensitivity list error in last pipeline stage
|
// fixed sensitivity list error in last pipeline stage
|
//
|
//
|
// Revision 1.4 2001/11/09 00:45:59 samg
|
// Revision 1.4 2001/11/09 00:45:59 samg
|
// integrated common rams into processor
|
// integrated common rams into processor
|
Line 693... |
Line 697... |
begin
|
begin
|
wec = jal_4;
|
wec = jal_4;
|
set_pc = 1'b 1;
|
set_pc = 1'b 1;
|
end
|
end
|
else // Cond jump not taken (nothing done)
|
else // Cond jump not taken (nothing done)
|
begin
|
{wec, set_pc} = 2'b 00;
|
wec = 1'b 0;
|
|
set_pc = 1'b 0;
|
|
end
|
|
else // Typical JAL type instruction
|
else // Typical JAL type instruction
|
begin
|
begin
|
wec = jal_4;
|
wec = jal_4;
|
set_pc = 1'b 1;
|
set_pc = 1'b 1;
|
end
|
end
|
Line 711... |
Line 712... |
endcase
|
endcase
|
else
|
else
|
{wec, set_pc, spw_we, ext_we} = 4'b 0000;
|
{wec, set_pc, spw_we, ext_we} = 4'b 0000;
|
end
|
end
|
|
|
assign regc_data = (wec && set_pc) ? pcn_4 : wb_data; // data to write to reg port C
|
assign regc_data = (wec && set_pc) ? pcn_4 : wb_data; // data to write to reg port C (JAL or Data)
|
assign addrc_wb = dest_addr_4; // reg file write back address
|
assign addrc_wb = dest_addr_4; // reg file write back address
|
|
|
assign nop_detect = inst_vld_4 & ~(wec | set_pc | spw_we | ext_we); // 1 when no operation is being done
|
assign nop_detect = inst_vld_4 & ~(wec | set_pc | spw_we | ext_we); // 1 when no operation is being done
|
|
|
assign extw_data = wb_data; // extension data for writing
|
assign extw_data = wb_data; // extension data for writing
|