Use JTAG state

This commit is contained in:
Alexey Starikovskiy
2023-08-29 20:00:28 +03:00
parent 1908ccd83b
commit 8976404b78
11 changed files with 42 additions and 38 deletions
+5 -5
View File
@@ -245,13 +245,13 @@ void SVF_jtag::handle_instruction(vector<string> const &vstr)
if (_verbose) cout << "trst value : " << vstr[1] << endl;
} else if (!vstr[0].compare("ENDDR")) {
if (_verbose) cout << "enddr value : " << vstr[1] << endl;
_enddr = fsm_state[vstr[1]];
_enddr = (Jtag::tapState_t)fsm_state[vstr[1]];
} else if (!vstr[0].compare("ENDIR")) {
if (_verbose) cout << "endir value : " << vstr[1] << endl;
_endir = fsm_state[vstr[1]];
_endir = (Jtag::tapState_t)fsm_state[vstr[1]];
} else if (!vstr[0].compare("STATE")) {
if (_verbose) cout << "state value : " << vstr[1] << endl;
_jtag->set_state(fsm_state[vstr[1]]);
_jtag->set_state((Jtag::tapState_t)fsm_state[vstr[1]]);
} else if (!vstr[0].compare("RUNTEST")) {
parse_runtest(vstr);
} else if (!vstr[0].compare("HIR")) {
@@ -284,7 +284,7 @@ void SVF_jtag::handle_instruction(vector<string> const &vstr)
parse_XYR(vstr, sir);
if (_verbose) {
for (auto &&t : vstr)
cout << t << " ";
cout << t << " ";
cout << endl;
cout << "\tlen : " << sir.len << endl;
cout << "\ttdo : " << sir.tdo.size()*4 << endl;
@@ -335,7 +335,7 @@ void SVF_jtag::handle_instruction(vector<string> const &vstr)
}
SVF_jtag::SVF_jtag(Jtag *jtag, bool verbose):_verbose(verbose), _freq_hz(0),
_enddr(fsm_state["IDLE"]), _endir(fsm_state["IDLE"]),
_enddr((Jtag::tapState_t)fsm_state["IDLE"]), _endir((Jtag::tapState_t)fsm_state["IDLE"]),
_run_state(fsm_state["IDLE"]), _end_state(fsm_state["IDLE"])
{