Line 1... |
Line 1... |
// ============================================================================
|
// ============================================================================
|
// CONTROL_LOGIC
|
// CONTROL_LOGIC
|
// - assorted control logic
|
// - assorted control logic
|
//
|
//
|
//
|
//
|
// (C) 2009,2010 Robert Finch
|
// (C) 2009,2010,2013 Robert Finch
|
// robfinch[remove]@opencores.org
|
// robfinch[remove]@finitron.ca
|
//
|
//
|
//
|
//
|
// This source file is free software: you can redistribute it and/or modify
|
// This source file is free software: you can redistribute it and/or modify
|
// it under the terms of the GNU Lesser General Public License as published
|
// it under the terms of the GNU Lesser General Public License as published
|
// by the Free Software Foundation, either version 3 of the License, or
|
// by the Free Software Foundation, either version 3 of the License, or
|
Line 201... |
Line 201... |
wire hasPrefix = prefix1!=8'h00;
|
wire hasPrefix = prefix1!=8'h00;
|
wire hasDoublePrefix = hasPrefix && prefix2!=8'h00;
|
wire hasDoublePrefix = hasPrefix && prefix2!=8'h00;
|
wire repz = prefix1==`REPZ || prefix2==`REPZ;
|
wire repz = prefix1==`REPZ || prefix2==`REPZ;
|
wire repnz = prefix1==`REPNZ || prefix2==`REPNZ;
|
wire repnz = prefix1==`REPNZ || prefix2==`REPNZ;
|
|
|
|
// ZF is tested only for SCAS, CMPS
|
wire repdone =
|
wire repdone =
|
((repz | repnz) & cxz) ||
|
((repz | repnz) & cxz) ||
|
(repz & !zf) ||
|
(repz && !zf && (ir==`SCASB||ir==`SCASW||ir==`CMPSB||ir==`CMPSW)) ||
|
(repnz & zf)
|
(repnz && zf && (ir==`SCASB||ir==`SCASW||ir==`CMPSB||ir==`CMPSW))
|
;
|
;
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|