merge clock phase display into TState pseudobus

This commit is contained in:
BigEd 2017-10-28 13:49:46 +01:00 committed by GitHub
parent 76edc1186a
commit e0547e6c35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 12 deletions

View File

@ -307,14 +307,16 @@ function listActiveTCStates() {
// Show all time code node states (active and inactive) in fixed format, // Show all time code node states (active and inactive) in fixed format,
// with T1/T6 indication in square brackets. ".." for a node indicates // with T1/T6 indication in square brackets. ".." for a node indicates
// inactive state, "T"* for a node indicates active state. // inactive state, "T"* for a node indicates active state.
function allTCStates( useNBSP ) function allTCStates( useHTML )
{ {
var s = ""; var s = "";
var _spc; var _spc;
useNBSP = (typeof useNBSP === 'undefined') ? false : useNBSP; var _phi;
var useHTML = (typeof useHTML === 'undefined') ? false : useHTML;
// Use Non-Breaking Space for presentation in an HTML (browser) // Use Non-Breaking Space for presentation in an HTML (browser)
// context, else use ASCII space for logging context // context, else use ASCII space for logging context
_spc = useNBSP ? ' ' : ' '; _spc = useHTML ? ' ' : ' ';
_phi = useHTML ? 'Φ' : 'F';
var allHigh, thisHigh; var allHigh, thisHigh;
thisHigh = isNodeHigh( nodenames[ 'clock1' ] ); thisHigh = isNodeHigh( nodenames[ 'clock1' ] );
allHigh = thisHigh; allHigh = thisHigh;
@ -358,7 +360,8 @@ function allTCStates( useNBSP )
} else { } else {
s += ".."; s += "..";
} }
s += "]"; // indicate the clock phase, Phi1 or Phi2
s += "]" + _spc + _phi + (isNodeHigh( nodenames[ 'cp1' ] ) ? '1' : '2');
return s; return s;
} }
@ -390,14 +393,6 @@ function busToString(busname){
return listActiveTCStates(); return listActiveTCStates();
if(busname=='TState') if(busname=='TState')
return allTCStates( true ); return allTCStates( true );
if(busname=='TStateF')
// TState with phase indication tacked on: F1 or F2
// Prefer latin 'F' because that's what Greek phi really is:
// a single glyph for the "eff" speech sound
// Capitalized because the 'T's in the time state are
// capitalized
return allTCStates( true ) + ' ' + 'F' +
(isNodeHigh( nodenames[ 'cp1' ] ) ? '1' : '2');
if(busname=='Execute') if(busname=='Execute')
return disassemblytoHTML(readBits('ir',8)); return disassemblytoHTML(readBits('ir',8));
if(busname=='Fetch') if(busname=='Fetch')