Line 16... |
Line 16... |
// You should have received a copy of the GNU General Public
|
// You should have received a copy of the GNU General Public
|
// License along with this work; if not, write to the Free Software
|
// License along with this work; if not, write to the Free Software
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
//
|
//
|
// ========== Copyright Header End ============================================
|
// ========== Copyright Header End ============================================
|
|
`ifdef SIMPLY_RISC_TWEAKS
|
|
`define SIMPLY_RISC_SCANIN .si(0)
|
|
`else
|
|
`define SIMPLY_RISC_SCANIN .si()
|
|
`endif
|
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
/*
|
/*
|
// Module Name: sparc_ifu_rndrob
|
// Module Name: sparc_ifu_rndrob
|
// Description:
|
// Description:
|
// Round robin scheduler. Least priority to the last granted
|
// Round robin scheduler. Least priority to the last granted
|
Line 56... |
Line 61... |
park_vec;
|
park_vec;
|
|
|
assign next_pv[3:1] = pv[3:1] & {3{~reset}};
|
assign next_pv[3:1] = pv[3:1] & {3{~reset}};
|
assign next_pv[0] = pv[0] | reset;
|
assign next_pv[0] = pv[0] | reset;
|
|
|
dff #4 park_reg(.din (next_pv),
|
dff_s #4 park_reg(.din (next_pv),
|
.clk (clk),
|
.clk (clk),
|
.q (park_vec),
|
.q (park_vec),
|
.se (se), .si(), .so());
|
.se (se), `SIMPLY_RISC_SCANIN, .so());
|
|
|
// if noone requests, don't advance, otherwise we'll go back to 0
|
// if noone requests, don't advance, otherwise we'll go back to 0
|
// and will not be fair to other requestors
|
// and will not be fair to other requestors
|
assign gv[0] = park_vec[3] & req_vec[0] |
|
assign gv[0] = park_vec[3] & req_vec[0] |
|
park_vec[2] & ~req_vec[3] & req_vec[0] |
|
park_vec[2] & ~req_vec[3] & req_vec[0] |
|