add tracing of datapath control signals
This commit is contained in:
parent
296599890a
commit
8a6fe3634f
21
macros.js
21
macros.js
|
@ -273,18 +273,19 @@ function readPC(){return (readBits('pch', 8)<<8) + readBits('pcl', 8);}
|
||||||
function readPCL(){return readBits('pcl', 8);}
|
function readPCL(){return readBits('pcl', 8);}
|
||||||
function readPCH(){return readBits('pch', 8);}
|
function readPCH(){return readBits('pch', 8);}
|
||||||
|
|
||||||
function listActivePlaOutputs(){
|
// for one-hot or few-hot signal collections we want to list the active ones
|
||||||
// PLA outputs are mostly ^op- but some have a prefix too
|
// and for brevity we remove the common prefix
|
||||||
// - we'll allow the x and xx prefix but ignore the #
|
function listActiveSignals(pattern){
|
||||||
var r=new RegExp('^([x]?x-)?op-');
|
var r=new RegExp(pattern);
|
||||||
var pla=[];
|
var list=[];
|
||||||
for(var i in nodenamelist){
|
for(var i in nodenamelist){
|
||||||
if(r.test(nodenamelist[i])) {
|
if(r.test(nodenamelist[i])) {
|
||||||
if(isNodeHigh(nodenames[nodenamelist[i]]))
|
if(isNodeHigh(nodenames[nodenamelist[i]]))
|
||||||
pla.push(nodenamelist[i]);
|
// also map hyphen to a non-breaking version
|
||||||
|
list.push(nodenamelist[i].replace(r,'').replace(/-/g,'‑'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pla;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
function readBit(name){
|
function readBit(name){
|
||||||
|
@ -311,7 +312,11 @@ function busToString(busname){
|
||||||
if(busname=='tcstate')
|
if(busname=='tcstate')
|
||||||
return ['clock1','clock2','t2','t3','t4','t5'].map(busToHex).join("");
|
return ['clock1','clock2','t2','t3','t4','t5'].map(busToHex).join("");
|
||||||
if(busname=='plaOutputs')
|
if(busname=='plaOutputs')
|
||||||
return listActivePlaOutputs();
|
// PLA outputs are mostly ^op- but some have a prefix too
|
||||||
|
// - we'll allow the x and xx prefix but ignore the #
|
||||||
|
return listActiveSignals('^([x]?x-)?op-');
|
||||||
|
if(busname=='DPControl')
|
||||||
|
return listActiveSignals('^dpc[0-9]+_');
|
||||||
if(busname[0]=="-"){
|
if(busname[0]=="-"){
|
||||||
// invert the value of the bus for display
|
// invert the value of the bus for display
|
||||||
var value=busToHex(busname.slice(1))
|
var value=busToHex(busname.slice(1))
|
||||||
|
|
Loading…
Reference in New Issue