Fixed VCD parsing error
This commit is contained in:
parent
7dd0a24df6
commit
2f11d8ed7b
|
@ -92,8 +92,8 @@ public class DatabaseServicesTest {
|
||||||
assertTrue(f.exists());
|
assertTrue(f.exists());
|
||||||
waveformDb.load(f);
|
waveformDb.load(f);
|
||||||
assertNotNull(waveformDb);
|
assertNotNull(waveformDb);
|
||||||
assertEquals(718, waveformDb.getAllWaves().size());
|
assertEquals(778, waveformDb.getAllWaves().size());
|
||||||
assertEquals(33, waveformDb.getChildNodes().size());
|
assertEquals(1, waveformDb.getChildNodes().size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -123,9 +123,9 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void enterModule(String tokenString) {
|
public void enterModule(String tokenString) {
|
||||||
if(moduleStack.isEmpty())
|
if(moduleStack.isEmpty()) {
|
||||||
moduleStack.push(tokenString);
|
if("SystemC".compareTo(tokenString)!=0) moduleStack.push(tokenString);
|
||||||
else
|
} else
|
||||||
moduleStack.push(moduleStack.peek()+"."+tokenString);
|
moduleStack.push(moduleStack.peek()+"."+tokenString);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,8 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public Integer newNet(String netName, int i, int width) {
|
public Integer newNet(String name, int i, int width) {
|
||||||
|
String netName = moduleStack.empty()? name: moduleStack.lastElement()+"."+name;
|
||||||
int id = signals.size();
|
int id = signals.size();
|
||||||
VCDSignal<? extends IWaveformEvent> signal;
|
VCDSignal<? extends IWaveformEvent> signal;
|
||||||
if(width==1){
|
if(width==1){
|
||||||
|
|
Loading…
Reference in New Issue