Line 1... |
Line 1... |
/*
|
/*
|
* $Id: aeMB_control.v,v 1.4 2007-04-27 00:23:55 sybreon Exp $
|
* $Id: aeMB_control.v,v 1.5 2007-05-16 12:32:21 sybreon Exp $
|
*
|
*
|
* AE68 System Control Unit
|
* AE68 System Control Unit
|
* Copyright (C) 2004-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
* Copyright (C) 2004-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
*
|
*
|
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
Line 22... |
Line 22... |
* DESCRIPTION
|
* DESCRIPTION
|
* Controls the state of the processor.
|
* Controls the state of the processor.
|
*
|
*
|
* HISTORY
|
* HISTORY
|
* $Log: not supported by cvs2svn $
|
* $Log: not supported by cvs2svn $
|
|
* Revision 1.4 2007/04/27 00:23:55 sybreon
|
|
* Added code documentation.
|
|
* Improved size & speed of rtl/verilog/aeMB_aslu.v
|
|
*
|
* Revision 1.3 2007/04/11 04:30:43 sybreon
|
* Revision 1.3 2007/04/11 04:30:43 sybreon
|
* Added pipeline stalling from incomplete bus cycles.
|
* Added pipeline stalling from incomplete bus cycles.
|
* Separated sync and async portions of code.
|
* Separated sync and async portions of code.
|
*
|
*
|
* Revision 1.2 2007/04/04 14:08:34 sybreon
|
* Revision 1.2 2007/04/04 14:08:34 sybreon
|
Line 148... |
Line 152... |
Pipeline bubbles are introduced during a branch or interrupt.
|
Pipeline bubbles are introduced during a branch or interrupt.
|
|
|
TODO: Implement interrupt bubble.
|
TODO: Implement interrupt bubble.
|
*/
|
*/
|
|
|
reg [1:0] rRUN;
|
reg [1:0] rRUN, xRUN;
|
assign {drun,frun} = rRUN;
|
assign {drun,frun} = rRUN;
|
|
|
|
always @(/*AUTOSENSE*/rBRA or rDLY) begin
|
|
xRUN <= {~(rBRA ^ rDLY), ~rBRA};
|
|
end
|
|
|
always @(posedge nclk or negedge nrst)
|
always @(posedge nclk or negedge nrst)
|
if (!nrst) begin
|
if (!nrst) begin
|
rRUN <= 2'h3;
|
rRUN <= 2'h3;
|
/*AUTORESET*/
|
/*AUTORESET*/
|
end else begin
|
end else begin
|
rRUN <= #1 {~(rBRA ^ rDLY), ~rBRA};
|
rRUN <= #1 xRUN;
|
end
|
end
|
|
|
/**
|
/**
|
Clock/Reset
|
Clock/Reset
|
-----------
|
-----------
|