add clock trigger mechanism and URL interface for reset pin
This commit is contained in:
parent
e885646e5e
commit
758d53bf5b
|
@ -181,6 +181,12 @@ function setupParams(){
|
||||||
userResetLow=parseInt(value,16)%256;
|
userResetLow=parseInt(value,16)%256;
|
||||||
userResetHigh=(parseInt(value,16)>>8)%256;
|
userResetHigh=(parseInt(value,16)>>8)%256;
|
||||||
} else
|
} else
|
||||||
|
// setup input pin events, breakpoints, watchpoints
|
||||||
|
if(name=="reset0" && parseInt(value)!=NaN){
|
||||||
|
clockTriggers[value]="setLow('res');";
|
||||||
|
} else if(name=="reset1" && parseInt(value)!=NaN){
|
||||||
|
clockTriggers[value]="setHigh('res');";
|
||||||
|
} else
|
||||||
// run a test program, and optionally check against a golden checksum
|
// run a test program, and optionally check against a golden checksum
|
||||||
if(name=="steps" && parseInt(value)!=NaN){
|
if(name=="steps" && parseInt(value)!=NaN){
|
||||||
userSteps=parseInt(value);
|
userSteps=parseInt(value);
|
||||||
|
|
|
@ -201,9 +201,13 @@ function step(){
|
||||||
chipStatus();
|
chipStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// triggers for breakpoints, watchpoints, input pin events
|
||||||
|
clockTriggers={};
|
||||||
|
|
||||||
// simulate a single clock phase with no update to graphics or trace
|
// simulate a single clock phase with no update to graphics or trace
|
||||||
function halfStep(){
|
function halfStep(){
|
||||||
var clk = isNodeHigh(nodenames['clk0']);
|
var clk = isNodeHigh(nodenames['clk0']);
|
||||||
|
eval(clockTriggers[cycle]); // usually undefined, no measurable performance loss
|
||||||
if (clk) {setLow('clk0'); handleBusRead(); }
|
if (clk) {setLow('clk0'); handleBusRead(); }
|
||||||
else {setHigh('clk0'); handleBusWrite();}
|
else {setHigh('clk0'); handleBusWrite();}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue