Merge branch 'master' of https://daniel12997@gitlab.com/AluminumTank/radec.git
This commit is contained in:
commit
21084a033e
@ -1,7 +1,6 @@
|
|||||||
# RADEC
|
# RADEC
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
* implement printing
|
|
||||||
* debug: circuit parsing
|
* debug: circuit parsing
|
||||||
* debug: vector parsing
|
* debug: vector parsing
|
||||||
* debug: simulation
|
* debug: simulation
|
||||||
|
@ -19,10 +19,10 @@ bool Simulation::parseCircuit(string fileName)
|
|||||||
// get rid of first line
|
// get rid of first line
|
||||||
getline(in, tmpString);
|
getline(in, tmpString);
|
||||||
|
|
||||||
while (!in.eof()) {
|
while (true) {
|
||||||
in >> tmpType;
|
if (!(in >> tmpType)) break;
|
||||||
in >> tmpString;
|
if (!(in >> tmpString)) break;
|
||||||
in >> tmp1;
|
if (!(in >> tmp1)) break;
|
||||||
|
|
||||||
if (tmpType == "INPUT" || tmpType == "OUTPUT") {
|
if (tmpType == "INPUT" || tmpType == "OUTPUT") {
|
||||||
tmpWire = findWire(tmp1);
|
tmpWire = findWire(tmp1);
|
||||||
@ -117,11 +117,11 @@ bool Simulation::parseVector(string fileName) {
|
|||||||
// get rid of first line
|
// get rid of first line
|
||||||
getline(in, tmpString);
|
getline(in, tmpString);
|
||||||
|
|
||||||
while(!in.eof()) {
|
while(true) {
|
||||||
in >> tmpString;
|
if (!(in >> tmpString)) break;
|
||||||
in >> tmpString;
|
if (!(in >> tmpString)) break;
|
||||||
in >> timeInt;
|
if (!(in >> tmpInt)) break;
|
||||||
in >> valInt;
|
if (!(in >> valInt)) break;
|
||||||
|
|
||||||
for(auto i = wires.begin(); i != wires.end(); ++i) {
|
for(auto i = wires.begin(); i != wires.end(); ++i) {
|
||||||
if((**i).getName() == tmpString) {
|
if((**i).getName() == tmpString) {
|
||||||
|
Loading…
Reference in New Issue
Block a user