mirror of
https://github.com/trebonian/visual6502.git
synced 2024-12-22 12:29:20 +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="expertControlPanel">
|
||||
<form>
|
||||
<form action="javascript:updateLogList()">
|
||||
<input type="button" value="Trace more" 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>
|
||||
<br />
|
||||
</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
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@ -101,6 +101,7 @@ function setup_part3(){
|
||||
function setup_part4(){
|
||||
setupTable();
|
||||
setupNodeNameList();
|
||||
logThese=signalSet(loglevel);
|
||||
loadProgram();
|
||||
if(noSimulation){
|
||||
running=undefined;
|
||||
@ -293,7 +294,8 @@ function handleClick(e){
|
||||
|
||||
function updateLoglevel(value){
|
||||
loglevel = value;
|
||||
initLogbox(signalSet(loglevel));
|
||||
logThese = signalSet(loglevel);
|
||||
initLogbox(logThese);
|
||||
}
|
||||
|
||||
function updateExpertMode(isOn){
|
||||
|
43
macros.js
43
macros.js
@ -25,6 +25,17 @@ var cycle = 0;
|
||||
var trace = Array();
|
||||
var logstream = Array();
|
||||
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(){
|
||||
// a moderate size of static testprogram might be loaded
|
||||
@ -146,32 +157,32 @@ function initChip(){
|
||||
refresh();
|
||||
cycle = 0;
|
||||
trace = Array();
|
||||
initLogbox(signalSet(loglevel));
|
||||
initLogbox(logThese);
|
||||
chipStatus();
|
||||
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){
|
||||
var signals=[];
|
||||
for (var i=0; (i<=n)&&(i<logThese.length) ; i++){
|
||||
for (var j=0; j<logThese[i].length; j++){
|
||||
signals.push(logThese[i][j]);
|
||||
for (var i=0; (i<=n)&&(i<presetLogLists.length) ; i++){
|
||||
for (var j=0; j<presetLogLists[i].length; j++){
|
||||
signals.push(presetLogLists[i][j]);
|
||||
}
|
||||
}
|
||||
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 goldenChecksum;
|
||||
|
||||
@ -383,7 +394,7 @@ function chipStatus(){
|
||||
chk=" Chk:" + traceChecksum + ((traceChecksum==goldenChecksum)?" OK":" no match");
|
||||
setStatus(machine1, machine2, "Hz: " + estimatedHz().toFixed(1) + chk);
|
||||
if (loglevel>0) {
|
||||
updateLogbox(signalSet(loglevel));
|
||||
updateLogbox(logThese);
|
||||
}
|
||||
selectCell(ab);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user