mirror of
https://github.com/trebonian/visual6502.git
synced 2025-01-08 14:29:43 +00:00
add tracing of named nodes
This commit is contained in:
parent
cd05762f20
commit
294918789a
@ -122,10 +122,12 @@ $().ready(function(){
|
|||||||
|
|
||||||
<div id="tracingdiv">
|
<div id="tracingdiv">
|
||||||
<div id="expertControlPanel">
|
<div id="expertControlPanel">
|
||||||
<form>
|
<form action="javascript:updateLogList()">
|
||||||
<input type="button" value="Trace more" onclick="updateLoglevel(++loglevel)" />
|
<input type="button" value="Trace more" onclick="updateLoglevel(++loglevel)" />
|
||||||
<input type="button" value="Trace less" onclick="updateLoglevel(--loglevel)" />
|
<input type="button" value="Trace less" onclick="updateLoglevel(--loglevel)" />
|
||||||
<input type="button" value="Clear Log" onclick="updateLoglevel(loglevel)" />
|
<input type="button" value="Trace these too:" onclick="updateLogList()" />
|
||||||
|
<input type="text" id="LogThese" name="LogThese" value="" />
|
||||||
|
<input type="button" value="Clear Log" onclick="updateLoglevel(loglevel)" />
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2010 Brian Silverman, Barry Silverman
|
Copyright (c) 2010 Brian Silverman, Barry Silverman, Ed Spittles
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -101,6 +101,7 @@ function setup_part3(){
|
|||||||
function setup_part4(){
|
function setup_part4(){
|
||||||
setupTable();
|
setupTable();
|
||||||
setupNodeNameList();
|
setupNodeNameList();
|
||||||
|
logThese=signalSet(loglevel);
|
||||||
loadProgram();
|
loadProgram();
|
||||||
if(noSimulation){
|
if(noSimulation){
|
||||||
running=undefined;
|
running=undefined;
|
||||||
@ -293,7 +294,8 @@ function handleClick(e){
|
|||||||
|
|
||||||
function updateLoglevel(value){
|
function updateLoglevel(value){
|
||||||
loglevel = value;
|
loglevel = value;
|
||||||
initLogbox(signalSet(loglevel));
|
logThese = signalSet(loglevel);
|
||||||
|
initLogbox(logThese);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateExpertMode(isOn){
|
function updateExpertMode(isOn){
|
||||||
|
43
macros.js
43
macros.js
@ -25,6 +25,17 @@ var cycle = 0;
|
|||||||
var trace = Array();
|
var trace = Array();
|
||||||
var logstream = Array();
|
var logstream = Array();
|
||||||
var running = false;
|
var running = false;
|
||||||
|
var logThese=[];
|
||||||
|
var presetLogLists=[
|
||||||
|
['cycle'],
|
||||||
|
['ab','db','rw','sync','pc','a','x','y','s','p'],
|
||||||
|
['ir','tcstate','pd'],
|
||||||
|
['adl','adh','sb','alu'],
|
||||||
|
['alucin','alua','alub','alucout','aluvout','dasb'],
|
||||||
|
['plaOutputs'],
|
||||||
|
['idb','dor'],
|
||||||
|
['irq','nmi','res'],
|
||||||
|
];
|
||||||
|
|
||||||
function loadProgram(){
|
function loadProgram(){
|
||||||
// a moderate size of static testprogram might be loaded
|
// a moderate size of static testprogram might be loaded
|
||||||
@ -146,32 +157,32 @@ function initChip(){
|
|||||||
refresh();
|
refresh();
|
||||||
cycle = 0;
|
cycle = 0;
|
||||||
trace = Array();
|
trace = Array();
|
||||||
initLogbox(signalSet(loglevel));
|
initLogbox(logThese);
|
||||||
chipStatus();
|
chipStatus();
|
||||||
if(ctrace)console.log('initChip done after', now()-start);
|
if(ctrace)console.log('initChip done after', now()-start);
|
||||||
}
|
}
|
||||||
|
|
||||||
var logThese=[
|
|
||||||
['cycle'],
|
|
||||||
['ab','db','rw','sync','pc','a','x','y','s','p'],
|
|
||||||
['ir','tcstate','pd'],
|
|
||||||
['adl','adh','sb','alu'],
|
|
||||||
['alucin','alua','alub','alucout','aluvout','dasb'],
|
|
||||||
['plaOutputs'],
|
|
||||||
['idb','dor'],
|
|
||||||
['irq','nmi','res'],
|
|
||||||
];
|
|
||||||
|
|
||||||
function signalSet(n){
|
function signalSet(n){
|
||||||
var signals=[];
|
var signals=[];
|
||||||
for (var i=0; (i<=n)&&(i<logThese.length) ; i++){
|
for (var i=0; (i<=n)&&(i<presetLogLists.length) ; i++){
|
||||||
for (var j=0; j<logThese[i].length; j++){
|
for (var j=0; j<presetLogLists[i].length; j++){
|
||||||
signals.push(logThese[i][j]);
|
signals.push(presetLogLists[i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return signals;
|
return signals;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateLogList(){
|
||||||
|
// user supplied a list of signals, which we append to the set defined by loglevel
|
||||||
|
logThese = signalSet(loglevel);
|
||||||
|
var tmplist = document.getElementById('LogThese').value.split(/[\s,]+/);
|
||||||
|
for(var i=0;i<tmplist.length;i++){
|
||||||
|
if(typeof nodes[nodenames[tmplist[i]]] != "undefined")
|
||||||
|
logThese.push(tmplist[i]);
|
||||||
|
}
|
||||||
|
initLogbox(logThese);
|
||||||
|
}
|
||||||
|
|
||||||
var traceChecksum='';
|
var traceChecksum='';
|
||||||
var goldenChecksum;
|
var goldenChecksum;
|
||||||
|
|
||||||
@ -383,7 +394,7 @@ function chipStatus(){
|
|||||||
chk=" Chk:" + traceChecksum + ((traceChecksum==goldenChecksum)?" OK":" no match");
|
chk=" Chk:" + traceChecksum + ((traceChecksum==goldenChecksum)?" OK":" no match");
|
||||||
setStatus(machine1, machine2, "Hz: " + estimatedHz().toFixed(1) + chk);
|
setStatus(machine1, machine2, "Hz: " + estimatedHz().toFixed(1) + chk);
|
||||||
if (loglevel>0) {
|
if (loglevel>0) {
|
||||||
updateLogbox(signalSet(loglevel));
|
updateLogbox(logThese);
|
||||||
}
|
}
|
||||||
selectCell(ab);
|
selectCell(ab);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user