From 44b13c105d8a0a8634cfaa3c9934c3fac3c892f7 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 13 Oct 2017 09:36:44 +0200 Subject: [PATCH 01/16] Fixed rendering of integral transaction attributes and updated version numbers --- .../META-INF/MANIFEST.MF | 2 +- com.minres.scviewer.e4.application/pom.xml | 2 +- .../e4/application/parts/TransactionDetails.java | 9 ++++++++- com.minres.scviewer.e4.product/pom.xml | 2 +- com.minres.scviewer.e4.product/scviewer.product | 2 +- com.minres.scviewer.ui/META-INF/MANIFEST.MF | 2 +- com.minres.scviewer.ui/pom.xml | 3 ++- .../ui/views/sections/AttributeProperty.java | 12 +++++++----- 8 files changed, 22 insertions(+), 12 deletions(-) diff --git a/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF b/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF index 1a5628d..93b5bc6 100644 --- a/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true -Bundle-Version: 1.1.0.qualifier +Bundle-Version: 1.1.1.qualifier Bundle-Vendor: %Bundle-Vendor Require-Bundle: javax.inject;bundle-version="1.0.0", org.eclipse.core.runtime;bundle-version="3.11.1", diff --git a/com.minres.scviewer.e4.application/pom.xml b/com.minres.scviewer.e4.application/pom.xml index 827f795..c337711 100644 --- a/com.minres.scviewer.e4.application/pom.xml +++ b/com.minres.scviewer.e4.application/pom.xml @@ -8,5 +8,5 @@ ../com.minres.scviewer.parent eclipse-plugin - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT \ No newline at end of file diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java index c4d8337..99b997e 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/TransactionDetails.java @@ -55,6 +55,7 @@ import org.eclipse.swt.widgets.Tree; import com.minres.scviewer.database.ITx; import com.minres.scviewer.database.ITxAttribute; import com.minres.scviewer.database.ITxRelation; +import com.minres.scviewer.database.DataType; import com.minres.scviewer.e4.application.Messages; import com.minres.scviewer.e4.application.provider.TxPropertiesLabelProvider; @@ -579,7 +580,13 @@ PROPS, /** The attrs. */ default: if (element instanceof ITxAttribute) { ITxAttribute attribute = (ITxAttribute) element; - return new StyledString(attribute.getValue().toString()); + String value = attribute.getValue().toString(); + if((DataType.UNSIGNED == attribute.getDataType() || DataType.INTEGER==attribute.getDataType()) && !"0".equals(value)) { + try { + value = attribute.getValue().toString() + " [0x"+Long.toHexString(Long.parseLong(attribute.getValue().toString()))+"]"; + } catch(NumberFormatException e) { } + } + return new StyledString(value); }else if(element instanceof Object[]){ Object[] elements = (Object[]) element; return new StyledString(elements[field].toString()); diff --git a/com.minres.scviewer.e4.product/pom.xml b/com.minres.scviewer.e4.product/pom.xml index f66383a..9aaba3d 100644 --- a/com.minres.scviewer.e4.product/pom.xml +++ b/com.minres.scviewer.e4.product/pom.xml @@ -10,7 +10,7 @@ ../com.minres.scviewer.parent com.minres.scviewer.e4.product - 1.2.0-SNAPSHOT + 1.2.1-SNAPSHOT eclipse-repository com.minres.scviewer diff --git a/com.minres.scviewer.e4.product/scviewer.product b/com.minres.scviewer.e4.product/scviewer.product index 9abe6d5..423a65b 100644 --- a/com.minres.scviewer.e4.product/scviewer.product +++ b/com.minres.scviewer.e4.product/scviewer.product @@ -1,7 +1,7 @@ - + diff --git a/com.minres.scviewer.ui/META-INF/MANIFEST.MF b/com.minres.scviewer.ui/META-INF/MANIFEST.MF index 8af8bef..fc9a3e3 100644 --- a/com.minres.scviewer.ui/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SCViewer Bundle-SymbolicName: com.minres.scviewer.ui;singleton:=true -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.0.1.qualifier Bundle-Activator: com.minres.scviewer.ui.TxEditorPlugin Bundle-Vendor: MINRES Technologies GmbH Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0", diff --git a/com.minres.scviewer.ui/pom.xml b/com.minres.scviewer.ui/pom.xml index 5c71fb2..11f1e01 100644 --- a/com.minres.scviewer.ui/pom.xml +++ b/com.minres.scviewer.ui/pom.xml @@ -8,4 +8,5 @@ ../com.minres.scviewer.parent eclipse-plugin - \ No newline at end of file + 1.0.1-SNAPSHOT + \ No newline at end of file diff --git a/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/AttributeProperty.java b/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/AttributeProperty.java index 23393fd..703ed20 100644 --- a/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/AttributeProperty.java +++ b/com.minres.scviewer.ui/src/com/minres/scviewer/ui/views/sections/AttributeProperty.java @@ -44,6 +44,7 @@ import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection; import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; import com.minres.scviewer.database.AssociationType; +import com.minres.scviewer.database.DataType; import com.minres.scviewer.database.ITxAttribute; import com.minres.scviewer.database.ITx; @@ -199,12 +200,13 @@ public class AttributeProperty extends AbstractPropertySection implements ISelec else if (columnIndex == 2 ) return attr.getDataType().name(); else if (columnIndex == 3){ - if("UNSIGNED".equals(attr.getType()) && (attr.getName().contains("addr")||attr.getName().contains("data"))) + String value = attr.getValue().toString(); + if((DataType.UNSIGNED == attr.getDataType() || DataType.INTEGER==attr.getDataType()) && !"0".equals(value)) { try { - return "0x"+Long.toHexString(Long.parseLong(attr.getValue().toString())); - } catch(NumberFormatException e) { - } - return attr.getValue().toString(); + value = attr.getValue().toString() + "(0x"+Long.toHexString(Long.parseLong(attr.getValue().toString()))+")"; + } catch(NumberFormatException e) { } + } + return value; } } return null; From fce1bdb1e78548604a109866d11c47b216d82327 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 14 Oct 2017 20:46:22 +0200 Subject: [PATCH 02/16] Fixed parsing bug --- .../com/minres/scviewer/database/text/TextDbLoader.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy b/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy index 2cc5045..fc6bf7e 100644 --- a/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy +++ b/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy @@ -183,9 +183,11 @@ public class TextDbLoader implements IWaveformDbLoader{ break case "a"://matcher = line =~ /^a\s+(.+)$/ if(endTransaction){ - transaction.attributes << new TxAttribute(transaction.generator.end_attrs[0], tokens[1]) + transaction.attributes << new TxAttribute(transaction.generator.end_attrs[transaction.generator.end_attrs_idx], tokens[1]) + transaction.generator.end_attrs_idx++ } else { - transaction.attributes << new TxAttribute(transaction.generator.begin_attrs[0], tokens[1]) + transaction.attributes << new TxAttribute(transaction.generator.begin_attrs[transaction.generator.begin_attrs_idx], tokens[1]) + transaction.generator.begin_attrs_idx++ } break case "tx_relation"://matcher = line =~ /^tx_relation\s+\"(\S+)\"\s+(\d+)\s+(\d+)$/ From cdde384ed3ae8599946ec6260346d5a88d79ca77 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 14 Oct 2017 20:48:25 +0200 Subject: [PATCH 03/16] Updated version numbers --- com.minres.scviewer.database.text/META-INF/MANIFEST.MF | 2 +- com.minres.scviewer.database.text/pom.xml | 3 ++- .../src/com/minres/scviewer/e4/application/messages.properties | 2 +- com.minres.scviewer.e4.product/pom.xml | 2 +- com.minres.scviewer.e4.product/scviewer.product | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/com.minres.scviewer.database.text/META-INF/MANIFEST.MF b/com.minres.scviewer.database.text/META-INF/MANIFEST.MF index 9d71d4d..d2d630f 100644 --- a/com.minres.scviewer.database.text/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.database.text/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Textual transaction database Bundle-SymbolicName: com.minres.scviewer.database.text -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.0.1.qualifier Bundle-Vendor: MINRES Technologies GmbH Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: com.minres.scviewer.database, diff --git a/com.minres.scviewer.database.text/pom.xml b/com.minres.scviewer.database.text/pom.xml index fe1a9e7..5f4fe8f 100644 --- a/com.minres.scviewer.database.text/pom.xml +++ b/com.minres.scviewer.database.text/pom.xml @@ -39,4 +39,5 @@ - \ No newline at end of file + 1.0.1-SNAPSHOT + \ No newline at end of file diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties index 95c44b4..7848715 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties @@ -1,4 +1,4 @@ -AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: 1.2\n +AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: 1.2.2\n AboutDialog_1=\nCopyright (c) 2015,2016,2017 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.apache.jdbm and org.sqlite JDBC driver\n\nSources code is hosted at GitHub: https://github.com/minres/SCViewer\n DesignBrowser_12=Append all after DesignBrowser_16=Insert all before diff --git a/com.minres.scviewer.e4.product/pom.xml b/com.minres.scviewer.e4.product/pom.xml index 9aaba3d..9dd82b9 100644 --- a/com.minres.scviewer.e4.product/pom.xml +++ b/com.minres.scviewer.e4.product/pom.xml @@ -10,7 +10,7 @@ ../com.minres.scviewer.parent com.minres.scviewer.e4.product - 1.2.1-SNAPSHOT + 1.2.2-SNAPSHOT eclipse-repository com.minres.scviewer diff --git a/com.minres.scviewer.e4.product/scviewer.product b/com.minres.scviewer.e4.product/scviewer.product index 423a65b..630f22a 100644 --- a/com.minres.scviewer.e4.product/scviewer.product +++ b/com.minres.scviewer.e4.product/scviewer.product @@ -1,7 +1,7 @@ - + From f80021059e1b8554f55e1ef9f7c3a9ba4c9ca855 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 1 Nov 2017 19:02:01 +0100 Subject: [PATCH 04/16] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fa2805b..8400f58 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ created by the SystemC VCD trace implementation and the SystemC Verification Lib For further description of the SCV please refer to http://www.accellera.org/activities/committees/systemc-verification. +> If you encounter issue when running on Linux please try running as `SWT_GTK3=0 scviewer` as there exist issues wiht GTK3. + The viewer is in early alpha stage and not yet ready for production use! The plugins are structured as follows: @@ -39,4 +41,4 @@ TODO - add more tests - move to feature based product to allow automatic updates - improve graphics -- catch-up e3 plugin to functionality of e4 product \ No newline at end of file +- catch-up e3 plugin to functionality of e4 product From b468fba441211d80af0a94f166029b16cdb6019d Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 1 Nov 2017 19:02:01 +0100 Subject: [PATCH 05/16] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fa2805b..8400f58 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ created by the SystemC VCD trace implementation and the SystemC Verification Lib For further description of the SCV please refer to http://www.accellera.org/activities/committees/systemc-verification. +> If you encounter issue when running on Linux please try running as `SWT_GTK3=0 scviewer` as there exist issues wiht GTK3. + The viewer is in early alpha stage and not yet ready for production use! The plugins are structured as follows: @@ -39,4 +41,4 @@ TODO - add more tests - move to feature based product to allow automatic updates - improve graphics -- catch-up e3 plugin to functionality of e4 product \ No newline at end of file +- catch-up e3 plugin to functionality of e4 product From a052fe2324db0b3aa1daa2279177624977f6aad2 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 14 Jul 2018 11:42:55 +0200 Subject: [PATCH 06/16] Added hierarchical VCD File --- .../DatabaseServicesTest.launch | 4 +- .../inputs/simple_system.vcd | 3891 +++++++++++++++++ .../database/test/DatabaseServicesTest.java | 10 + com.minres.scviewer.target/neon.target | 7 +- com.minres.scviewer.target/photon.target | 24 + 5 files changed, 3930 insertions(+), 6 deletions(-) create mode 100755 com.minres.scviewer.database.test/inputs/simple_system.vcd create mode 100644 com.minres.scviewer.target/photon.target diff --git a/com.minres.scviewer.database.test/DatabaseServicesTest.launch b/com.minres.scviewer.database.test/DatabaseServicesTest.launch index 1681c8c..c68ede6 100644 --- a/com.minres.scviewer.database.test/DatabaseServicesTest.launch +++ b/com.minres.scviewer.database.test/DatabaseServicesTest.launch @@ -11,7 +11,7 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/com.minres.scviewer.database.test/inputs/simple_system.vcd b/com.minres.scviewer.database.test/inputs/simple_system.vcd new file mode 100755 index 0000000..8977649 --- /dev/null +++ b/com.minres.scviewer.database.test/inputs/simple_system.vcd @@ -0,0 +1,3891 @@ +$date + Jul 13, 2018 19:48:44 +$end + +$version + SystemC 2.3.2-Accellera --- Jul 11 2018 10:28:41 +$end + +$timescale + 1 ps +$end + +$scope module SystemC $end +$scope module i_system $end +$var wire 1 aaaaa s_gpio_0 $end +$var wire 1 aaaab s_gpio_1 $end +$var wire 1 aaaac s_gpio_2 $end +$var wire 1 aaaad s_gpio_3 $end +$var wire 1 aaaae s_gpio_4 $end +$var wire 1 aaaaf s_gpio_5 $end +$var wire 1 aaaag s_gpio_6 $end +$var wire 1 aaaah s_gpio_7 $end +$var wire 1 aaaai s_gpio_8 $end +$var wire 1 aaaaj s_gpio_9 $end +$var wire 1 aaaak s_gpio_10 $end +$var wire 1 aaaal s_gpio_11 $end +$var wire 1 aaaam s_gpio_12 $end +$var wire 1 aaaan s_gpio_13 $end +$var wire 1 aaaao s_gpio_14 $end +$var wire 1 aaaap s_gpio_15 $end +$var wire 1 aaaaq s_gpio_16 $end +$var wire 1 aaaar s_gpio_17 $end +$var wire 1 aaaas s_gpio_18 $end +$var wire 1 aaaat s_gpio_19 $end +$var wire 1 aaaau s_gpio_20 $end +$var wire 1 aaaav s_gpio_21 $end +$var wire 1 aaaaw s_gpio_22 $end +$var wire 1 aaaax s_gpio_23 $end +$var wire 1 aaaay s_gpio_24 $end +$var wire 1 aaaaz s_gpio_25 $end +$var wire 1 aaaba s_gpio_26 $end +$var wire 1 aaabb s_gpio_27 $end +$var wire 1 aaabc s_gpio_28 $end +$var wire 1 aaabd s_gpio_29 $end +$var wire 1 aaabe s_gpio_30 $end +$var wire 1 aaabf s_gpio_31 $end +$var wire 1 aaabg s_rst_n $end +$scope module i_platform $end +$var wire 1 aaabh erst_n $end +$var wire 64 aabdc s_tlclk [63:0] $end +$var wire 64 aabdd signal_0 [63:0] $end +$var wire 1 aabde s_rst $end +$var wire 1 aabdf signal_1 $end +$var wire 1 aabdg signal_2 $end +$var wire 1 aabdh s_core_int $end +$var wire 1 aabdi s_dummy_0 $end +$var wire 1 aabdj s_dummy_1 $end +$var wire 1 aabdk s_dummy_2 $end +$var wire 1 aabdl s_dummy_3 $end +$var wire 1 aabdm s_dummy_4 $end +$var wire 1 aabdn s_dummy_5 $end +$var wire 1 aabdo s_dummy_6 $end +$var wire 1 aabdp s_dummy_7 $end +$var wire 1 aabdq s_dummy_8 $end +$var wire 1 aabdr s_dummy_9 $end +$var wire 1 aabds s_dummy_10 $end +$var wire 1 aabdt s_dummy_11 $end +$var wire 1 aabdu s_dummy_12 $end +$var wire 1 aabdv s_dummy_13 $end +$var wire 1 aabdw s_dummy_14 $end +$var wire 1 aabdx s_dummy_15 $end +$scope module i_aon $end +$var wire 64 aabac clk_i [63:0] $end +$var wire 1 aabad erst_n_i $end +$scope module regs $end +$var wire 32 aabae wdogcfg [31:0] $end +$var wire 32 aabaf wdogcount [31:0] $end +$var wire 32 aabag wdogs [31:0] $end +$var wire 32 aabah wdogfeed [31:0] $end +$var wire 32 aabai wdogkey [31:0] $end +$var wire 32 aabaj wdogcmp [31:0] $end +$var wire 32 aabak rtccfg [31:0] $end +$var wire 32 aabal rtclo [31:0] $end +$var wire 32 aabam rtchi [31:0] $end +$var wire 32 aaban rtcs [31:0] $end +$var wire 32 aabao rtccmp [31:0] $end +$var wire 32 aabap lfrosccfg [31:0] $end +$var wire 32 aabaq backup0 [31:0] $end +$var wire 32 aabar backup1 [31:0] $end +$var wire 32 aabas backup2 [31:0] $end +$var wire 32 aabat backup3 [31:0] $end +$var wire 32 aabau backup4 [31:0] $end +$var wire 32 aabav backup5 [31:0] $end +$var wire 32 aabaw backup6 [31:0] $end +$var wire 32 aabax backup7 [31:0] $end +$var wire 32 aabay backup8 [31:0] $end +$var wire 32 aabaz backup9 [31:0] $end +$var wire 32 aabba backup10 [31:0] $end +$var wire 32 aabbb backup11 [31:0] $end +$var wire 32 aabbc backup12 [31:0] $end +$var wire 32 aabbd backup13 [31:0] $end +$var wire 32 aabbe backup14 [31:0] $end +$var wire 32 aabbf backup15 [31:0] $end +$var wire 32 aabbg backup16 [31:0] $end +$var wire 32 aabbh backup17 [31:0] $end +$var wire 32 aabbi backup18 [31:0] $end +$var wire 32 aabbj backup19 [31:0] $end +$var wire 32 aabbk backup20 [31:0] $end +$var wire 32 aabbl backup21 [31:0] $end +$var wire 32 aabbm backup22 [31:0] $end +$var wire 32 aabbn backup23 [31:0] $end +$var wire 32 aabbo backup24 [31:0] $end +$var wire 32 aabbp backup25 [31:0] $end +$var wire 32 aabbq backup26 [31:0] $end +$var wire 32 aabbr backup27 [31:0] $end +$var wire 32 aabbs backup28 [31:0] $end +$var wire 32 aabbt backup29 [31:0] $end +$var wire 32 aabbu backup30 [31:0] $end +$var wire 32 aabbv backup31 [31:0] $end +$var wire 32 aabbw pmuwakeupi0 [31:0] $end +$var wire 32 aabbx pmuwakeupi1 [31:0] $end +$var wire 32 aabby pmuwakeupi2 [31:0] $end +$var wire 32 aabbz pmuwakeupi3 [31:0] $end +$var wire 32 aabca pmuwakeupi4 [31:0] $end +$var wire 32 aabcb pmuwakeupi5 [31:0] $end +$var wire 32 aabcc pmuwakeupi6 [31:0] $end +$var wire 32 aabcd pmuwakeupi7 [31:0] $end +$var wire 32 aabce pmusleepi0 [31:0] $end +$var wire 32 aabcf pmusleepi1 [31:0] $end +$var wire 32 aabcg pmusleepi2 [31:0] $end +$var wire 32 aabch pmusleepi3 [31:0] $end +$var wire 32 aabci pmusleepi4 [31:0] $end +$var wire 32 aabcj pmusleepi5 [31:0] $end +$var wire 32 aabck pmusleepi6 [31:0] $end +$var wire 32 aabcl pmusleepi7 [31:0] $end +$var wire 32 aabcm pmuie [31:0] $end +$var wire 32 aabcn pmucause [31:0] $end +$var wire 32 aabco pmusleep [31:0] $end +$var wire 32 aabcp pmukey [31:0] $end +$upscope $end +$upscope $end +$scope module i_clint $end +$var wire 64 aabcw tlclk_i [63:0] $end +$var wire 64 aabcx lfclk_i [63:0] $end +$var wire 1 aabcy rst_i $end +$scope module regs $end +$var wire 32 aabcz msip [31:0] $end +$var wire 64 aabda mtimecmp [63:0] $end +$var wire 64 aabdb mtime [63:0] $end +$upscope $end +$upscope $end +$scope module i_core_complex $end +$var wire 64 aaabi clk_i [63:0] $end +$var wire 1 aaabj rst_i $end +$var wire 1 aaabk global_irq_i $end +$var wire 1 aaabl timer_irq_i $end +$var wire 1 aaabm port_0 $end +$var wire 1 aaabn local_irq_i_0 $end +$var wire 1 aaabo local_irq_i_1 $end +$var wire 1 aaabp local_irq_i_2 $end +$var wire 1 aaabq local_irq_i_3 $end +$var wire 1 aaabr local_irq_i_4 $end +$var wire 1 aaabs local_irq_i_5 $end +$var wire 1 aaabt local_irq_i_6 $end +$var wire 1 aaabu local_irq_i_7 $end +$var wire 1 aaabv local_irq_i_8 $end +$var wire 1 aaabw local_irq_i_9 $end +$var wire 1 aaabx local_irq_i_10 $end +$var wire 1 aaaby local_irq_i_11 $end +$var wire 1 aaabz local_irq_i_12 $end +$var wire 1 aaaca local_irq_i_13 $end +$var wire 1 aaacb local_irq_i_14 $end +$var wire 1 aaacc local_irq_i_15 $end +$upscope $end +$scope module i_gpio0 $end +$var wire 64 aaaex clk_i [63:0] $end +$var wire 1 aaaey rst_i $end +$scope module regs $end +$var wire 32 aaaez value [31:0] $end +$var wire 32 aaafa input_en [31:0] $end +$var wire 32 aaafb output_en [31:0] $end +$var wire 32 aaafc port [31:0] $end +$var wire 32 aaafd pue [31:0] $end +$var wire 32 aaafe ds [31:0] $end +$var wire 32 aaaff rise_ie [31:0] $end +$var wire 32 aaafg rise_ip [31:0] $end +$var wire 32 aaafh fall_ie [31:0] $end +$var wire 32 aaafi fall_ip [31:0] $end +$var wire 32 aaafj high_ie [31:0] $end +$var wire 32 aaafk high_ip [31:0] $end +$var wire 32 aaafl low_ie [31:0] $end +$var wire 32 aaafm low_ip [31:0] $end +$var wire 32 aaafn iof_en [31:0] $end +$var wire 32 aaafo iof_sel [31:0] $end +$var wire 32 aaafp out_xor [31:0] $end +$upscope $end +$upscope $end +$scope module i_plic $end +$var wire 64 aaafq clk_i [63:0] $end +$var wire 1 aaafr rst_i $end +$var wire 1 aaafs global_interrupts_i_0 $end +$var wire 1 aaaft global_interrupts_i_1 $end +$var wire 1 aaafu global_interrupts_i_2 $end +$var wire 1 aaafv global_interrupts_i_3 $end +$var wire 1 aaafw global_interrupts_i_4 $end +$var wire 1 aaafx global_interrupts_i_5 $end +$var wire 1 aaafy global_interrupts_i_6 $end +$var wire 1 aaafz global_interrupts_i_7 $end +$var wire 1 aaaga global_interrupts_i_8 $end +$var wire 1 aaagb global_interrupts_i_9 $end +$var wire 1 aaagc global_interrupts_i_10 $end +$var wire 1 aaagd global_interrupts_i_11 $end +$var wire 1 aaage global_interrupts_i_12 $end +$var wire 1 aaagf global_interrupts_i_13 $end +$var wire 1 aaagg global_interrupts_i_14 $end +$var wire 1 aaagh global_interrupts_i_15 $end +$var wire 1 aaagi global_interrupts_i_16 $end +$var wire 1 aaagj global_interrupts_i_17 $end +$var wire 1 aaagk global_interrupts_i_18 $end +$var wire 1 aaagl global_interrupts_i_19 $end +$var wire 1 aaagm global_interrupts_i_20 $end +$var wire 1 aaagn global_interrupts_i_21 $end +$var wire 1 aaago global_interrupts_i_22 $end +$var wire 1 aaagp global_interrupts_i_23 $end +$var wire 1 aaagq global_interrupts_i_24 $end +$var wire 1 aaagr global_interrupts_i_25 $end +$var wire 1 aaags global_interrupts_i_26 $end +$var wire 1 aaagt global_interrupts_i_27 $end +$var wire 1 aaagu global_interrupts_i_28 $end +$var wire 1 aaagv global_interrupts_i_29 $end +$var wire 1 aaagw global_interrupts_i_30 $end +$var wire 1 aaagx global_interrupts_i_31 $end +$var wire 1 aaagy global_interrupts_i_32 $end +$var wire 1 aaagz global_interrupts_i_33 $end +$var wire 1 aaaha global_interrupts_i_34 $end +$var wire 1 aaahb global_interrupts_i_35 $end +$var wire 1 aaahc global_interrupts_i_36 $end +$var wire 1 aaahd global_interrupts_i_37 $end +$var wire 1 aaahe global_interrupts_i_38 $end +$var wire 1 aaahf global_interrupts_i_39 $end +$var wire 1 aaahg global_interrupts_i_40 $end +$var wire 1 aaahh global_interrupts_i_41 $end +$var wire 1 aaahi global_interrupts_i_42 $end +$var wire 1 aaahj global_interrupts_i_43 $end +$var wire 1 aaahk global_interrupts_i_44 $end +$var wire 1 aaahl global_interrupts_i_45 $end +$var wire 1 aaahm global_interrupts_i_46 $end +$var wire 1 aaahn global_interrupts_i_47 $end +$var wire 1 aaaho global_interrupts_i_48 $end +$var wire 1 aaahp global_interrupts_i_49 $end +$var wire 1 aaahq global_interrupts_i_50 $end +$var wire 1 aaahr global_interrupts_i_51 $end +$var wire 1 aaahs global_interrupts_i_52 $end +$var wire 1 aaaht global_interrupts_i_53 $end +$var wire 1 aaahu global_interrupts_i_54 $end +$var wire 1 aaahv global_interrupts_i_55 $end +$var wire 1 aaahw global_interrupts_i_56 $end +$var wire 1 aaahx global_interrupts_i_57 $end +$var wire 1 aaahy global_interrupts_i_58 $end +$var wire 1 aaahz global_interrupts_i_59 $end +$var wire 1 aaaia global_interrupts_i_60 $end +$var wire 1 aaaib global_interrupts_i_61 $end +$var wire 1 aaaic global_interrupts_i_62 $end +$var wire 1 aaaid global_interrupts_i_63 $end +$var wire 1 aaaie global_interrupts_i_64 $end +$var wire 1 aaaif global_interrupts_i_65 $end +$var wire 1 aaaig global_interrupts_i_66 $end +$var wire 1 aaaih global_interrupts_i_67 $end +$var wire 1 aaaii global_interrupts_i_68 $end +$var wire 1 aaaij global_interrupts_i_69 $end +$var wire 1 aaaik global_interrupts_i_70 $end +$var wire 1 aaail global_interrupts_i_71 $end +$var wire 1 aaaim global_interrupts_i_72 $end +$var wire 1 aaain global_interrupts_i_73 $end +$var wire 1 aaaio global_interrupts_i_74 $end +$var wire 1 aaaip global_interrupts_i_75 $end +$var wire 1 aaaiq global_interrupts_i_76 $end +$var wire 1 aaair global_interrupts_i_77 $end +$var wire 1 aaais global_interrupts_i_78 $end +$var wire 1 aaait global_interrupts_i_79 $end +$var wire 1 aaaiu global_interrupts_i_80 $end +$var wire 1 aaaiv global_interrupts_i_81 $end +$var wire 1 aaaiw global_interrupts_i_82 $end +$var wire 1 aaaix global_interrupts_i_83 $end +$var wire 1 aaaiy global_interrupts_i_84 $end +$var wire 1 aaaiz global_interrupts_i_85 $end +$var wire 1 aaaja global_interrupts_i_86 $end +$var wire 1 aaajb global_interrupts_i_87 $end +$var wire 1 aaajc global_interrupts_i_88 $end +$var wire 1 aaajd global_interrupts_i_89 $end +$var wire 1 aaaje global_interrupts_i_90 $end +$var wire 1 aaajf global_interrupts_i_91 $end +$var wire 1 aaajg global_interrupts_i_92 $end +$var wire 1 aaajh global_interrupts_i_93 $end +$var wire 1 aaaji global_interrupts_i_94 $end +$var wire 1 aaajj global_interrupts_i_95 $end +$var wire 1 aaajk global_interrupts_i_96 $end +$var wire 1 aaajl global_interrupts_i_97 $end +$var wire 1 aaajm global_interrupts_i_98 $end +$var wire 1 aaajn global_interrupts_i_99 $end +$var wire 1 aaajo global_interrupts_i_100 $end +$var wire 1 aaajp global_interrupts_i_101 $end +$var wire 1 aaajq global_interrupts_i_102 $end +$var wire 1 aaajr global_interrupts_i_103 $end +$var wire 1 aaajs global_interrupts_i_104 $end +$var wire 1 aaajt global_interrupts_i_105 $end +$var wire 1 aaaju global_interrupts_i_106 $end +$var wire 1 aaajv global_interrupts_i_107 $end +$var wire 1 aaajw global_interrupts_i_108 $end +$var wire 1 aaajx global_interrupts_i_109 $end +$var wire 1 aaajy global_interrupts_i_110 $end +$var wire 1 aaajz global_interrupts_i_111 $end +$var wire 1 aaaka global_interrupts_i_112 $end +$var wire 1 aaakb global_interrupts_i_113 $end +$var wire 1 aaakc global_interrupts_i_114 $end +$var wire 1 aaakd global_interrupts_i_115 $end +$var wire 1 aaake global_interrupts_i_116 $end +$var wire 1 aaakf global_interrupts_i_117 $end +$var wire 1 aaakg global_interrupts_i_118 $end +$var wire 1 aaakh global_interrupts_i_119 $end +$var wire 1 aaaki global_interrupts_i_120 $end +$var wire 1 aaakj global_interrupts_i_121 $end +$var wire 1 aaakk global_interrupts_i_122 $end +$var wire 1 aaakl global_interrupts_i_123 $end +$var wire 1 aaakm global_interrupts_i_124 $end +$var wire 1 aaakn global_interrupts_i_125 $end +$var wire 1 aaako global_interrupts_i_126 $end +$var wire 1 aaakp global_interrupts_i_127 $end +$var wire 1 aaakq global_interrupts_i_128 $end +$var wire 1 aaakr global_interrupts_i_129 $end +$var wire 1 aaaks global_interrupts_i_130 $end +$var wire 1 aaakt global_interrupts_i_131 $end +$var wire 1 aaaku global_interrupts_i_132 $end +$var wire 1 aaakv global_interrupts_i_133 $end +$var wire 1 aaakw global_interrupts_i_134 $end +$var wire 1 aaakx global_interrupts_i_135 $end +$var wire 1 aaaky global_interrupts_i_136 $end +$var wire 1 aaakz global_interrupts_i_137 $end +$var wire 1 aaala global_interrupts_i_138 $end +$var wire 1 aaalb global_interrupts_i_139 $end +$var wire 1 aaalc global_interrupts_i_140 $end +$var wire 1 aaald global_interrupts_i_141 $end +$var wire 1 aaale global_interrupts_i_142 $end +$var wire 1 aaalf global_interrupts_i_143 $end +$var wire 1 aaalg global_interrupts_i_144 $end +$var wire 1 aaalh global_interrupts_i_145 $end +$var wire 1 aaali global_interrupts_i_146 $end +$var wire 1 aaalj global_interrupts_i_147 $end +$var wire 1 aaalk global_interrupts_i_148 $end +$var wire 1 aaall global_interrupts_i_149 $end +$var wire 1 aaalm global_interrupts_i_150 $end +$var wire 1 aaaln global_interrupts_i_151 $end +$var wire 1 aaalo global_interrupts_i_152 $end +$var wire 1 aaalp global_interrupts_i_153 $end +$var wire 1 aaalq global_interrupts_i_154 $end +$var wire 1 aaalr global_interrupts_i_155 $end +$var wire 1 aaals global_interrupts_i_156 $end +$var wire 1 aaalt global_interrupts_i_157 $end +$var wire 1 aaalu global_interrupts_i_158 $end +$var wire 1 aaalv global_interrupts_i_159 $end +$var wire 1 aaalw global_interrupts_i_160 $end +$var wire 1 aaalx global_interrupts_i_161 $end +$var wire 1 aaaly global_interrupts_i_162 $end +$var wire 1 aaalz global_interrupts_i_163 $end +$var wire 1 aaama global_interrupts_i_164 $end +$var wire 1 aaamb global_interrupts_i_165 $end +$var wire 1 aaamc global_interrupts_i_166 $end +$var wire 1 aaamd global_interrupts_i_167 $end +$var wire 1 aaame global_interrupts_i_168 $end +$var wire 1 aaamf global_interrupts_i_169 $end +$var wire 1 aaamg global_interrupts_i_170 $end +$var wire 1 aaamh global_interrupts_i_171 $end +$var wire 1 aaami global_interrupts_i_172 $end +$var wire 1 aaamj global_interrupts_i_173 $end +$var wire 1 aaamk global_interrupts_i_174 $end +$var wire 1 aaaml global_interrupts_i_175 $end +$var wire 1 aaamm global_interrupts_i_176 $end +$var wire 1 aaamn global_interrupts_i_177 $end +$var wire 1 aaamo global_interrupts_i_178 $end +$var wire 1 aaamp global_interrupts_i_179 $end +$var wire 1 aaamq global_interrupts_i_180 $end +$var wire 1 aaamr global_interrupts_i_181 $end +$var wire 1 aaams global_interrupts_i_182 $end +$var wire 1 aaamt global_interrupts_i_183 $end +$var wire 1 aaamu global_interrupts_i_184 $end +$var wire 1 aaamv global_interrupts_i_185 $end +$var wire 1 aaamw global_interrupts_i_186 $end +$var wire 1 aaamx global_interrupts_i_187 $end +$var wire 1 aaamy global_interrupts_i_188 $end +$var wire 1 aaamz global_interrupts_i_189 $end +$var wire 1 aaana global_interrupts_i_190 $end +$var wire 1 aaanb global_interrupts_i_191 $end +$var wire 1 aaanc global_interrupts_i_192 $end +$var wire 1 aaand global_interrupts_i_193 $end +$var wire 1 aaane global_interrupts_i_194 $end +$var wire 1 aaanf global_interrupts_i_195 $end +$var wire 1 aaang global_interrupts_i_196 $end +$var wire 1 aaanh global_interrupts_i_197 $end +$var wire 1 aaani global_interrupts_i_198 $end +$var wire 1 aaanj global_interrupts_i_199 $end +$var wire 1 aaank global_interrupts_i_200 $end +$var wire 1 aaanl global_interrupts_i_201 $end +$var wire 1 aaanm global_interrupts_i_202 $end +$var wire 1 aaann global_interrupts_i_203 $end +$var wire 1 aaano global_interrupts_i_204 $end +$var wire 1 aaanp global_interrupts_i_205 $end +$var wire 1 aaanq global_interrupts_i_206 $end +$var wire 1 aaanr global_interrupts_i_207 $end +$var wire 1 aaans global_interrupts_i_208 $end +$var wire 1 aaant global_interrupts_i_209 $end +$var wire 1 aaanu global_interrupts_i_210 $end +$var wire 1 aaanv global_interrupts_i_211 $end +$var wire 1 aaanw global_interrupts_i_212 $end +$var wire 1 aaanx global_interrupts_i_213 $end +$var wire 1 aaany global_interrupts_i_214 $end +$var wire 1 aaanz global_interrupts_i_215 $end +$var wire 1 aaaoa global_interrupts_i_216 $end +$var wire 1 aaaob global_interrupts_i_217 $end +$var wire 1 aaaoc global_interrupts_i_218 $end +$var wire 1 aaaod global_interrupts_i_219 $end +$var wire 1 aaaoe global_interrupts_i_220 $end +$var wire 1 aaaof global_interrupts_i_221 $end +$var wire 1 aaaog global_interrupts_i_222 $end +$var wire 1 aaaoh global_interrupts_i_223 $end +$var wire 1 aaaoi global_interrupts_i_224 $end +$var wire 1 aaaoj global_interrupts_i_225 $end +$var wire 1 aaaok global_interrupts_i_226 $end +$var wire 1 aaaol global_interrupts_i_227 $end +$var wire 1 aaaom global_interrupts_i_228 $end +$var wire 1 aaaon global_interrupts_i_229 $end +$var wire 1 aaaoo global_interrupts_i_230 $end +$var wire 1 aaaop global_interrupts_i_231 $end +$var wire 1 aaaoq global_interrupts_i_232 $end +$var wire 1 aaaor global_interrupts_i_233 $end +$var wire 1 aaaos global_interrupts_i_234 $end +$var wire 1 aaaot global_interrupts_i_235 $end +$var wire 1 aaaou global_interrupts_i_236 $end +$var wire 1 aaaov global_interrupts_i_237 $end +$var wire 1 aaaow global_interrupts_i_238 $end +$var wire 1 aaaox global_interrupts_i_239 $end +$var wire 1 aaaoy global_interrupts_i_240 $end +$var wire 1 aaaoz global_interrupts_i_241 $end +$var wire 1 aaapa global_interrupts_i_242 $end +$var wire 1 aaapb global_interrupts_i_243 $end +$var wire 1 aaapc global_interrupts_i_244 $end +$var wire 1 aaapd global_interrupts_i_245 $end +$var wire 1 aaape global_interrupts_i_246 $end +$var wire 1 aaapf global_interrupts_i_247 $end +$var wire 1 aaapg global_interrupts_i_248 $end +$var wire 1 aaaph global_interrupts_i_249 $end +$var wire 1 aaapi global_interrupts_i_250 $end +$var wire 1 aaapj global_interrupts_i_251 $end +$var wire 1 aaapk global_interrupts_i_252 $end +$var wire 1 aaapl global_interrupts_i_253 $end +$var wire 1 aaapm global_interrupts_i_254 $end +$var wire 1 aaapn global_interrupts_i_255 $end +$scope module regs $end +$var wire 32 aaapo priority0 [31:0] $end +$var wire 32 aaapp priority1 [31:0] $end +$var wire 32 aaapq priority2 [31:0] $end +$var wire 32 aaapr priority3 [31:0] $end +$var wire 32 aaaps priority4 [31:0] $end +$var wire 32 aaapt priority5 [31:0] $end +$var wire 32 aaapu priority6 [31:0] $end +$var wire 32 aaapv priority7 [31:0] $end +$var wire 32 aaapw priority8 [31:0] $end +$var wire 32 aaapx priority9 [31:0] $end +$var wire 32 aaapy priority10 [31:0] $end +$var wire 32 aaapz priority11 [31:0] $end +$var wire 32 aaaqa priority12 [31:0] $end +$var wire 32 aaaqb priority13 [31:0] $end +$var wire 32 aaaqc priority14 [31:0] $end +$var wire 32 aaaqd priority15 [31:0] $end +$var wire 32 aaaqe priority16 [31:0] $end +$var wire 32 aaaqf priority17 [31:0] $end +$var wire 32 aaaqg priority18 [31:0] $end +$var wire 32 aaaqh priority19 [31:0] $end +$var wire 32 aaaqi priority20 [31:0] $end +$var wire 32 aaaqj priority21 [31:0] $end +$var wire 32 aaaqk priority22 [31:0] $end +$var wire 32 aaaql priority23 [31:0] $end +$var wire 32 aaaqm priority24 [31:0] $end +$var wire 32 aaaqn priority25 [31:0] $end +$var wire 32 aaaqo priority26 [31:0] $end +$var wire 32 aaaqp priority27 [31:0] $end +$var wire 32 aaaqq priority28 [31:0] $end +$var wire 32 aaaqr priority29 [31:0] $end +$var wire 32 aaaqs priority30 [31:0] $end +$var wire 32 aaaqt priority31 [31:0] $end +$var wire 32 aaaqu priority32 [31:0] $end +$var wire 32 aaaqv priority33 [31:0] $end +$var wire 32 aaaqw priority34 [31:0] $end +$var wire 32 aaaqx priority35 [31:0] $end +$var wire 32 aaaqy priority36 [31:0] $end +$var wire 32 aaaqz priority37 [31:0] $end +$var wire 32 aaara priority38 [31:0] $end +$var wire 32 aaarb priority39 [31:0] $end +$var wire 32 aaarc priority40 [31:0] $end +$var wire 32 aaard priority41 [31:0] $end +$var wire 32 aaare priority42 [31:0] $end +$var wire 32 aaarf priority43 [31:0] $end +$var wire 32 aaarg priority44 [31:0] $end +$var wire 32 aaarh priority45 [31:0] $end +$var wire 32 aaari priority46 [31:0] $end +$var wire 32 aaarj priority47 [31:0] $end +$var wire 32 aaark priority48 [31:0] $end +$var wire 32 aaarl priority49 [31:0] $end +$var wire 32 aaarm priority50 [31:0] $end +$var wire 32 aaarn priority51 [31:0] $end +$var wire 32 aaaro priority52 [31:0] $end +$var wire 32 aaarp priority53 [31:0] $end +$var wire 32 aaarq priority54 [31:0] $end +$var wire 32 aaarr priority55 [31:0] $end +$var wire 32 aaars priority56 [31:0] $end +$var wire 32 aaart priority57 [31:0] $end +$var wire 32 aaaru priority58 [31:0] $end +$var wire 32 aaarv priority59 [31:0] $end +$var wire 32 aaarw priority60 [31:0] $end +$var wire 32 aaarx priority61 [31:0] $end +$var wire 32 aaary priority62 [31:0] $end +$var wire 32 aaarz priority63 [31:0] $end +$var wire 32 aaasa priority64 [31:0] $end +$var wire 32 aaasb priority65 [31:0] $end +$var wire 32 aaasc priority66 [31:0] $end +$var wire 32 aaasd priority67 [31:0] $end +$var wire 32 aaase priority68 [31:0] $end +$var wire 32 aaasf priority69 [31:0] $end +$var wire 32 aaasg priority70 [31:0] $end +$var wire 32 aaash priority71 [31:0] $end +$var wire 32 aaasi priority72 [31:0] $end +$var wire 32 aaasj priority73 [31:0] $end +$var wire 32 aaask priority74 [31:0] $end +$var wire 32 aaasl priority75 [31:0] $end +$var wire 32 aaasm priority76 [31:0] $end +$var wire 32 aaasn priority77 [31:0] $end +$var wire 32 aaaso priority78 [31:0] $end +$var wire 32 aaasp priority79 [31:0] $end +$var wire 32 aaasq priority80 [31:0] $end +$var wire 32 aaasr priority81 [31:0] $end +$var wire 32 aaass priority82 [31:0] $end +$var wire 32 aaast priority83 [31:0] $end +$var wire 32 aaasu priority84 [31:0] $end +$var wire 32 aaasv priority85 [31:0] $end +$var wire 32 aaasw priority86 [31:0] $end +$var wire 32 aaasx priority87 [31:0] $end +$var wire 32 aaasy priority88 [31:0] $end +$var wire 32 aaasz priority89 [31:0] $end +$var wire 32 aaata priority90 [31:0] $end +$var wire 32 aaatb priority91 [31:0] $end +$var wire 32 aaatc priority92 [31:0] $end +$var wire 32 aaatd priority93 [31:0] $end +$var wire 32 aaate priority94 [31:0] $end +$var wire 32 aaatf priority95 [31:0] $end +$var wire 32 aaatg priority96 [31:0] $end +$var wire 32 aaath priority97 [31:0] $end +$var wire 32 aaati priority98 [31:0] $end +$var wire 32 aaatj priority99 [31:0] $end +$var wire 32 aaatk priority100 [31:0] $end +$var wire 32 aaatl priority101 [31:0] $end +$var wire 32 aaatm priority102 [31:0] $end +$var wire 32 aaatn priority103 [31:0] $end +$var wire 32 aaato priority104 [31:0] $end +$var wire 32 aaatp priority105 [31:0] $end +$var wire 32 aaatq priority106 [31:0] $end +$var wire 32 aaatr priority107 [31:0] $end +$var wire 32 aaats priority108 [31:0] $end +$var wire 32 aaatt priority109 [31:0] $end +$var wire 32 aaatu priority110 [31:0] $end +$var wire 32 aaatv priority111 [31:0] $end +$var wire 32 aaatw priority112 [31:0] $end +$var wire 32 aaatx priority113 [31:0] $end +$var wire 32 aaaty priority114 [31:0] $end +$var wire 32 aaatz priority115 [31:0] $end +$var wire 32 aaaua priority116 [31:0] $end +$var wire 32 aaaub priority117 [31:0] $end +$var wire 32 aaauc priority118 [31:0] $end +$var wire 32 aaaud priority119 [31:0] $end +$var wire 32 aaaue priority120 [31:0] $end +$var wire 32 aaauf priority121 [31:0] $end +$var wire 32 aaaug priority122 [31:0] $end +$var wire 32 aaauh priority123 [31:0] $end +$var wire 32 aaaui priority124 [31:0] $end +$var wire 32 aaauj priority125 [31:0] $end +$var wire 32 aaauk priority126 [31:0] $end +$var wire 32 aaaul priority127 [31:0] $end +$var wire 32 aaaum priority128 [31:0] $end +$var wire 32 aaaun priority129 [31:0] $end +$var wire 32 aaauo priority130 [31:0] $end +$var wire 32 aaaup priority131 [31:0] $end +$var wire 32 aaauq priority132 [31:0] $end +$var wire 32 aaaur priority133 [31:0] $end +$var wire 32 aaaus priority134 [31:0] $end +$var wire 32 aaaut priority135 [31:0] $end +$var wire 32 aaauu priority136 [31:0] $end +$var wire 32 aaauv priority137 [31:0] $end +$var wire 32 aaauw priority138 [31:0] $end +$var wire 32 aaaux priority139 [31:0] $end +$var wire 32 aaauy priority140 [31:0] $end +$var wire 32 aaauz priority141 [31:0] $end +$var wire 32 aaava priority142 [31:0] $end +$var wire 32 aaavb priority143 [31:0] $end +$var wire 32 aaavc priority144 [31:0] $end +$var wire 32 aaavd priority145 [31:0] $end +$var wire 32 aaave priority146 [31:0] $end +$var wire 32 aaavf priority147 [31:0] $end +$var wire 32 aaavg priority148 [31:0] $end +$var wire 32 aaavh priority149 [31:0] $end +$var wire 32 aaavi priority150 [31:0] $end +$var wire 32 aaavj priority151 [31:0] $end +$var wire 32 aaavk priority152 [31:0] $end +$var wire 32 aaavl priority153 [31:0] $end +$var wire 32 aaavm priority154 [31:0] $end +$var wire 32 aaavn priority155 [31:0] $end +$var wire 32 aaavo priority156 [31:0] $end +$var wire 32 aaavp priority157 [31:0] $end +$var wire 32 aaavq priority158 [31:0] $end +$var wire 32 aaavr priority159 [31:0] $end +$var wire 32 aaavs priority160 [31:0] $end +$var wire 32 aaavt priority161 [31:0] $end +$var wire 32 aaavu priority162 [31:0] $end +$var wire 32 aaavv priority163 [31:0] $end +$var wire 32 aaavw priority164 [31:0] $end +$var wire 32 aaavx priority165 [31:0] $end +$var wire 32 aaavy priority166 [31:0] $end +$var wire 32 aaavz priority167 [31:0] $end +$var wire 32 aaawa priority168 [31:0] $end +$var wire 32 aaawb priority169 [31:0] $end +$var wire 32 aaawc priority170 [31:0] $end +$var wire 32 aaawd priority171 [31:0] $end +$var wire 32 aaawe priority172 [31:0] $end +$var wire 32 aaawf priority173 [31:0] $end +$var wire 32 aaawg priority174 [31:0] $end +$var wire 32 aaawh priority175 [31:0] $end +$var wire 32 aaawi priority176 [31:0] $end +$var wire 32 aaawj priority177 [31:0] $end +$var wire 32 aaawk priority178 [31:0] $end +$var wire 32 aaawl priority179 [31:0] $end +$var wire 32 aaawm priority180 [31:0] $end +$var wire 32 aaawn priority181 [31:0] $end +$var wire 32 aaawo priority182 [31:0] $end +$var wire 32 aaawp priority183 [31:0] $end +$var wire 32 aaawq priority184 [31:0] $end +$var wire 32 aaawr priority185 [31:0] $end +$var wire 32 aaaws priority186 [31:0] $end +$var wire 32 aaawt priority187 [31:0] $end +$var wire 32 aaawu priority188 [31:0] $end +$var wire 32 aaawv priority189 [31:0] $end +$var wire 32 aaaww priority190 [31:0] $end +$var wire 32 aaawx priority191 [31:0] $end +$var wire 32 aaawy priority192 [31:0] $end +$var wire 32 aaawz priority193 [31:0] $end +$var wire 32 aaaxa priority194 [31:0] $end +$var wire 32 aaaxb priority195 [31:0] $end +$var wire 32 aaaxc priority196 [31:0] $end +$var wire 32 aaaxd priority197 [31:0] $end +$var wire 32 aaaxe priority198 [31:0] $end +$var wire 32 aaaxf priority199 [31:0] $end +$var wire 32 aaaxg priority200 [31:0] $end +$var wire 32 aaaxh priority201 [31:0] $end +$var wire 32 aaaxi priority202 [31:0] $end +$var wire 32 aaaxj priority203 [31:0] $end +$var wire 32 aaaxk priority204 [31:0] $end +$var wire 32 aaaxl priority205 [31:0] $end +$var wire 32 aaaxm priority206 [31:0] $end +$var wire 32 aaaxn priority207 [31:0] $end +$var wire 32 aaaxo priority208 [31:0] $end +$var wire 32 aaaxp priority209 [31:0] $end +$var wire 32 aaaxq priority210 [31:0] $end +$var wire 32 aaaxr priority211 [31:0] $end +$var wire 32 aaaxs priority212 [31:0] $end +$var wire 32 aaaxt priority213 [31:0] $end +$var wire 32 aaaxu priority214 [31:0] $end +$var wire 32 aaaxv priority215 [31:0] $end +$var wire 32 aaaxw priority216 [31:0] $end +$var wire 32 aaaxx priority217 [31:0] $end +$var wire 32 aaaxy priority218 [31:0] $end +$var wire 32 aaaxz priority219 [31:0] $end +$var wire 32 aaaya priority220 [31:0] $end +$var wire 32 aaayb priority221 [31:0] $end +$var wire 32 aaayc priority222 [31:0] $end +$var wire 32 aaayd priority223 [31:0] $end +$var wire 32 aaaye priority224 [31:0] $end +$var wire 32 aaayf priority225 [31:0] $end +$var wire 32 aaayg priority226 [31:0] $end +$var wire 32 aaayh priority227 [31:0] $end +$var wire 32 aaayi priority228 [31:0] $end +$var wire 32 aaayj priority229 [31:0] $end +$var wire 32 aaayk priority230 [31:0] $end +$var wire 32 aaayl priority231 [31:0] $end +$var wire 32 aaaym priority232 [31:0] $end +$var wire 32 aaayn priority233 [31:0] $end +$var wire 32 aaayo priority234 [31:0] $end +$var wire 32 aaayp priority235 [31:0] $end +$var wire 32 aaayq priority236 [31:0] $end +$var wire 32 aaayr priority237 [31:0] $end +$var wire 32 aaays priority238 [31:0] $end +$var wire 32 aaayt priority239 [31:0] $end +$var wire 32 aaayu priority240 [31:0] $end +$var wire 32 aaayv priority241 [31:0] $end +$var wire 32 aaayw priority242 [31:0] $end +$var wire 32 aaayx priority243 [31:0] $end +$var wire 32 aaayy priority244 [31:0] $end +$var wire 32 aaayz priority245 [31:0] $end +$var wire 32 aaaza priority246 [31:0] $end +$var wire 32 aaazb priority247 [31:0] $end +$var wire 32 aaazc priority248 [31:0] $end +$var wire 32 aaazd priority249 [31:0] $end +$var wire 32 aaaze priority250 [31:0] $end +$var wire 32 aaazf priority251 [31:0] $end +$var wire 32 aaazg priority252 [31:0] $end +$var wire 32 aaazh priority253 [31:0] $end +$var wire 32 aaazi priority254 [31:0] $end +$var wire 32 aaazj priority255 [31:0] $end +$var wire 32 aaazk pending0 [31:0] $end +$var wire 32 aaazl pending1 [31:0] $end +$var wire 32 aaazm pending2 [31:0] $end +$var wire 32 aaazn pending3 [31:0] $end +$var wire 32 aaazo pending4 [31:0] $end +$var wire 32 aaazp pending5 [31:0] $end +$var wire 32 aaazq pending6 [31:0] $end +$var wire 32 aaazr pending7 [31:0] $end +$var wire 32 aaazs enabled0 [31:0] $end +$var wire 32 aaazt enabled1 [31:0] $end +$var wire 32 aaazu enabled2 [31:0] $end +$var wire 32 aaazv enabled3 [31:0] $end +$var wire 32 aaazw enabled4 [31:0] $end +$var wire 32 aaazx enabled5 [31:0] $end +$var wire 32 aaazy enabled6 [31:0] $end +$var wire 32 aaazz enabled7 [31:0] $end +$var wire 32 aabaa threshold [31:0] $end +$var wire 32 aabab claim_complete [31:0] $end +$upscope $end +$upscope $end +$scope module i_prci $end +$var wire 1 aabcq rst_i $end +$scope module regs $end +$var wire 32 aabcr hfrosccfg [31:0] $end +$var wire 32 aabcs hfxosccfg [31:0] $end +$var wire 32 aabct pllcfg [31:0] $end +$var wire 32 aabcu plloutdiv [31:0] $end +$var wire 32 aabcv coreclkcfg [31:0] $end +$upscope $end +$upscope $end +$scope module i_qspi0 $end +$var wire 64 aaacv clk_i [63:0] $end +$var wire 1 aaacw rst_i $end +$scope module regs $end +$var wire 32 aaacx sckdiv [31:0] $end +$var wire 32 aaacy sckmode [31:0] $end +$var wire 32 aaacz csid [31:0] $end +$var wire 32 aaada csdef [31:0] $end +$var wire 32 aaadb csmode [31:0] $end +$var wire 32 aaadc delay0 [31:0] $end +$var wire 32 aaadd delay1 [31:0] $end +$var wire 32 aaade fmt [31:0] $end +$var wire 32 aaadf txdata [31:0] $end +$var wire 32 aaadg rxdata [31:0] $end +$var wire 32 aaadh txmark [31:0] $end +$var wire 32 aaadi rxmark [31:0] $end +$var wire 32 aaadj fctrl [31:0] $end +$var wire 32 aaadk ffmt [31:0] $end +$var wire 32 aaadl ie [31:0] $end +$var wire 32 aaadm ip [31:0] $end +$upscope $end +$upscope $end +$scope module i_qspi1 $end +$var wire 64 aaadn clk_i [63:0] $end +$var wire 1 aaado rst_i $end +$scope module regs $end +$var wire 32 aaadp sckdiv [31:0] $end +$var wire 32 aaadq sckmode [31:0] $end +$var wire 32 aaadr csid [31:0] $end +$var wire 32 aaads csdef [31:0] $end +$var wire 32 aaadt csmode [31:0] $end +$var wire 32 aaadu delay0 [31:0] $end +$var wire 32 aaadv delay1 [31:0] $end +$var wire 32 aaadw fmt [31:0] $end +$var wire 32 aaadx txdata [31:0] $end +$var wire 32 aaady rxdata [31:0] $end +$var wire 32 aaadz txmark [31:0] $end +$var wire 32 aaaea rxmark [31:0] $end +$var wire 32 aaaeb fctrl [31:0] $end +$var wire 32 aaaec ffmt [31:0] $end +$var wire 32 aaaed ie [31:0] $end +$var wire 32 aaaee ip [31:0] $end +$upscope $end +$upscope $end +$scope module i_qspi2 $end +$var wire 64 aaaef clk_i [63:0] $end +$var wire 1 aaaeg rst_i $end +$scope module regs $end +$var wire 32 aaaeh sckdiv [31:0] $end +$var wire 32 aaaei sckmode [31:0] $end +$var wire 32 aaaej csid [31:0] $end +$var wire 32 aaaek csdef [31:0] $end +$var wire 32 aaael csmode [31:0] $end +$var wire 32 aaaem delay0 [31:0] $end +$var wire 32 aaaen delay1 [31:0] $end +$var wire 32 aaaeo fmt [31:0] $end +$var wire 32 aaaep txdata [31:0] $end +$var wire 32 aaaeq rxdata [31:0] $end +$var wire 32 aaaer txmark [31:0] $end +$var wire 32 aaaes rxmark [31:0] $end +$var wire 32 aaaet fctrl [31:0] $end +$var wire 32 aaaeu ffmt [31:0] $end +$var wire 32 aaaev ie [31:0] $end +$var wire 32 aaaew ip [31:0] $end +$upscope $end +$upscope $end +$scope module i_uart0 $end +$var wire 64 aaacd clk_i [63:0] $end +$var wire 1 aaace rst_i $end +$scope module regs $end +$var wire 32 aaacf txdata [31:0] $end +$var wire 32 aaacg rxdata [31:0] $end +$var wire 32 aaach txctrl [31:0] $end +$var wire 32 aaaci rxctrl [31:0] $end +$var wire 32 aaacj ie [31:0] $end +$var wire 32 aaack ip [31:0] $end +$var wire 32 aaacl div [31:0] $end +$upscope $end +$upscope $end +$scope module i_uart1 $end +$var wire 64 aaacm clk_i [63:0] $end +$var wire 1 aaacn rst_i $end +$scope module regs $end +$var wire 32 aaaco txdata [31:0] $end +$var wire 32 aaacp rxdata [31:0] $end +$var wire 32 aaacq txctrl [31:0] $end +$var wire 32 aaacr rxctrl [31:0] $end +$var wire 32 aaacs ie [31:0] $end +$var wire 32 aaact ip [31:0] $end +$var wire 32 aaacu div [31:0] $end +$upscope $end +$upscope $end +$upscope $end +$upscope $end +$upscope $end +$enddefinitions $end + +$comment +All initial values are dumped below at time 0 sec = 0 timescale units. +$end + +$dumpvars +xaaaaa +xaaaab +xaaaac +xaaaad +xaaaae +xaaaaf +xaaaag +xaaaah +xaaaai +xaaaaj +xaaaak +xaaaal +xaaaam +xaaaan +xaaaao +xaaaap +xaaaaq +xaaaar +xaaaas +xaaaat +xaaaau +xaaaav +xaaaaw +xaaaax +xaaaay +xaaaaz +xaaaba +xaaabb +xaaabc +xaaabd +xaaabe +xaaabf +0aaabg +0aaabh +b11011001000000111001 aaabi +1aaabj +0aaabk +0aaabl +0aaabm +0aaabn +0aaabo +0aaabp +0aaabq +0aaabr +0aaabs +0aaabt +0aaabu +0aaabv +0aaabw +0aaabx +0aaaby +0aaabz +0aaaca +0aaacb +0aaacc +b11011001000000111001 aaacd +1aaace +b0 aaacf +b0 aaacg +b0 aaach +b0 aaaci +b0 aaacj +b0 aaack +b0 aaacl +b11011001000000111001 aaacm +1aaacn +b0 aaaco +b0 aaacp +b0 aaacq +b0 aaacr +b0 aaacs +b0 aaact +b0 aaacu +b11011001000000111001 aaacv +1aaacw +b0 aaacx +b0 aaacy +b0 aaacz +b0 aaada +b0 aaadb +b0 aaadc +b0 aaadd +b0 aaade +b0 aaadf +b0 aaadg +b0 aaadh +b0 aaadi +b0 aaadj +b0 aaadk +b0 aaadl +b0 aaadm +b11011001000000111001 aaadn +1aaado +b0 aaadp +b0 aaadq +b0 aaadr +b0 aaads +b0 aaadt +b0 aaadu +b0 aaadv +b0 aaadw +b0 aaadx +b0 aaady +b0 aaadz +b0 aaaea +b0 aaaeb +b0 aaaec +b0 aaaed +b0 aaaee +b11011001000000111001 aaaef +1aaaeg +b0 aaaeh +b0 aaaei +b0 aaaej +b0 aaaek +b0 aaael +b0 aaaem +b0 aaaen +b0 aaaeo +b0 aaaep +b0 aaaeq +b0 aaaer +b0 aaaes +b0 aaaet +b0 aaaeu +b0 aaaev +b0 aaaew +b11011001000000111001 aaaex +1aaaey +b0 aaaez +b0 aaafa +b0 aaafb +b0 aaafc +b0 aaafd +b0 aaafe +b0 aaaff +b0 aaafg +b0 aaafh +b0 aaafi +b0 aaafj +b0 aaafk +b0 aaafl +b0 aaafm +b0 aaafn +b0 aaafo +b0 aaafp +b11011001000000111001 aaafq +1aaafr +0aaafs +0aaaft +0aaafu +0aaafv +0aaafw +0aaafx +0aaafy +0aaafz +0aaaga +0aaagb +0aaagc +0aaagd +0aaage +0aaagf +0aaagg +0aaagh +0aaagi +0aaagj +0aaagk +0aaagl +0aaagm +0aaagn +0aaago +0aaagp +0aaagq +0aaagr +0aaags +0aaagt +0aaagu +0aaagv +0aaagw +0aaagx +0aaagy +0aaagz +0aaaha +0aaahb +0aaahc +0aaahd +0aaahe +0aaahf +0aaahg +0aaahh +0aaahi +0aaahj +0aaahk +0aaahl +0aaahm +0aaahn +0aaaho +0aaahp +0aaahq +0aaahr +0aaahs +0aaaht +0aaahu +0aaahv +0aaahw +0aaahx +0aaahy +0aaahz +0aaaia +0aaaib +0aaaic +0aaaid +0aaaie +0aaaif +0aaaig +0aaaih +0aaaii +0aaaij +0aaaik +0aaail +0aaaim +0aaain +0aaaio +0aaaip +0aaaiq +0aaair +0aaais +0aaait +0aaaiu +0aaaiv +0aaaiw +0aaaix +0aaaiy +0aaaiz +0aaaja +0aaajb +0aaajc +0aaajd +0aaaje +0aaajf +0aaajg +0aaajh +0aaaji +0aaajj +0aaajk +0aaajl +0aaajm +0aaajn +0aaajo +0aaajp +0aaajq +0aaajr +0aaajs +0aaajt +0aaaju +0aaajv +0aaajw +0aaajx +0aaajy +0aaajz +0aaaka +0aaakb +0aaakc +0aaakd +0aaake +0aaakf +0aaakg +0aaakh +0aaaki +0aaakj +0aaakk +0aaakl +0aaakm +0aaakn +0aaako +0aaakp +0aaakq +0aaakr +0aaaks +0aaakt +0aaaku +0aaakv +0aaakw +0aaakx +0aaaky +0aaakz +0aaala +0aaalb +0aaalc +0aaald +0aaale +0aaalf +0aaalg +0aaalh +0aaali +0aaalj +0aaalk +0aaall +0aaalm +0aaaln +0aaalo +0aaalp +0aaalq +0aaalr +0aaals +0aaalt +0aaalu +0aaalv +0aaalw +0aaalx +0aaaly +0aaalz +0aaama +0aaamb +0aaamc +0aaamd +0aaame +0aaamf +0aaamg +0aaamh +0aaami +0aaamj +0aaamk +0aaaml +0aaamm +0aaamn +0aaamo +0aaamp +0aaamq +0aaamr +0aaams +0aaamt +0aaamu +0aaamv +0aaamw +0aaamx +0aaamy +0aaamz +0aaana +0aaanb +0aaanc +0aaand +0aaane +0aaanf +0aaang +0aaanh +0aaani +0aaanj +0aaank +0aaanl +0aaanm +0aaann +0aaano +0aaanp +0aaanq +0aaanr +0aaans +0aaant +0aaanu +0aaanv +0aaanw +0aaanx +0aaany +0aaanz +0aaaoa +0aaaob +0aaaoc +0aaaod +0aaaoe +0aaaof +0aaaog +0aaaoh +0aaaoi +0aaaoj +0aaaok +0aaaol +0aaaom +0aaaon +0aaaoo +0aaaop +0aaaoq +0aaaor +0aaaos +0aaaot +0aaaou +0aaaov +0aaaow +0aaaox +0aaaoy +0aaaoz +0aaapa +0aaapb +0aaapc +0aaapd +0aaape +0aaapf +0aaapg +0aaaph +0aaapi +0aaapj +0aaapk +0aaapl +0aaapm +0aaapn +b0 aaapo +b0 aaapp +b0 aaapq +b0 aaapr +b0 aaaps +b0 aaapt +b0 aaapu +b0 aaapv +b0 aaapw +b0 aaapx +b0 aaapy +b0 aaapz +b0 aaaqa +b0 aaaqb +b0 aaaqc +b0 aaaqd +b0 aaaqe +b0 aaaqf +b0 aaaqg +b0 aaaqh +b0 aaaqi +b0 aaaqj +b0 aaaqk +b0 aaaql +b0 aaaqm +b0 aaaqn +b0 aaaqo +b0 aaaqp +b0 aaaqq +b0 aaaqr +b0 aaaqs +b0 aaaqt +b0 aaaqu +b0 aaaqv +b0 aaaqw +b0 aaaqx +b0 aaaqy +b0 aaaqz +b0 aaara +b0 aaarb +b0 aaarc +b0 aaard +b0 aaare +b0 aaarf +b0 aaarg +b0 aaarh +b0 aaari +b0 aaarj +b0 aaark +b0 aaarl +b0 aaarm +b0 aaarn +b0 aaaro +b0 aaarp +b0 aaarq +b0 aaarr +b0 aaars +b0 aaart +b0 aaaru +b0 aaarv +b0 aaarw +b0 aaarx +b0 aaary +b0 aaarz +b0 aaasa +b0 aaasb +b0 aaasc +b0 aaasd +b0 aaase +b0 aaasf +b0 aaasg +b0 aaash +b0 aaasi +b0 aaasj +b0 aaask +b0 aaasl +b0 aaasm +b0 aaasn +b0 aaaso +b0 aaasp +b0 aaasq +b0 aaasr +b0 aaass +b0 aaast +b0 aaasu +b0 aaasv +b0 aaasw +b0 aaasx +b0 aaasy +b0 aaasz +b0 aaata +b0 aaatb +b0 aaatc +b0 aaatd +b0 aaate +b0 aaatf +b0 aaatg +b0 aaath +b0 aaati +b0 aaatj +b0 aaatk +b0 aaatl +b0 aaatm +b0 aaatn +b0 aaato +b0 aaatp +b0 aaatq +b0 aaatr +b0 aaats +b0 aaatt +b0 aaatu +b0 aaatv +b0 aaatw +b0 aaatx +b0 aaaty +b0 aaatz +b0 aaaua +b0 aaaub +b0 aaauc +b0 aaaud +b0 aaaue +b0 aaauf +b0 aaaug +b0 aaauh +b0 aaaui +b0 aaauj +b0 aaauk +b0 aaaul +b0 aaaum +b0 aaaun +b0 aaauo +b0 aaaup +b0 aaauq +b0 aaaur +b0 aaaus +b0 aaaut +b0 aaauu +b0 aaauv +b0 aaauw +b0 aaaux +b0 aaauy +b0 aaauz +b0 aaava +b0 aaavb +b0 aaavc +b0 aaavd +b0 aaave +b0 aaavf +b0 aaavg +b0 aaavh +b0 aaavi +b0 aaavj +b0 aaavk +b0 aaavl +b0 aaavm +b0 aaavn +b0 aaavo +b0 aaavp +b0 aaavq +b0 aaavr +b0 aaavs +b0 aaavt +b0 aaavu +b0 aaavv +b0 aaavw +b0 aaavx +b0 aaavy +b0 aaavz +b0 aaawa +b0 aaawb +b0 aaawc +b0 aaawd +b0 aaawe +b0 aaawf +b0 aaawg +b0 aaawh +b0 aaawi +b0 aaawj +b0 aaawk +b0 aaawl +b0 aaawm +b0 aaawn +b0 aaawo +b0 aaawp +b0 aaawq +b0 aaawr +b0 aaaws +b0 aaawt +b0 aaawu +b0 aaawv +b0 aaaww +b0 aaawx +b0 aaawy +b0 aaawz +b0 aaaxa +b0 aaaxb +b0 aaaxc +b0 aaaxd +b0 aaaxe +b0 aaaxf +b0 aaaxg +b0 aaaxh +b0 aaaxi +b0 aaaxj +b0 aaaxk +b0 aaaxl +b0 aaaxm +b0 aaaxn +b0 aaaxo +b0 aaaxp +b0 aaaxq +b0 aaaxr +b0 aaaxs +b0 aaaxt +b0 aaaxu +b0 aaaxv +b0 aaaxw +b0 aaaxx +b0 aaaxy +b0 aaaxz +b0 aaaya +b0 aaayb +b0 aaayc +b0 aaayd +b0 aaaye +b0 aaayf +b0 aaayg +b0 aaayh +b0 aaayi +b0 aaayj +b0 aaayk +b0 aaayl +b0 aaaym +b0 aaayn +b0 aaayo +b0 aaayp +b0 aaayq +b0 aaayr +b0 aaays +b0 aaayt +b0 aaayu +b0 aaayv +b0 aaayw +b0 aaayx +b0 aaayy +b0 aaayz +b0 aaaza +b0 aaazb +b0 aaazc +b0 aaazd +b0 aaaze +b0 aaazf +b0 aaazg +b0 aaazh +b0 aaazi +b0 aaazj +b0 aaazk +b0 aaazl +b0 aaazm +b0 aaazn +b0 aaazo +b0 aaazp +b0 aaazq +b0 aaazr +b0 aaazs +b0 aaazt +b0 aaazu +b0 aaazv +b0 aaazw +b0 aaazx +b0 aaazy +b0 aaazz +b0 aabaa +b0 aabab +b11011001000000111001 aabac +0aabad +b0 aabae +b0 aabaf +b0 aabag +b0 aabah +b0 aabai +b0 aabaj +b0 aabak +b0 aabal +b0 aabam +b0 aaban +b0 aabao +b0 aabap +b0 aabaq +b0 aabar +b0 aabas +b0 aabat +b0 aabau +b0 aabav +b0 aabaw +b0 aabax +b0 aabay +b0 aabaz +b0 aabba +b0 aabbb +b0 aabbc +b0 aabbd +b0 aabbe +b0 aabbf +b0 aabbg +b0 aabbh +b0 aabbi +b0 aabbj +b0 aabbk +b0 aabbl +b0 aabbm +b0 aabbn +b0 aabbo +b0 aabbp +b0 aabbq +b0 aabbr +b0 aabbs +b0 aabbt +b0 aabbu +b0 aabbv +b0 aabbw +b0 aabbx +b0 aabby +b0 aabbz +b0 aabca +b0 aabcb +b0 aabcc +b0 aabcd +b0 aabce +b0 aabcf +b0 aabcg +b0 aabch +b0 aabci +b0 aabcj +b0 aabck +b0 aabcl +b0 aabcm +b0 aabcn +b0 aabco +b0 aabcp +1aabcq +b0 aabcr +b1000000000000000000000000000000 aabcs +b0 aabct +b0 aabcu +b0 aabcv +b11011001000000111001 aabcw +b1110100011010100101001010 aabcx +1aabcy +b0 aabcz +b0 aabda +b0 aabdb +b11011001000000111001 aabdc +b1110100011010100101001010 aabdd +1aabde +0aabdf +0aabdg +0aabdh +0aabdi +0aabdj +0aabdk +0aabdl +0aabdm +0aabdn +0aabdo +0aabdp +0aabdq +0aabdr +0aabds +0aabdt +0aabdu +0aabdv +0aabdw +0aabdx +$end + +#10000 +1aaabg +1aaabh +0aaabj +0aaace +0aaacn +0aaacw +0aaado +0aaaeg +0aaaey +0aaafr +1aabad +0aabcq +0aabcy +0aabde + +#1287121272 +b1000000000100000000000000000100 aabcr + +#1288121272 +b111111110100111110 aaabi +b111111110100111110 aaacd +b111111110100111110 aaacm +b111111110100111110 aaacv +b111111110100111110 aaadn +b111111110100111110 aaaef +b111111110100111110 aaaex +b111111110100111110 aaafq +b111111110100111110 aabac +b11000000000100000000000000000100 aabcr +b111111110100111110 aabcw +b101010 aabdb +b111111110100111110 aabdc + +#1303801016 +b1000 aaacx + +#1311382718 +b100000000 aabcu + +#1312689908 +b1000000010111110001 aabct + +#1315304288 +b10000000000000000000010111110001 aabct + +#1317395792 +b101011 aabdb + +#1345892534 +b101100 aabdb + +#1375173590 +b101101 aabdb + +#1404454646 +b101110 aabdb + +#1437918710 +b101111 aabdb + +#1443670346 +b11111111010100 aaabi +b11111111010100 aaacd +b11111111010100 aaacm +b11111111010100 aaacv +b11111111010100 aaadn +b11111111010100 aaaef +b11111111010100 aaaex +b11111111010100 aaafq +b11111111010100 aabac +b10000000000000010000010111110001 aabct +b11111111010100 aabcw +b11111111010100 aabdc + +#1444438324 +1aaaar +b100000000000000000 aaaez +b110000000000000000 aaafn + +#1465026724 +b110000 aabdb + +#1495631544 +b110001 aabdb + +#1525958584 +b110010 aabdb + +#1556563404 +b110011 aabdb + +#1587151884 +b110100 aabdb + +#1617446244 +b110101 aabdb + +#1648034724 +b110110 aabdb + +#1678623204 +b110111 aabdb + +#1709211684 +b111000 aabdb + +#1739506044 +b111001 aabdb + +#1770094524 +b111010 aabdb + +#1800683004 +b111011 aabdb + +#1831271484 +b111100 aabdb + +#1832121164 +b1000010010 aaacl + +#1832251884 +b1 aaach + +#1834261704 +0aaaar +b1100011 aaacf +b1 aaack +b0 aaaez + +#1835797664 +b1101111 aaacf + +#1837333624 +b1110010 aaacf + +#1838869584 +b1100101 aaacf + +#1840405544 +b100000 aaacf + +#1841941504 +b1100110 aaacf + +#1843477464 +b1110010 aaacf + +#1845013424 +b1100101 aaacf + +#1846549384 +b1110001 aaacf + +#1848085344 +b100000 aaacf + +#1849621304 +b1100001 aaacf + +#1851157264 +b1110100 aaacf + +#1851614784 +1aaaar +b100000000000000000 aaaez + +#1852693224 +b100000 aaacf + +#1858052744 +b110110 aaacf + +#1859735764 +b110001 aaacf + +#1861418784 +b110010 aaacf + +#1863101804 +b10000000000000000000000000110011 aaacf + +#1868967864 +0aaaar +b0 aaaez + +#1894997484 +1aaaar +b100000000000000000 aaaez + +#1921027104 +0aaaar +b0 aaaez + +#1938380184 +1aaaar +b100000000000000000 aaaez + +#1955733264 +0aaaar +b0 aaaez + +#1964409804 +1aaaar +b100000000000000000 aaaez + +#2007792504 +0aaaar +b110011 aaacf +b0 aaaez + +#2007923224 +b110110 aaacf + +#2009606244 +b10000000000000000000000000111000 aaacf + +#2025145584 +1aaaar +b100000000000000000 aaaez + +#2051175204 +0aaaar +b0 aaaez + +#2068528284 +1aaaar +b100000000000000000 aaaez + +#2077204824 +0aaaar +b0 aaaez + +#2085881364 +1aaaar +b100000000000000000 aaaez + +#2094557904 +0aaaar +b0 aaaez + +#2111910984 +1aaaar +b100000000000000000 aaaez + +#2129264064 +0aaaar +b0 aaaez + +#2146617144 +1aaaar +b100000000000000000 aaaez + +#2155293684 +0aaaar +b0 aaaez + +#2163970224 +1aaaar +b100000000000000000 aaaez + +#2181323304 +0aaaar +b111000 aaacf +b0 aaaez + +#2181437684 +b110011 aaacf + +#2183120704 +b10000000000000000000000000111000 aaacf + +#2207352924 +1aaaar +b100000000000000000 aaaez + +#2216029464 +0aaaar +b0 aaaez + +#2259412164 +1aaaar +b100000000000000000 aaaez + +#2268088704 +0aaaar +b0 aaaez + +#2285441784 +1aaaar +b100000000000000000 aaaez + +#2302794864 +0aaaar +b0 aaaez + +#2320147944 +1aaaar +b100000000000000000 aaaez + +#2337501024 +0aaaar +b0 aaaez + +#2346177564 +1aaaar +b100000000000000000 aaaez + +#2354854104 +0aaaar +b111000 aaacf +b0 aaaez + +#2354984824 +b100000 aaacf + +#2356520784 +b10000000000000000000000001001000 aaacf + +#2372207184 +1aaaar +b100000000000000000 aaaez + +#2398236804 +0aaaar +b0 aaaez + +#2415589884 +1aaaar +b100000000000000000 aaaez + +#2424266424 +0aaaar +b0 aaaez + +#2432942964 +1aaaar +b100000000000000000 aaaez + +#2441619504 +0aaaar +b0 aaaez + +#2458972584 +1aaaar +b100000000000000000 aaaez + +#2476325664 +0aaaar +b0 aaaez + +#2493678744 +1aaaar +b100000000000000000 aaaez + +#2502355284 +0aaaar +b0 aaaez + +#2511031824 +1aaaar +b100000000000000000 aaaez + +#2528384904 +0aaaar +b1001000 aaacf +b0 aaaez + +#2528499284 +b1111010 aaacf + +#2530035244 +b10000000000000000000000000001010 aaacf + +#2545737984 +1aaaar +b100000000000000000 aaaez + +#2571767604 +0aaaar +b0 aaaez + +#2597797224 +1aaaar +b100000000000000000 aaaez + +#2615150304 +0aaaar +b0 aaaez + +#2641179924 +1aaaar +b100000000000000000 aaaez + +#2649856464 +0aaaar +b0 aaaez + +#2693239164 +1aaaar +b100000000000000000 aaaez + +#2701915704 +0aaaar +b1010 aaacf +b0 aaaez + +#2701981064 +b1101 aaacf + +#2706801364 +b10000000000000000000000001000110 aaacf + +#2719268784 +1aaaar +b100000000000000000 aaaez + +#2736621864 +0aaaar +b0 aaaez + +#2771328024 +1aaaar +b100000000000000000 aaaez + +#2788681104 +0aaaar +b0 aaaez + +#2806034184 +1aaaar +b100000000000000000 aaaez + +#2832063804 +0aaaar +b0 aaaez + +#2840740344 +1aaaar +b100000000000000000 aaaez + +#2849416884 +0aaaar +b0 aaaez + +#2866769964 +1aaaar +b100000000000000000 aaaez + +#2875446504 +0aaaar +b1000110 aaacf +b0 aaaez + +#2875593564 +b1100001 aaacf + +#2877129524 +b10000000000000000000000001100011 aaacf + +#2901476124 +1aaaar +b100000000000000000 aaaez + +#2910152664 +0aaaar +b0 aaaez + +#2953535364 +1aaaar +b100000000000000000 aaaez + +#2962211904 +0aaaar +b0 aaaez + +#2988241524 +1aaaar +b100000000000000000 aaaez + +#3005594604 +0aaaar +b0 aaaez + +#3014271144 +1aaaar +b100000000000000000 aaaez + +#3031624224 +0aaaar +b0 aaaez + +#3040300764 +1aaaar +b100000000000000000 aaaez + +#3048977304 +0aaaar +b1100011 aaacf +b0 aaaez + +#3049108024 +b1110100 aaacf + +#3050643984 +b10000000000000000000000001101111 aaacf + +#3075006924 +1aaaar +b100000000000000000 aaaez + +#3092360004 +0aaaar +b0 aaaez + +#3118389624 +1aaaar +b100000000000000000 aaaez + +#3135742704 +0aaaar +b0 aaaez + +#3161772324 +1aaaar +b100000000000000000 aaaez + +#3179125404 +0aaaar +b0 aaaez + +#3196478484 +1aaaar +b100000000000000000 aaaez + +#3205155024 +0aaaar +b0 aaaez + +#3213831564 +1aaaar +b100000000000000000 aaaez + +#3222508104 +0aaaar +b1101111 aaacf +b0 aaaez + +#3222622484 +b1110010 aaacf + +#3224158444 +b10000000000000000000000001101001 aaacf + +#3248537724 +1aaaar +b100000000000000000 aaaez + +#3265890804 +0aaaar +b0 aaaez + +#3283243884 +1aaaar +b100000000000000000 aaaez + +#3309273504 +0aaaar +b0 aaaez + +#3335303124 +1aaaar +b100000000000000000 aaaez + +#3352656204 +0aaaar +b0 aaaez + +#3361332744 +1aaaar +b100000000000000000 aaaez + +#3378685824 +0aaaar +b0 aaaez + +#3387362364 +1aaaar +b100000000000000000 aaaez + +#3396038904 +0aaaar +b1101001 aaacf +b0 aaaez + +#3396185964 +b1100001 aaacf + +#3397721924 +b10000000000000000000000001101100 aaacf + +#3422068524 +1aaaar +b100000000000000000 aaaez + +#3448098144 +0aaaar +b0 aaaez + +#3474127764 +1aaaar +b100000000000000000 aaaez + +#3482804304 +0aaaar +b0 aaaez + +#3508833924 +1aaaar +b100000000000000000 aaaez + +#3526187004 +0aaaar +b0 aaaez + +#3543540084 +1aaaar +b100000000000000000 aaaez + +#3569569704 +0aaaar +b1101100 aaacf +b0 aaaez + +#3569700424 +b100000 aaacf + +#3571236384 +b10000000000000000000000001101001 aaacf + +#3595599324 +1aaaar +b100000000000000000 aaaez + +#3621628944 +0aaaar +b0 aaaez + +#3647658564 +1aaaar +b100000000000000000 aaaez + +#3656335104 +0aaaar +b0 aaaez + +#3682364724 +1aaaar +b100000000000000000 aaaez + +#3691041264 +0aaaar +b0 aaaez + +#3734423964 +1aaaar +b100000000000000000 aaaez + +#3743100504 +0aaaar +b1101001 aaacf +b0 aaaez + +#3743214884 +b1110011 aaacf + +#3744750844 +b10000000000000000000000000100000 aaacf + +#3760453584 +1aaaar +b100000000000000000 aaaez + +#3769130124 +0aaaar +b0 aaaez + +#3786483204 +1aaaar +b100000000000000000 aaaez + +#3795159744 +0aaaar +b0 aaaez + +#3821189364 +1aaaar +b100000000000000000 aaaez + +#3829865904 +0aaaar +b0 aaaez + +#3847218984 +1aaaar +b100000000000000000 aaaez + +#3881925144 +0aaaar +b0 aaaez + +#3890601684 +1aaaar +b100000000000000000 aaaez + +#3899278224 +0aaaar +b0 aaaez + +#3907954764 +1aaaar +b100000000000000000 aaaez + +#3916631304 +0aaaar +b100000 aaacf +b0 aaaez + +#3916778364 +b110011 aaacf + +#3918461384 +b10000000000000000000000000110110 aaacf + +#3960014004 +1aaaar +b100000000000000000 aaaez + +#3968690544 +0aaaar +b0 aaaez + +#3977367084 +1aaaar +b100000000000000000 aaaez + +#3986043624 +0aaaar +b0 aaaez + +#3994720164 +1aaaar +b100000000000000000 aaaez + +#4003396704 +0aaaar +b0 aaaez + +#4046779404 +1aaaar +b100000000000000000 aaaez + +#4064132484 +0aaaar +b0 aaaez + +#4072809024 +1aaaar +b100000000000000000 aaaez + +#4090162104 +0aaaar +b110110 aaacf +b0 aaaez + +#4090292824 +b110010 aaacf + +#4091975844 +b10000000000000000000000000111000 aaacf + +#4107515184 +1aaaar +b100000000000000000 aaaez + +#4116191724 +0aaaar +b0 aaaez + +#4142221344 +1aaaar +b100000000000000000 aaaez + +#4159574424 +0aaaar +b0 aaaez + +#4168250964 +1aaaar +b100000000000000000 aaaez + +#4176927504 +0aaaar +b0 aaaez + +#4194280584 +1aaaar +b100000000000000000 aaaez + +#4211633664 +0aaaar +b0 aaaez + +#4246339824 +1aaaar +b100000000000000000 aaaez + +#4263692904 +0aaaar +b111000 aaacf +b0 aaaez + +#4265490304 +b10000000000000000000000000110000 aaacf + +#4281045984 +1aaaar +b100000000000000000 aaaez + +#4298399064 +0aaaar +b0 aaaez + +#4324428684 +1aaaar +b100000000000000000 aaaez + +#4350458304 +0aaaar +b0 aaaez + +#4367811384 +1aaaar +b100000000000000000 aaaez + +#4393841004 +0aaaar +b0 aaaez + +#4402517544 +1aaaar +b100000000000000000 aaaez + +#4411194084 +0aaaar +b0 aaaez + +#4428547164 +1aaaar +b100000000000000000 aaaez + +#4437223704 +0aaaar +b110000 aaacf +b0 aaaez + +#4439086464 +b10000000000000000000000000001010 aaacf + +#4454576784 +1aaaar +b100000000000000000 aaaez + +#4471929864 +0aaaar +b0 aaaez + +#4480606404 +1aaaar +b100000000000000000 aaaez + +#4523989104 +0aaaar +b0 aaaez + +#4541342184 +1aaaar +b100000000000000000 aaaez + +#4567371804 +0aaaar +b0 aaaez + +#4584724884 +1aaaar +b100000000000000000 aaaez + +#4593401424 +0aaaar +b0 aaaez + +#4602077964 +1aaaar +b100000000000000000 aaaez + +#4610754504 +0aaaar +b1010 aaacf +b0 aaaez + +#4610836204 +b1101 aaacf + +#4613172824 +b10000000000000000000000001000101 aaacf + +#4628107584 +1aaaar +b100000000000000000 aaaez + +#4645460664 +0aaaar +b0 aaaez + +#4654137204 +1aaaar +b100000000000000000 aaaez + +#4662813744 +0aaaar +b0 aaaez + +#4680166824 +1aaaar +b100000000000000000 aaaez + +#4697519904 +0aaaar +b0 aaaez + +#4714872984 +1aaaar +b100000000000000000 aaaez + +#4732226064 +0aaaar +b0 aaaez + +#4766932224 +1aaaar +b100000000000000000 aaaez + +#4784285304 +0aaaar +b1000101 aaacf +b0 aaaez + +#4784416024 +b1101110 aaacf + +#4785951984 +b10000000000000000000000001100100 aaacf + +#4801638384 +1aaaar +b100000000000000000 aaaez + +#4818991464 +0aaaar +b0 aaaez + +#4827668004 +1aaaar +b100000000000000000 aaaez + +#4845021084 +0aaaar +b0 aaaez + +#4862374164 +1aaaar +b100000000000000000 aaaez + +#4871050704 +0aaaar +b0 aaaez + +#4897080324 +1aaaar +b100000000000000000 aaaez + +#4905756864 +0aaaar +b0 aaaez + +#4949139564 +1aaaar +b100000000000000000 aaaez + +#4957816104 +0aaaar +b1100100 aaacf +b0 aaaez + +#4957930484 +b100000 aaacf + +#4959466444 +b10000000000000000000000001101111 aaacf + +#4975169184 +1aaaar +b100000000000000000 aaaez + +#4992522264 +0aaaar +b0 aaaez + +#5001198804 +1aaaar +b100000000000000000 aaaez + +#5009875344 +0aaaar +b0 aaaez + +#5027228424 +1aaaar +b100000000000000000 aaaez + +#5044581504 +0aaaar +b0 aaaez + +#5061934584 +1aaaar +b100000000000000000 aaaez + +#5087964204 +0aaaar +b0 aaaez + +#5105317284 +1aaaar +b100000000000000000 aaaez + +#5131346904 +0aaaar +b1101111 aaacf +b0 aaaez + +#5131493964 +b1100110 aaacf + +#5133029924 +b10000000000000000000000000100000 aaacf + +#5157376524 +1aaaar +b100000000000000000 aaaez + +#5166053064 +0aaaar +b0 aaaez + +#5209435764 +1aaaar +b100000000000000000 aaaez + +#5218112304 +0aaaar +b0 aaaez + +#5244141924 +1aaaar +b100000000000000000 aaaez + +#5261495004 +0aaaar +b0 aaaez + +#5278848084 +1aaaar +b100000000000000000 aaaez + +#5304877704 +0aaaar +b100000 aaacf +b0 aaaez + +#5305008424 +b1100101 aaacf + +#5306544384 +b10000000000000000000000001111000 aaacf + +#5330907324 +1aaaar +b100000000000000000 aaaez + +#5348260404 +0aaaar +b0 aaaez + +#5356936944 +1aaaar +b100000000000000000 aaaez + +#5374290024 +0aaaar +b0 aaaez + +#5382966564 +1aaaar +b100000000000000000 aaaez + +#5391643104 +0aaaar +b0 aaaez + +#5417672724 +1aaaar +b100000000000000000 aaaez + +#5435025804 +0aaaar +b0 aaaez + +#5452378884 +1aaaar +b100000000000000000 aaaez + +#5461055424 +0aaaar +b0 aaaez + +#5469731964 +1aaaar +b100000000000000000 aaaez + +#5478408504 +0aaaar +b1111000 aaacf +b0 aaaez + +#5478522884 +b1100101 aaacf + +#5480058844 +b10000000000000000000000001100011 aaacf + +#5504438124 +1aaaar +b100000000000000000 aaaez + +#5530467744 +0aaaar +b0 aaaez + +#5556497364 +1aaaar +b100000000000000000 aaaez + +#5565173904 +0aaaar +b0 aaaez + +#5591203524 +1aaaar +b100000000000000000 aaaez + +#5617233144 +0aaaar +b0 aaaez + +#5643262764 +1aaaar +b100000000000000000 aaaez + +#5651939304 +0aaaar +b1100011 aaacf +b0 aaaez + +#5652086364 +b1110101 aaacf + +#5653622324 +b10000000000000000000000001110100 aaacf + +#5677968924 +1aaaar +b100000000000000000 aaaez + +#5695322004 +0aaaar +b0 aaaez + +#5730028164 +1aaaar +b100000000000000000 aaaez + +#5738704704 +0aaaar +b0 aaaez + +#5764734324 +1aaaar +b100000000000000000 aaaez + +#5782087404 +0aaaar +b0 aaaez + +#5816793564 +1aaaar +b100000000000000000 aaaez + +#5825470104 +0aaaar +b1110100 aaacf +b0 aaaez + +#5825600824 +b1101001 aaacf + +#5827136784 +b10000000000000000000000001101111 aaacf + +#5868852804 +1aaaar +b100000000000000000 aaaez + +#5877529344 +0aaaar +b0 aaaez + +#5886205884 +1aaaar +b100000000000000000 aaaez + +#5894882424 +0aaaar +b0 aaaez + +#5903558964 +1aaaar +b100000000000000000 aaaez + +#5912235504 +0aaaar +b0 aaaez + +#5955618204 +1aaaar +b100000000000000000 aaaez + +#5972971284 +0aaaar +b0 aaaez + +#5981647824 +1aaaar +b100000000000000000 aaaez + +#5999000904 +0aaaar +b1101111 aaacf +b0 aaaez + +#5999115284 +b1101110 aaacf + +#6002906164 +b10000000000000000000000000001010 aaacf + +#6016353984 +1aaaar +b100000000000000000 aaaez + +#6025030524 +0aaaar +b0 aaaez + +#6051060144 +1aaaar +b100000000000000000 aaaez + +#6059736684 +0aaaar +b0 aaaez + +#6068413224 +1aaaar +b100000000000000000 aaaez + +#6085766304 +0aaaar +b0 aaaez + +#6103119384 +1aaaar +b100000000000000000 aaaez + +#6120472464 +0aaaar +b0 aaaez + +#6129149004 +1aaaar +b100000000000000000 aaaez + +#6155178624 +0aaaar +b0 aaaez + +#6163855164 +1aaaar +b100000000000000000 aaaez + +#6172531704 +0aaaar +b1010 aaacf +b0 aaaez + +#6172597064 +b1101 aaacf + +#6172874844 +b10000000000000000000000001010000 aaacf + +#6189884784 +1aaaar +b100000000000000000 aaaez + +#6207237864 +0aaaar +b0 aaaez + +#6224590944 +1aaaar +b100000000000000000 aaaez + +#6233267484 +0aaaar +b0 aaaez + +#6250620564 +1aaaar +b100000000000000000 aaaez + +#6259297104 +0aaaar +b0 aaaez + +#6285326724 +1aaaar +b100000000000000000 aaaez + +#6294003264 +0aaaar +b0 aaaez + +#6337385964 +1aaaar +b100000000000000000 aaaez + +#6346062504 +0aaaar +b1010000 aaacf +b0 aaaez + +#6346193224 +b1110010 aaacf + +#6346569044 +b10000000000000000000000001101111 aaacf + +#6363415584 +1aaaar +b100000000000000000 aaaez + +#6380768664 +0aaaar +b0 aaaez + +#6389445204 +1aaaar +b100000000000000000 aaaez + +#6432827904 +0aaaar +b0 aaaez + +#6450180984 +1aaaar +b100000000000000000 aaaez + +#6467534064 +0aaaar +b0 aaaez + +#6484887144 +1aaaar +b100000000000000000 aaaez + +#6502240224 +0aaaar +b0 aaaez + +#6510916764 +1aaaar +b100000000000000000 aaaez + +#6519593304 +0aaaar +b1101111 aaacf +b0 aaaez + +#6519740364 +b1100111 aaacf + +#6520116184 +b10000000000000000000000001100001 aaacf + +#6545622924 +1aaaar +b100000000000000000 aaaez + +#6554299464 +0aaaar +b0 aaaez + +#6597682164 +1aaaar +b100000000000000000 aaaez + +#6606358704 +0aaaar +b0 aaaez + +#6623711784 +1aaaar +b100000000000000000 aaaez + +#6641064864 +0aaaar +b0 aaaez + +#6658417944 +1aaaar +b100000000000000000 aaaez + +#6667094484 +0aaaar +b0 aaaez + +#6675771024 +1aaaar +b100000000000000000 aaaez + +#6693124104 +0aaaar +b1100001 aaacf +b0 aaaez + +#6693238484 +b1101101 aaacf + +#6693614304 +b10000000000000000000000000100000 aaacf + +#6710477184 +1aaaar +b100000000000000000 aaaez + +#6745183344 +0aaaar +b0 aaaez + +#6771212964 +1aaaar +b100000000000000000 aaaez + +#6779889504 +0aaaar +b0 aaaez + +#6797242584 +1aaaar +b100000000000000000 aaaez + +#6814595664 +0aaaar +b0 aaaez + +#6831948744 +1aaaar +b100000000000000000 aaaez + +#6840625284 +0aaaar +b0 aaaez + +#6849301824 +1aaaar +b100000000000000000 aaaez + +#6866654904 +0aaaar +b100000 aaacf +b0 aaaez + +#6866785624 +b1101000 aaacf + +#6867161444 +b10000000000000000000000001100001 aaacf + +#6884007984 +1aaaar +b100000000000000000 aaaez + +#6901361064 +0aaaar +b0 aaaez + +#6927390684 +1aaaar +b100000000000000000 aaaez + +#6953420304 +0aaaar +b0 aaaez + +#6970773384 +1aaaar +b100000000000000000 aaaez + +#6996803004 +0aaaar +b0 aaaez + +#7005479544 +1aaaar +b100000000000000000 aaaez + +#7014156084 +0aaaar +b0 aaaez + +#7022832624 +1aaaar +b100000000000000000 aaaez + +#7040185704 +0aaaar +b1100001 aaacf +b0 aaaez + +#7040332764 +b1110011 aaacf + +#7040708584 +b10000000000000000000000000100000 aaacf + +#7057538784 +1aaaar +b100000000000000000 aaaez + +#7083568404 +0aaaar +b0 aaaez + +#7092244944 +1aaaar +b100000000000000000 aaaez + +#7100921484 +0aaaar +b0 aaaez + +#7118274564 +1aaaar +b100000000000000000 aaaez + +#7126951104 +0aaaar +b0 aaaez + +#7144304184 +1aaaar +b100000000000000000 aaaez + +#7161657264 +0aaaar +b0 aaaez + +#7170333804 +1aaaar +b100000000000000000 aaaez + +#7179010344 +0aaaar +b0 aaaez + +#7196363424 +1aaaar +b100000000000000000 aaaez + +#7213716504 +0aaaar +b100000 aaacf +b0 aaaez + +#7213830884 +b1100101 aaacf + +#7214206704 +b10000000000000000000000001111000 aaacf + +#7231069584 +1aaaar +b100000000000000000 aaaez + +#7248422664 +0aaaar +b0 aaaez + +#7257099204 +1aaaar +b100000000000000000 aaaez + +#7300481904 +0aaaar +b0 aaaez + +#7317834984 +1aaaar +b100000000000000000 aaaez + +#7335188064 +0aaaar +b0 aaaez + +#7343864604 +1aaaar +b100000000000000000 aaaez + +#7369894224 +0aaaar +b0 aaaez + +#7378570764 +1aaaar +b100000000000000000 aaaez + +#7387247304 +0aaaar +b1111000 aaacf +b0 aaaez + +#7387378024 +b1101001 aaacf + +#7387753844 +b10000000000000000000000001110100 aaacf + +#7430630004 +1aaaar +b100000000000000000 aaaez + +#7439306544 +0aaaar +b0 aaaez + +#7447983084 +1aaaar +b100000000000000000 aaaez + +#7456659624 +0aaaar +b0 aaaez + +#7465336164 +1aaaar +b100000000000000000 aaaez + +#7474012704 +0aaaar +b0 aaaez + +#7517395404 +1aaaar +b100000000000000000 aaaez + +#7534748484 +0aaaar +b0 aaaez + +#7543425024 +1aaaar +b100000000000000000 aaaez + +#7560778104 +0aaaar +b1110100 aaacf +b0 aaaez + +#7560925164 +b1100101 aaacf + +#7561300984 +b10000000000000000000000001100100 aaacf + +#7578131184 +1aaaar +b100000000000000000 aaaez + +#7586807724 +0aaaar +b0 aaaez + +#7595484264 +1aaaar +b100000000000000000 aaaez + +#7604160804 +0aaaar +b0 aaaez + +#7638866964 +1aaaar +b100000000000000000 aaaez + +#7647543504 +0aaaar +b0 aaaez + +#7664896584 +1aaaar +b100000000000000000 aaaez + +#7690926204 +0aaaar +b0 aaaez + +#7708279284 +1aaaar +b100000000000000000 aaaez + +#7716955824 +0aaaar +b0 aaaez + +#7725632364 +1aaaar +b100000000000000000 aaaez + +#7734308904 +0aaaar +b1100100 aaacf +b0 aaaez + +#7734423284 +b100000 aaacf + +#7734799104 +b10000000000000000000000001110111 aaacf + +#7751661984 +1aaaar +b100000000000000000 aaaez + +#7769015064 +0aaaar +b0 aaaez + +#7777691604 +1aaaar +b100000000000000000 aaaez + +#7821074304 +0aaaar +b0 aaaez + +#7838427384 +1aaaar +b100000000000000000 aaaez + +#7855780464 +0aaaar +b0 aaaez + +#7873133544 +1aaaar +b100000000000000000 aaaez + +#7907839704 +0aaaar +b1110111 aaacf +b0 aaaez + +#7907970424 +b1101001 aaacf + +#7908346244 +b10000000000000000000000001110100 aaacf + +#7925192784 +1aaaar +b100000000000000000 aaaez + +#7942545864 +0aaaar +b0 aaaez + +#7977252024 +1aaaar +b100000000000000000 aaaez + +#7994605104 +0aaaar +b0 aaaez + +#8011958184 +1aaaar +b100000000000000000 aaaez + +#8029311264 +0aaaar +b0 aaaez + +#8037987804 +1aaaar +b100000000000000000 aaaez + +#8055340884 +0aaaar +b0 aaaez + +#8064017424 +1aaaar +b100000000000000000 aaaez + +#8081370504 +0aaaar +b1110100 aaacf +b0 aaaez + +#8081517564 +b1101000 aaacf + +#8081893384 +b10000000000000000000000000100000 aaacf + +#8107400124 +1aaaar +b100000000000000000 aaaez + +#8116076664 +0aaaar +b0 aaaez + +#8159459364 +1aaaar +b100000000000000000 aaaez + +#8168135904 +0aaaar +b0 aaaez + +#8185488984 +1aaaar +b100000000000000000 aaaez + +#8202842064 +0aaaar +b0 aaaez + +#8211518604 +1aaaar +b100000000000000000 aaaez + +#8220195144 +0aaaar +b0 aaaez + +#8246224764 +1aaaar +b100000000000000000 aaaez + +#8254901304 +0aaaar +b100000 aaacf +b0 aaaez + +#8255015684 +b1100011 aaacf + +#8255391504 +b10000000000000000000000001101111 aaacf + +#8272254384 +1aaaar +b100000000000000000 aaaez + +#8289607464 +0aaaar +b0 aaaez + +#8324313624 +1aaaar +b100000000000000000 aaaez + +#8341666704 +0aaaar +b0 aaaez + +#8359019784 +1aaaar +b100000000000000000 aaaez + +#8385049404 +0aaaar +b0 aaaez + +#8402402484 +1aaaar +b100000000000000000 aaaez + +#8428432104 +0aaaar +b1101111 aaacf +b0 aaaez + +#8428562824 +b1100100 aaacf + +#8428938644 +b10000000000000000000000001100101 aaacf + +#8454461724 +1aaaar +b100000000000000000 aaaez + +#8463138264 +0aaaar +b0 aaaez + +#8506520964 +1aaaar +b100000000000000000 aaaez + +#8515197504 +0aaaar +b0 aaaez + +#8532550584 +1aaaar +b100000000000000000 aaaez + +#8549903664 +0aaaar +b0 aaaez + +#8567256744 +1aaaar +b100000000000000000 aaaez + +#8575933284 +0aaaar +b0 aaaez + +#8584609824 +1aaaar +b100000000000000000 aaaez + +#8601962904 +0aaaar +b1100101 aaacf +b0 aaaez + +#8602109964 +b111010 aaacf + +#8603400824 +b10000000000000000000000000110000 aaacf + +#8619315984 +1aaaar +b100000000000000000 aaaez + +#8654022144 +0aaaar +b0 aaaez + +#8680051764 +1aaaar +b100000000000000000 aaaez + +#8688728304 +0aaaar +b0 aaaez + +#8706081384 +1aaaar +b100000000000000000 aaaez + +#8723434464 +0aaaar +b0 aaaez + +#8732111004 +1aaaar +b100000000000000000 aaaez + +#8740787544 +0aaaar +b0 aaaez + +#8758140624 +1aaaar +b100000000000000000 aaaez + +#8775493704 +0aaaar +b110000 aaacf +b0 aaaez + +#8775640764 +b1111000 aaacf + +#8777209404 +b10000000000000000000000000110000 aaacf + +#8792846784 +1aaaar +b100000000000000000 aaaez + +#8818876404 +0aaaar +b0 aaaez + +#8827552944 +1aaaar +b100000000000000000 aaaez + +#8836229484 +0aaaar +b0 aaaez + +#8853582564 +1aaaar +b100000000000000000 aaaez + +#8862259104 +0aaaar +b0 aaaez + +#8879612184 +1aaaar +b100000000000000000 aaaez + +#8896965264 +0aaaar +b0 aaaez + +#8914318344 +1aaaar +b100000000000000000 aaaez + +#8922994884 +0aaaar +b0 aaaez + +#8931671424 +1aaaar +b100000000000000000 aaaez + +#8949024504 +0aaaar +b110000 aaacf +b0 aaaez + +#8950740204 +b10000000000000000000000000110000 aaacf + +#8966377584 +1aaaar +b100000000000000000 aaaez + +#8983730664 +0aaaar +b0 aaaez + +#9001083744 +1aaaar +b100000000000000000 aaaez + +#9009760284 +0aaaar +b0 aaaez + +#9027113364 +1aaaar +b100000000000000000 aaaez + +#9035789904 +0aaaar +b0 aaaez + +#9061819524 +1aaaar +b100000000000000000 aaaez + +#9070496064 +0aaaar +b0 aaaez + +#9113878764 +1aaaar +b100000000000000000 aaaez + +#9122555304 +0aaaar +b110000 aaacf +b0 aaaez + +#9124271004 +b10000000000000000000000000110000 aaacf + +#9139908384 +1aaaar +b100000000000000000 aaaez + +#9165938004 +0aaaar +b0 aaaez + +#9174614544 +1aaaar +b100000000000000000 aaaez + +#9209320704 +0aaaar +b0 aaaez + +#9226673784 +1aaaar +b100000000000000000 aaaez + +#9244026864 +0aaaar +b0 aaaez + +#9252703404 +1aaaar +b100000000000000000 aaaez + +#9261379944 +0aaaar +b0 aaaez + +#9278733024 +1aaaar +b100000000000000000 aaaez + +#9296086104 +0aaaar +b110000 aaacf +b0 aaaez + +#9297801804 +b10000000000000000000000000110000 aaacf + +#9313439184 +1aaaar +b100000000000000000 aaaez + +#9339468804 +0aaaar +b0 aaaez + +#9348145344 +1aaaar +b100000000000000000 aaaez + +#9356821884 +0aaaar +b0 aaaez + +#9374174964 +1aaaar +b100000000000000000 aaaez + +#9382851504 +0aaaar +b0 aaaez + +#9400204584 +1aaaar +b100000000000000000 aaaez + +#9417557664 +0aaaar +b0 aaaez + +#9426234204 +1aaaar +b100000000000000000 aaaez + +#9434910744 +0aaaar +b0 aaaez + +#9460940364 +1aaaar +b100000000000000000 aaaez + +#9469616904 +0aaaar +b110000 aaacf +b0 aaaez + +#9471054824 +b10000000000000000000000000001010 aaacf + +#9495646524 +1aaaar +b100000000000000000 aaaez + +#9504323064 +0aaaar +b0 aaaez + +#9547705764 +1aaaar +b100000000000000000 aaaez + +#9556382304 +0aaaar +b0 aaaez + +#9573735384 +1aaaar +b100000000000000000 aaaez + +#9591088464 +0aaaar +b0 aaaez + +#9617118084 +1aaaar +b100000000000000000 aaaez + +#9643147704 +0aaaar +b1010 aaacf +b0 aaaez + +#9643245744 +b1101 aaacf + +#9643474504 diff --git a/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java b/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java index 30b2219..442fcef 100644 --- a/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java +++ b/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java @@ -86,5 +86,15 @@ public class DatabaseServicesTest { assertEquals(1, waveformDb.getChildNodes().size()); } + @Test + public void testHierarchicalVCD() throws Exception { + File f = new File("inputs/simple_system.vcd").getAbsoluteFile(); + assertTrue(f.exists()); + waveformDb.load(f); + assertNotNull(waveformDb); + assertEquals(718, waveformDb.getAllWaves().size()); + assertEquals(33, waveformDb.getChildNodes().size()); + } + } diff --git a/com.minres.scviewer.target/neon.target b/com.minres.scviewer.target/neon.target index 0f5dda0..3fa87c6 100644 --- a/com.minres.scviewer.target/neon.target +++ b/com.minres.scviewer.target/neon.target @@ -1,5 +1,4 @@ - - + @@ -9,7 +8,7 @@ - + @@ -21,4 +20,4 @@ -Dosgi.requiredJavaVersion=1.6 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts - + \ No newline at end of file diff --git a/com.minres.scviewer.target/photon.target b/com.minres.scviewer.target/photon.target new file mode 100644 index 0000000..7718a7f --- /dev/null +++ b/com.minres.scviewer.target/photon.target @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + +x86_64 +de_DE + + + +-Dosgi.requiredJavaVersion=1.6 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts + + From 7dd0a24df63878bb5b1a6b0e7a3e562309a38313 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 16 Jul 2018 13:17:43 +0200 Subject: [PATCH 07/16] Updated to Photon platform --- .../org.eclipse.jdt.groovy.core.prefs | 2 +- com.minres.scviewer.e4.application/plugin.xml | 6 +--- .../SCViewer (restart).launch | 34 ------------------- com.minres.scviewer.e4.product/pom.xml | 2 +- .../scviewer.product | 17 ++++++++-- com.minres.scviewer.parent/pom.xml | 4 +-- com.minres.scviewer.target/neon.target | 23 ------------- com.minres.scviewer.target/photon.target | 4 +-- com.minres.scviewer.target/pom.xml | 2 +- .../org.eclipse.jdt.groovy.core.prefs | 2 +- com.minres.scviewer.ui/OSGI-INF/component.xml | 2 +- 11 files changed, 24 insertions(+), 74 deletions(-) delete mode 100644 com.minres.scviewer.e4.product/SCViewer (restart).launch delete mode 100644 com.minres.scviewer.target/neon.target diff --git a/com.minres.scviewer.database.text/.settings/org.eclipse.jdt.groovy.core.prefs b/com.minres.scviewer.database.text/.settings/org.eclipse.jdt.groovy.core.prefs index a7f72ec..021403d 100644 --- a/com.minres.scviewer.database.text/.settings/org.eclipse.jdt.groovy.core.prefs +++ b/com.minres.scviewer.database.text/.settings/org.eclipse.jdt.groovy.core.prefs @@ -1,2 +1,2 @@ eclipse.preferences.version=1 -groovy.compiler.level=23 +groovy.compiler.level=26 diff --git a/com.minres.scviewer.e4.application/plugin.xml b/com.minres.scviewer.e4.application/plugin.xml index f2a6d0d..236f625 100644 --- a/com.minres.scviewer.e4.application/plugin.xml +++ b/com.minres.scviewer.e4.application/plugin.xml @@ -7,7 +7,7 @@ + name="SCViewer"> @@ -16,10 +16,6 @@ name="appName" value="SCViewer"> - - diff --git a/com.minres.scviewer.e4.product/SCViewer (restart).launch b/com.minres.scviewer.e4.product/SCViewer (restart).launch deleted file mode 100644 index 623bed5..0000000 --- a/com.minres.scviewer.e4.product/SCViewer (restart).launch +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/com.minres.scviewer.e4.product/pom.xml b/com.minres.scviewer.e4.product/pom.xml index 9dd82b9..92a039e 100644 --- a/com.minres.scviewer.e4.product/pom.xml +++ b/com.minres.scviewer.e4.product/pom.xml @@ -10,7 +10,7 @@ ../com.minres.scviewer.parent com.minres.scviewer.e4.product - 1.2.2-SNAPSHOT + 1.3.0-SNAPSHOT eclipse-repository com.minres.scviewer diff --git a/com.minres.scviewer.e4.product/scviewer.product b/com.minres.scviewer.e4.product/scviewer.product index 630f22a..c5b250e 100644 --- a/com.minres.scviewer.e4.product/scviewer.product +++ b/com.minres.scviewer.e4.product/scviewer.product @@ -1,7 +1,7 @@ - + @@ -9,6 +9,8 @@ -clearPersistedState -data @none + -Xmx2G + -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts @@ -39,6 +41,7 @@ + @@ -50,12 +53,16 @@ - + + - + + + + @@ -73,6 +80,7 @@ + @@ -84,6 +92,7 @@ + @@ -105,6 +114,8 @@ + + diff --git a/com.minres.scviewer.parent/pom.xml b/com.minres.scviewer.parent/pom.xml index 4c2af82..e69be6d 100644 --- a/com.minres.scviewer.parent/pom.xml +++ b/com.minres.scviewer.parent/pom.xml @@ -34,12 +34,12 @@ mars p2 - http://download.eclipse.org/releases/neon + http://download.eclipse.org/releases/photon GRECLIPSE p2 - http://dist.springsource.org/snapshot/GRECLIPSE/e4.6 + http://dist.springsource.org/snapshot/GRECLIPSE/e4.8 diff --git a/com.minres.scviewer.target/neon.target b/com.minres.scviewer.target/neon.target deleted file mode 100644 index 3fa87c6..0000000 --- a/com.minres.scviewer.target/neon.target +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - -x86_64 -de_DE - - - --Dosgi.requiredJavaVersion=1.6 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts - - \ No newline at end of file diff --git a/com.minres.scviewer.target/photon.target b/com.minres.scviewer.target/photon.target index 7718a7f..91b11cc 100644 --- a/com.minres.scviewer.target/photon.target +++ b/com.minres.scviewer.target/photon.target @@ -19,6 +19,6 @@ --Dosgi.requiredJavaVersion=1.6 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts +-Dosgi.requiredJavaVersion=1.6 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xdock:icon=../Resources/Eclipse.icns -Xms40m -Xmx2G - + \ No newline at end of file diff --git a/com.minres.scviewer.target/pom.xml b/com.minres.scviewer.target/pom.xml index 45ffa6d..2e5538b 100644 --- a/com.minres.scviewer.target/pom.xml +++ b/com.minres.scviewer.target/pom.xml @@ -4,7 +4,7 @@ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - neon + photon eclipse-target-definition SCViewer Target Definition diff --git a/com.minres.scviewer.ui/.settings/org.eclipse.jdt.groovy.core.prefs b/com.minres.scviewer.ui/.settings/org.eclipse.jdt.groovy.core.prefs index a7f72ec..021403d 100644 --- a/com.minres.scviewer.ui/.settings/org.eclipse.jdt.groovy.core.prefs +++ b/com.minres.scviewer.ui/.settings/org.eclipse.jdt.groovy.core.prefs @@ -1,2 +1,2 @@ eclipse.preferences.version=1 -groovy.compiler.level=23 +groovy.compiler.level=26 diff --git a/com.minres.scviewer.ui/OSGI-INF/component.xml b/com.minres.scviewer.ui/OSGI-INF/component.xml index 466e946..2a3321d 100644 --- a/com.minres.scviewer.ui/OSGI-INF/component.xml +++ b/com.minres.scviewer.ui/OSGI-INF/component.xml @@ -1,5 +1,5 @@ - + From 2f11d8ed7b704b9174e99d66d7139d200208b983 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 16 Jul 2018 13:17:58 +0200 Subject: [PATCH 08/16] Fixed VCD parsing error --- .../scviewer/database/test/DatabaseServicesTest.java | 4 ++-- .../com/minres/scviewer/database/vcd/VCDDbLoader.java | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java b/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java index 442fcef..ce9aed8 100644 --- a/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java +++ b/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java @@ -92,8 +92,8 @@ public class DatabaseServicesTest { assertTrue(f.exists()); waveformDb.load(f); assertNotNull(waveformDb); - assertEquals(718, waveformDb.getAllWaves().size()); - assertEquals(33, waveformDb.getChildNodes().size()); + assertEquals(778, waveformDb.getAllWaves().size()); + assertEquals(1, waveformDb.getChildNodes().size()); } diff --git a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java index eb25d41..e418170 100644 --- a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java +++ b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java @@ -123,9 +123,9 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder { */ @Override public void enterModule(String tokenString) { - if(moduleStack.isEmpty()) - moduleStack.push(tokenString); - else + if(moduleStack.isEmpty()) { + if("SystemC".compareTo(tokenString)!=0) moduleStack.push(tokenString); + } else moduleStack.push(moduleStack.peek()+"."+tokenString); } @@ -143,7 +143,8 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder { */ @SuppressWarnings("unchecked") @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(); VCDSignal signal; if(width==1){ From 8a89b21d34758dfd8cbb840c2c5581bdd487cda9 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 11 Oct 2018 11:20:36 +0200 Subject: [PATCH 09/16] Added database support to read real valued signals --- .../inputs/simple_system.vcd | 14 ++++ .../database/test/DatabaseServicesTest.java | 2 +- .../database/vcd/IVCDDatabaseBuilder.java | 32 ++++++-- .../scviewer/database/vcd/VCDDbLoader.java | 76 +++++++++++++----- .../scviewer/database/vcd/VCDFileParser.java | 78 +++++++++++-------- ...ngeSingle.java => VCDSignalChangeBit.java} | 6 +- ...lti.java => VCDSignalChangeBitVector.java} | 8 +- .../database/vcd/VCDSignalChangeReal.java | 37 +++++++++ ...hangeSingle.java => ISignalChangeBit.java} | 2 +- ...Multi.java => ISignalChangeBitVector.java} | 3 +- .../scviewer/database/ISignalChangeReal.java | 17 ++++ 11 files changed, 205 insertions(+), 70 deletions(-) rename com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/{VCDSignalChangeSingle.java => VCDSignalChangeBit.java} (80%) rename com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/{VCDSignalChangeMulti.java => VCDSignalChangeBitVector.java} (77%) create mode 100644 com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeReal.java rename com.minres.scviewer.database/src/com/minres/scviewer/database/{ISignalChangeSingle.java => ISignalChangeBit.java} (91%) rename com.minres.scviewer.database/src/com/minres/scviewer/database/{ISignalChangeMulti.java => ISignalChangeBitVector.java} (90%) create mode 100644 com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeReal.java diff --git a/com.minres.scviewer.database.test/inputs/simple_system.vcd b/com.minres.scviewer.database.test/inputs/simple_system.vcd index 8977649..0345ff2 100755 --- a/com.minres.scviewer.database.test/inputs/simple_system.vcd +++ b/com.minres.scviewer.database.test/inputs/simple_system.vcd @@ -45,6 +45,7 @@ $var wire 1 aaabd s_gpio_29 $end $var wire 1 aaabe s_gpio_30 $end $var wire 1 aaabf s_gpio_31 $end $var wire 1 aaabg s_rst_n $end +$var real 1 bbbbb a_real $end $scope module i_platform $end $var wire 1 aaabh erst_n $end $var wire 64 aabdc s_tlclk [63:0] $end @@ -1621,6 +1622,7 @@ b1110100011010100101001010 aabdd 0aabdv 0aabdw 0aabdx +r0.0 bbbbb $end #10000 @@ -1641,6 +1643,7 @@ $end #1287121272 b1000000000100000000000000000100 aabcr +r1.0 bbbbb #1288121272 b111111110100111110 aaabi @@ -1656,33 +1659,43 @@ b11000000000100000000000000000100 aabcr b111111110100111110 aabcw b101010 aabdb b111111110100111110 aabdc +r2.0 bbbbb #1303801016 b1000 aaacx +r3.0 bbbbb #1311382718 b100000000 aabcu +r2.0 bbbbb #1312689908 b1000000010111110001 aabct +r1.0 bbbbb #1315304288 b10000000000000000000010111110001 aabct +r0.0 bbbbb #1317395792 b101011 aabdb +r-1.0 bbbbb #1345892534 b101100 aabdb +r-2.0 bbbbb #1375173590 b101101 aabdb +r-3.0 bbbbb #1404454646 b101110 aabdb +r-2.0 bbbbb #1437918710 b101111 aabdb +r-1.0 bbbbb #1443670346 b11111111010100 aaabi @@ -1697,6 +1710,7 @@ b11111111010100 aabac b10000000000000010000010111110001 aabct b11111111010100 aabcw b11111111010100 aabdc +r0.0 bbbbb #1444438324 1aaaar diff --git a/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java b/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java index ce9aed8..8f5fb1b 100644 --- a/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java +++ b/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java @@ -92,7 +92,7 @@ public class DatabaseServicesTest { assertTrue(f.exists()); waveformDb.load(f); assertNotNull(waveformDb); - assertEquals(778, waveformDb.getAllWaves().size()); + assertEquals(779, waveformDb.getAllWaves().size()); assertEquals(1, waveformDb.getChildNodes().size()); } diff --git a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/IVCDDatabaseBuilder.java b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/IVCDDatabaseBuilder.java index e74f195..812b2ba 100644 --- a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/IVCDDatabaseBuilder.java +++ b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/IVCDDatabaseBuilder.java @@ -34,26 +34,44 @@ public interface IVCDDatabaseBuilder { * * @param netName the net name * @param i the index of the net, -1 if a new one, otherwise the id if the referenced - * @param width the width - * @return the integer + * @param width the width, -1 equals real, 0... is a bit vector + * @return the net id */ public Integer newNet(String netName, int i, int width) ; /** * Gets the net width. * - * @param intValue the int value - * @return the net width + * @param intValue the net id + * @return the net width, -1 means a real-valued net */ - public int getNetWidth(int intValue); + public int getNetWidth(int netId); /** * Append transition. * - * @param signalId the int value + * @param netId the int value * @param currentTime the current time in ps * @param decodedValues the decoded values */ - public void appendTransition(int signalId, long currentTime, BitVector decodedValues); + public void appendTransition(int netId, long currentTime, char decodedValue); + + /** + * Append transition. + * + * @param netId the int value + * @param currentTime the current time in ps + * @param decodedValues the decoded values + */ + public void appendTransition(int netId, long currentTime, BitVector decodedValue); + + /** + * Append transition. + * + * @param netId the int value + * @param currentTime the current time in ps + * @param decodedValue the decoded values + */ + public void appendTransition(int netId, long currentTime, double decodedValue); } diff --git a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java index e418170..0616e4c 100644 --- a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java +++ b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDDbLoader.java @@ -15,6 +15,7 @@ import java.io.FileInputStream; import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.NavigableMap; import java.util.Stack; import java.util.TreeMap; import java.util.Vector; @@ -22,8 +23,9 @@ import java.util.Vector; import com.minres.scviewer.database.BitVector; import com.minres.scviewer.database.ISignal; import com.minres.scviewer.database.ISignalChange; -import com.minres.scviewer.database.ISignalChangeMulti; -import com.minres.scviewer.database.ISignalChangeSingle; +import com.minres.scviewer.database.ISignalChangeBitVector; +import com.minres.scviewer.database.ISignalChangeReal; +import com.minres.scviewer.database.ISignalChangeBit; import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.IWaveformDb; import com.minres.scviewer.database.IWaveformDbLoader; @@ -83,20 +85,25 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder { moduleStack=null; if(!res) throw new InputFormatException(); // calculate max time of database - for(IWaveform waveform:signals) - maxTime= Math.max(maxTime, ((ISignal)waveform).getEvents().lastKey()); + for(IWaveform waveform:signals) { + NavigableMap events =((ISignal)waveform).getEvents(); + if(events.size()>0) + maxTime= Math.max(maxTime, events.lastKey()); + } // extend signals to hav a last value set at max time for(IWaveform waveform:signals){ TreeMap events = ((VCDSignal)waveform).values; - if(events.lastKey()0 && events.lastKey())waveform).values.put(maxTime, - new VCDSignalChangeSingle(maxTime, ((ISignalChangeSingle)x).getValue())); - else - if(x instanceof ISignalChangeMulti) - ((VCDSignal)waveform).values.put(maxTime, - new VCDSignalChangeMulti(maxTime, ((ISignalChangeMulti)x).getValue())); + if(x instanceof ISignalChangeBit) + ((VCDSignal)waveform).values.put(maxTime, + new VCDSignalChangeBit(maxTime, ((ISignalChangeBit)x).getValue())); + else if(x instanceof ISignalChangeBitVector) + ((VCDSignal)waveform).values.put(maxTime, + new VCDSignalChangeBitVector(maxTime, ((ISignalChangeBitVector)x).getValue())); + else if(x instanceof ISignalChangeReal) + ((VCDSignal)waveform).values.put(maxTime, + new VCDSignalChangeReal(maxTime, ((ISignalChangeReal)x).getValue())); } } return true; @@ -147,12 +154,15 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder { String netName = moduleStack.empty()? name: moduleStack.lastElement()+"."+name; int id = signals.size(); VCDSignal signal; - if(width==1){ - signal = i<0 ? new VCDSignal(db, id, netName) : - new VCDSignal((VCDSignal)signals.get(i), id, netName); + if(width<0) { + signal = i<0 ? new VCDSignal(db, id, netName, width) : + new VCDSignal((VCDSignal)signals.get(i), id, netName); + } else if(width==1){ + signal = i<0 ? new VCDSignal(db, id, netName) : + new VCDSignal((VCDSignal)signals.get(i), id, netName); } else { - signal = i<0 ? new VCDSignal(db, id, netName, width) : - new VCDSignal((VCDSignal)signals.get(i), id, netName); + signal = i<0 ? new VCDSignal(db, id, netName, width) : + new VCDSignal((VCDSignal)signals.get(i), id, netName); }; signals.add(signal); return id; @@ -172,13 +182,37 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder { */ @SuppressWarnings("unchecked") @Override - public void appendTransition(int signalId, long currentTime, BitVector decodedValues) { + public void appendTransition(int signalId, long currentTime, char decodedValues) { VCDSignal signal = (VCDSignal) signals.get(signalId); Long time = currentTime* TIME_RES; if(signal.getWidth()==1){ - ((VCDSignal)signal).values.put(time, new VCDSignalChangeSingle(time, decodedValues.getValue()[0])); - } else { - ((VCDSignal)signal).values.put(time, new VCDSignalChangeMulti(time, decodedValues)); + ((VCDSignal)signal).values.put(time, new VCDSignalChangeBit(time, decodedValues)); + } + } + + /* (non-Javadoc) + * @see com.minres.scviewer.database.vcd.ITraceBuilder#appendTransition(int, long, com.minres.scviewer.database.vcd.BitVector) + */ + @SuppressWarnings("unchecked") + @Override + public void appendTransition(int signalId, long currentTime, BitVector decodedValues) { + VCDSignal signal = (VCDSignal) signals.get(signalId); + Long time = currentTime* TIME_RES; + if(signal.getWidth()>1){ + ((VCDSignal)signal).values.put(time, new VCDSignalChangeBitVector(time, decodedValues)); + } + } + + /* (non-Javadoc) + * @see com.minres.scviewer.database.vcd.ITraceBuilder#appendTransition(int, long, com.minres.scviewer.database.vcd.BitVector) + */ + @SuppressWarnings("unchecked") + @Override + public void appendTransition(int signalId, long currentTime, double decodedValue) { + VCDSignal signal = (VCDSignal) signals.get(signalId); + Long time = currentTime* TIME_RES; + if(signal.getWidth()<0){ + ((VCDSignal)signal).values.put(time, new VCDSignalChangeReal(time, decodedValue)); } } diff --git a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java index db80245..c714dec 100644 --- a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java +++ b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java @@ -61,9 +61,11 @@ class VCDFileParser { private void parseVar() throws Exception { nextToken(); // type + String type = tokenizer.sval; nextToken(); // size int width = Integer.parseInt(tokenizer.sval); - + if("real".equals(type)) + width*=-1; nextToken(); String id = tokenizer.sval; nextToken(); @@ -153,7 +155,8 @@ class VCDFileParser { } while (!tokenizer.sval.equals("$end")); return true; } - if (tokenizer.sval.equals("$dumpvars") || tokenizer.sval.equals("$end")) return true; + if (tokenizer.sval.equals("$dumpvars") || tokenizer.sval.equals("$end")) + return true; String value, id; if (tokenizer.sval.charAt(0) == 'b') { // Multiple value net. Value appears first, followed by space, @@ -161,6 +164,12 @@ class VCDFileParser { value = tokenizer.sval.substring(1); nextToken(); id = tokenizer.sval; + }else if (tokenizer.sval.charAt(0) == 'r') { + // Multiple value net. Value appears first, followed by space, + // then identifier + value = tokenizer.sval.substring(1); + nextToken(); + id = tokenizer.sval; } else { // Single value net. identifier first, then value, no space. value = tokenizer.sval.substring(0, 1); @@ -174,39 +183,46 @@ class VCDFileParser { } int netWidth = traceBuilder.getNetWidth(net); - BitVector decodedValues = new BitVector(netWidth); - if (value.equals("z") && netWidth > 1) { - for (int i = 0; i < netWidth; i++) - decodedValues.setValue(i, BitVector.VALUE_Z); - } else if (value.equals("x") && netWidth > 1) { - for (int i = 0; i < netWidth; i++) - decodedValues.setValue(i, BitVector.VALUE_X); + if(netWidth<0) { + traceBuilder.appendTransition(net, currentTime, Double.parseDouble(value)); } else { - int stringIndex = 0; - for (int convertedIndex = netWidth - value.length(); convertedIndex < netWidth; convertedIndex++) { - switch (value.charAt(stringIndex++)) { - case 'z': - decodedValues.setValue(convertedIndex, BitVector.VALUE_Z); - break; - - case '1': - decodedValues.setValue(convertedIndex, BitVector.VALUE_1); - break; - - case '0': - decodedValues.setValue(convertedIndex, BitVector.VALUE_0); - break; - - case 'x': - decodedValues.setValue(convertedIndex, BitVector.VALUE_X); - break; - - default: - decodedValues.setValue(convertedIndex, BitVector.VALUE_X); + BitVector decodedValues = new BitVector(netWidth); + if (value.equals("z") && netWidth > 1) { + for (int i = 0; i < netWidth; i++) + decodedValues.setValue(i, BitVector.VALUE_Z); + } else if (value.equals("x") && netWidth > 1) { + for (int i = 0; i < netWidth; i++) + decodedValues.setValue(i, BitVector.VALUE_X); + } else { + int stringIndex = 0; + for (int convertedIndex = netWidth - value.length(); convertedIndex < netWidth; convertedIndex++) { + switch (value.charAt(stringIndex++)) { + case 'z': + decodedValues.setValue(convertedIndex, BitVector.VALUE_Z); + break; + + case '1': + decodedValues.setValue(convertedIndex, BitVector.VALUE_1); + break; + + case '0': + decodedValues.setValue(convertedIndex, BitVector.VALUE_0); + break; + + case 'x': + decodedValues.setValue(convertedIndex, BitVector.VALUE_X); + break; + + default: + decodedValues.setValue(convertedIndex, BitVector.VALUE_X); + } } } + if(netWidth==1) + traceBuilder.appendTransition(net, currentTime, decodedValues.getValue()[0]); + else + traceBuilder.appendTransition(net, currentTime, decodedValues); } - traceBuilder.appendTransition(net, currentTime, decodedValues); } return true; } diff --git a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeSingle.java b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeBit.java similarity index 80% rename from com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeSingle.java rename to com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeBit.java index a8fc14b..b24870c 100644 --- a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeSingle.java +++ b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeBit.java @@ -10,14 +10,14 @@ *******************************************************************************/ package com.minres.scviewer.database.vcd; -import com.minres.scviewer.database.ISignalChangeSingle; +import com.minres.scviewer.database.ISignalChangeBit; import com.minres.scviewer.database.SignalChange; -public class VCDSignalChangeSingle extends SignalChange implements ISignalChangeSingle, Cloneable { +public class VCDSignalChangeBit extends SignalChange implements ISignalChangeBit, Cloneable { private char value; - public VCDSignalChangeSingle(Long time, char value) { + public VCDSignalChangeBit(Long time, char value) { super(time); this.value=value; } diff --git a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeMulti.java b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeBitVector.java similarity index 77% rename from com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeMulti.java rename to com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeBitVector.java index e38c50f..10b8714 100644 --- a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeMulti.java +++ b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeBitVector.java @@ -11,18 +11,18 @@ package com.minres.scviewer.database.vcd; import com.minres.scviewer.database.BitVector; -import com.minres.scviewer.database.ISignalChangeMulti; +import com.minres.scviewer.database.ISignalChangeBitVector; import com.minres.scviewer.database.SignalChange; -public class VCDSignalChangeMulti extends SignalChange implements ISignalChangeMulti, Cloneable { +public class VCDSignalChangeBitVector extends SignalChange implements ISignalChangeBitVector, Cloneable { private BitVector value; - public VCDSignalChangeMulti(Long time) { + public VCDSignalChangeBitVector(Long time) { super(time); } - public VCDSignalChangeMulti(Long time, BitVector decodedValues) { + public VCDSignalChangeBitVector(Long time, BitVector decodedValues) { super(time); this.value=decodedValues; } diff --git a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeReal.java b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeReal.java new file mode 100644 index 0000000..f747256 --- /dev/null +++ b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDSignalChangeReal.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2015 MINRES Technologies GmbH and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * MINRES Technologies GmbH - initial API and implementation + *******************************************************************************/ +package com.minres.scviewer.database.vcd; + +import com.minres.scviewer.database.ISignalChangeReal; +import com.minres.scviewer.database.SignalChange; + +public class VCDSignalChangeReal extends SignalChange implements ISignalChangeReal, Cloneable { + + private double value; + + public VCDSignalChangeReal(Long time, double value) { + super(time); + this.value=value; + } + + public double getValue() { + return value; + } + + public void setValue(double value) { + this.value = value; + } + + @Override + public String toString() { + return value+"@"+getTime(); + } +} diff --git a/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeSingle.java b/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeBit.java similarity index 91% rename from com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeSingle.java rename to com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeBit.java index 1319685..3cf747e 100644 --- a/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeSingle.java +++ b/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeBit.java @@ -10,7 +10,7 @@ *******************************************************************************/ package com.minres.scviewer.database; -public interface ISignalChangeSingle extends ISignalChange{ +public interface ISignalChangeBit extends ISignalChange{ public char getValue(); diff --git a/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeMulti.java b/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeBitVector.java similarity index 90% rename from com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeMulti.java rename to com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeBitVector.java index ec9b770..be94346 100644 --- a/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeMulti.java +++ b/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeBitVector.java @@ -10,8 +10,7 @@ *******************************************************************************/ package com.minres.scviewer.database; - -public interface ISignalChangeMulti extends ISignalChange { +public interface ISignalChangeBitVector extends ISignalChange { public BitVector getValue(); diff --git a/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeReal.java b/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeReal.java new file mode 100644 index 0000000..e49906b --- /dev/null +++ b/com.minres.scviewer.database/src/com/minres/scviewer/database/ISignalChangeReal.java @@ -0,0 +1,17 @@ +/******************************************************************************* + * Copyright (c) 2015 MINRES Technologies GmbH and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * MINRES Technologies GmbH - initial API and implementation + *******************************************************************************/ +package com.minres.scviewer.database; + +public interface ISignalChangeReal extends ISignalChange{ + + public double getValue(); + +} From 9d4c951e7fa838b5a1fb482e74ce45a07aad0ec7 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 11 Oct 2018 14:44:41 +0200 Subject: [PATCH 10/16] Added support for real valued signals in waveform UI --- .../database/swt/internal/SignalPainter.java | 86 +++++++++++++++++-- .../database/swt/internal/WaveformCanvas.java | 49 +++++------ .../database/swt/internal/WaveformViewer.java | 59 ++++++++----- .../scviewer/database/ui/WaveformColors.java | 2 +- 4 files changed, 140 insertions(+), 56 deletions(-) diff --git a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java index d41ff93..42ead12 100644 --- a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java +++ b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java @@ -11,6 +11,8 @@ package com.minres.scviewer.database.swt.internal; import java.util.Map.Entry; +import java.util.Collection; +import java.util.Map; import java.util.NavigableMap; import javax.swing.JPanel; @@ -24,8 +26,9 @@ import org.eclipse.swt.graphics.Rectangle; import com.minres.scviewer.database.ISignal; import com.minres.scviewer.database.ISignalChange; -import com.minres.scviewer.database.ISignalChangeMulti; -import com.minres.scviewer.database.ISignalChangeSingle; +import com.minres.scviewer.database.ISignalChangeBitVector; +import com.minres.scviewer.database.ISignalChangeReal; +import com.minres.scviewer.database.ISignalChangeBit; import com.minres.scviewer.database.ui.TrackEntry; import com.minres.scviewer.database.ui.WaveformColors; @@ -107,7 +110,6 @@ public class SignalPainter extends TrackPainter { NavigableMap entries = signal.getEvents().subMap(first.getKey(), false, last.getKey(), true); SignalChange left = new SignalChange(first); SignalChange right = new SignalChange(entries.size() > 0 ? entries.firstEntry() : first); - SignalStencil stencil = left.value instanceof ISignalChangeSingle ? new SingleBitStencil() : new MultiBitStencil(gc); maxX = area.x + area.width; yOffsetT = this.waveCanvas.getTrackHeight() / 5 + area.y; @@ -132,6 +134,7 @@ public class SignalPainter extends TrackPainter { xEnd = getXEnd(right.time); } + SignalStencil stencil = getStencil(gc, left, entries); do { stencil.draw(gc, area, left.value, right.value, xBegin, xEnd, multiple); if (right.time >= endTime) @@ -150,6 +153,17 @@ public class SignalPainter extends TrackPainter { } while (left.time < endTime); } + private SignalStencil getStencil(GC gc, SignalChange left, NavigableMap entries) { + if(left.value instanceof ISignalChangeBit) + return new SingleBitStencil(); + else if (left.value instanceof ISignalChangeBitVector) + return new MultiBitStencil(gc); + else if (left.value instanceof ISignalChangeReal) + return new RealStencil(entries, left.value); + else + return null; + } + private interface SignalStencil { public void draw(GC gc, Rectangle area, ISignalChange left, ISignalChange right, int xBegin, int xEnd, boolean multiple); @@ -168,7 +182,7 @@ public class SignalPainter extends TrackPainter { public void draw(GC gc, Rectangle area, ISignalChange left, ISignalChange right, int xBegin, int xEnd, boolean multiple) { Color colorBorder = waveCanvas.colors[WaveformColors.SIGNAL0.ordinal()]; - ISignalChangeMulti last = (ISignalChangeMulti) left; + ISignalChangeBitVector last = (ISignalChangeBitVector) left; if (last.getValue().toString().contains("X")) { colorBorder = waveCanvas.colors[WaveformColors.SIGNALX.ordinal()]; } else if (last.getValue().toString().contains("Z")) { @@ -216,11 +230,12 @@ public class SignalPainter extends TrackPainter { if (multiple) { gc.setForeground(waveCanvas.colors[WaveformColors.SIGNALU.ordinal()]); gc.drawLine(xBegin, yOffsetT, xBegin, yOffsetB); - gc.drawLine(xEnd, yOffsetT, xEnd, yOffsetB); + if(xEnd>xBegin) + gc.drawLine(xEnd, yOffsetT, xEnd, yOffsetB); } else { Color color = waveCanvas.colors[WaveformColors.SIGNALX.ordinal()]; int yOffset = yOffsetM; - switch (((ISignalChangeSingle) left).getValue()) { + switch (((ISignalChangeBit) left).getValue()) { case '1': color = waveCanvas.colors[WaveformColors.SIGNAL1.ordinal()]; yOffset = yOffsetT; @@ -240,7 +255,7 @@ public class SignalPainter extends TrackPainter { } else { gc.drawLine(xBegin, yOffset, xEnd, yOffset); int yNext = yOffsetM; - switch (((ISignalChangeSingle) right).getValue()) { + switch (((ISignalChangeBit) right).getValue()) { case '1': yNext = yOffsetT; break; @@ -257,8 +272,63 @@ public class SignalPainter extends TrackPainter { } + private class RealStencil implements SignalStencil { + + double minVal, range; + + final double scaleFactor = 1.05; + + boolean stepWise=true; + + @SuppressWarnings("unchecked") + public RealStencil(NavigableMap entries, ISignalChange left) { + Collection values = ((NavigableMap) entries).values(); + minVal=((ISignalChangeReal) left).getValue(); + range=2.0; + if(!values.isEmpty()) { + double maxVal=minVal; + for(ISignalChangeReal v:values) { + minVal=Math.min(minVal, v.getValue()); + maxVal=Math.max(maxVal, v.getValue()); + } + range = (maxVal-minVal)*scaleFactor; + double avg = (maxVal+minVal)/2.0; + minVal=avg-(avg-minVal)*scaleFactor; + } + } + + public void draw(GC gc, Rectangle area, ISignalChange left, ISignalChange right, int xBegin, int xEnd, boolean multiple) { + double leftVal = ((ISignalChangeReal) left).getValue(); + double rightVal= ((ISignalChangeReal) right).getValue(); +// if (multiple) { +// gc.setForeground(waveCanvas.colors[WaveformColors.SIGNALX.ordinal()]); +// } else { + gc.setForeground(waveCanvas.colors[WaveformColors.SIGNAL_REAL.ordinal()]); +// } + int yOffsetLeft = (int) ((leftVal-minVal) / range * (yOffsetB-yOffsetT)); + int yOffsetRight = (int) ((rightVal-minVal) / range * (yOffsetB-yOffsetT)); + if(stepWise) { + if (xEnd > maxX) { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, maxX, yOffsetB-yOffsetLeft); + } else { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetLeft); + if(yOffsetRight!=yOffsetLeft) { + gc.drawLine(xEnd, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetRight); + } + } + + } else { + if (xEnd > maxX) { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, maxX, yOffsetB-yOffsetRight); + } else { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetRight); + } + } + } + } + public ISignal getSignal() { return signal; } -} \ No newline at end of file +} diff --git a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformCanvas.java b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformCanvas.java index 333cb4f..4621e54 100644 --- a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformCanvas.java +++ b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformCanvas.java @@ -126,6 +126,30 @@ public class WaveformCanvas extends Canvas { painterList.add(marker); cursorPainters.add(marker); wave2painterMap=new HashMap<>(); + // fall back initialization + colors[WaveformColors.LINE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED); + colors[WaveformColors.LINE_HIGHLITE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_CYAN); + colors[WaveformColors.TRACK_BG_EVEN.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_BLACK); + colors[WaveformColors.TRACK_BG_ODD.ordinal()] = SWTResourceManager.getColor(40, 40, 40); + colors[WaveformColors.TRACK_BG_HIGHLITE.ordinal()] = SWTResourceManager.getColor(40, 40, 80); + colors[WaveformColors.TX_BG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GREEN); + colors[WaveformColors.TX_BG_HIGHLITE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_GREEN); + colors[WaveformColors.TX_BORDER.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED); + colors[WaveformColors.SIGNAL0.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GREEN); + colors[WaveformColors.SIGNAL1.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GREEN); + colors[WaveformColors.SIGNALZ.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_YELLOW); + colors[WaveformColors.SIGNALX.ordinal()] = SWTResourceManager.getColor(255, 51, 51); + colors[WaveformColors.SIGNALU.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_YELLOW); + colors[WaveformColors.SIGNAL_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE); + colors[WaveformColors.SIGNAL_REAL.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_YELLOW); + colors[WaveformColors.CURSOR.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED); + colors[WaveformColors.CURSOR_DRAG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GRAY); + colors[WaveformColors.CURSOR_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE); + colors[WaveformColors.MARKER.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_GRAY); + colors[WaveformColors.MARKER_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE); + colors[WaveformColors.REL_ARROW.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_MAGENTA); + colors[WaveformColors.REL_ARROW_HIGHLITE.ordinal()] = SWTResourceManager.getColor(255, 128, 255); + } public void addCursoPainter(CursorPainter cursorPainter){ @@ -137,33 +161,10 @@ public class WaveformCanvas extends Canvas { Display d = getDisplay(); if (colourMap != null) { for (WaveformColors c : WaveformColors.values()) { - if (colourMap.containsKey(c)) { + if (colourMap.containsKey(c)) colors[c.ordinal()] = new Color(d, colourMap.get(c)); - } } redraw(); - } else { - colors[WaveformColors.LINE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED); - colors[WaveformColors.LINE_HIGHLITE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_CYAN); - colors[WaveformColors.TRACK_BG_EVEN.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_BLACK); - colors[WaveformColors.TRACK_BG_ODD.ordinal()] = SWTResourceManager.getColor(40, 40, 40); - colors[WaveformColors.TRACK_BG_HIGHLITE.ordinal()] = SWTResourceManager.getColor(40, 40, 80); - colors[WaveformColors.TX_BG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GREEN); - colors[WaveformColors.TX_BG_HIGHLITE.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_GREEN); - colors[WaveformColors.TX_BORDER.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED); - colors[WaveformColors.SIGNAL0.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_GREEN); - colors[WaveformColors.SIGNAL1.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_GREEN); - colors[WaveformColors.SIGNALZ.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_YELLOW); - colors[WaveformColors.SIGNALX.ordinal()] = SWTResourceManager.getColor(255, 51, 51); - colors[WaveformColors.SIGNALU.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_YELLOW); - colors[WaveformColors.SIGNAL_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE); - colors[WaveformColors.CURSOR.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED); - colors[WaveformColors.CURSOR_DRAG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GRAY); - colors[WaveformColors.CURSOR_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE); - colors[WaveformColors.MARKER.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_DARK_GRAY); - colors[WaveformColors.MARKER_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE); - colors[WaveformColors.REL_ARROW.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_MAGENTA); - colors[WaveformColors.REL_ARROW_HIGHLITE.ordinal()] = SWTResourceManager.getColor(255, 128, 255); } } diff --git a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java index 59d2b78..470b3af 100644 --- a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java +++ b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java @@ -13,6 +13,7 @@ package com.minres.scviewer.database.swt.internal; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -71,8 +72,9 @@ import org.eclipse.wb.swt.SWTResourceManager; import com.google.common.collect.Lists; import com.minres.scviewer.database.ISignal; import com.minres.scviewer.database.ISignalChange; -import com.minres.scviewer.database.ISignalChangeMulti; -import com.minres.scviewer.database.ISignalChangeSingle; +import com.minres.scviewer.database.ISignalChangeBitVector; +import com.minres.scviewer.database.ISignalChangeReal; +import com.minres.scviewer.database.ISignalChangeBit; import com.minres.scviewer.database.ITx; import com.minres.scviewer.database.ITxEvent; import com.minres.scviewer.database.ITxRelation; @@ -102,11 +104,11 @@ public class WaveformViewer implements IWaveformViewer { private Control namePaneHeader; - private Canvas nameList; + final private Canvas nameList; - private Canvas valueList; + final private Canvas valueList; - WaveformCanvas waveformCanvas; + final WaveformCanvas waveformCanvas; private Composite top; @@ -125,12 +127,11 @@ public class WaveformViewer implements IWaveformViewer { protected MouseListener nameValueMouseListener = new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { - if ((e.button == 1 || e.button == 3)) { + if (e.button == 1) { Entry entry = trackVerticalOffset.floorEntry(e.y); if (entry != null) setSelection(new StructuredSelection(entry.getValue())); - } - if (e.button == 3) { + } else if (e.button == 3) { Menu topMenu= top.getMenu(); if(topMenu!=null) topMenu.setVisible(true); } @@ -171,7 +172,7 @@ public class WaveformViewer implements IWaveformViewer { } }); } - }else if (e.button == 2) { + }else if (e.button == 2) { setMarkerTime(snapOffsetToEvent(e), selectedMarker); e.widget.getDisplay().asyncExec(new Runnable() { @Override @@ -273,9 +274,11 @@ public class WaveformViewer implements IWaveformViewer { nameList.addListener(SWT.Paint, new Listener() { @Override public void handleEvent(Event event) { - GC gc = event.gc; - Rectangle rect = ((Canvas) event.widget).getClientArea(); - paintNames(gc, rect); + if(!trackVerticalOffset.isEmpty()) { + GC gc = event.gc; + Rectangle rect = ((Canvas) event.widget).getClientArea(); + paintNames(gc, rect); + } } }); nameList.addMouseListener(nameValueMouseListener); @@ -305,9 +308,11 @@ public class WaveformViewer implements IWaveformViewer { valueList.addListener(SWT.Paint, new Listener() { @Override public void handleEvent(Event event) { - GC gc = event.gc; - Rectangle rect = ((Canvas) event.widget).getClientArea(); - paintValues(gc, rect); + if(!trackVerticalOffset.isEmpty()) { + GC gc = event.gc; + Rectangle rect = ((Canvas) event.widget).getClientArea(); + paintValues(gc, rect); + } } }); valueList.addMouseListener(nameValueMouseListener); @@ -315,7 +320,7 @@ public class WaveformViewer implements IWaveformViewer { waveformCanvas.setMaxTime(1); waveformCanvas.addMouseListener(waveformMouseListener); - + nameListScrolled.getVerticalBar().addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { int y = ((ScrollBar) e.widget).getSelection(); @@ -454,10 +459,16 @@ public class WaveformViewer implements IWaveformViewer { for(Entry, String> entry:actualValues.entrySet()){ if(entry.getKey() instanceof ISignal){ ISignalChange event = ((ISignal)entry.getKey()).getWaveformEventsBeforeTime(time); - if(event instanceof ISignalChangeSingle){ - entry.setValue("b'"+((ISignalChangeSingle)event).getValue()); - } else if(event instanceof ISignalChangeMulti){ - entry.setValue("h'"+((ISignalChangeMulti)event).getValue().toHexString()); + if(event instanceof ISignalChangeBit){ + entry.setValue("b'"+((ISignalChangeBit)event).getValue()); + } else if(event instanceof ISignalChangeBitVector){ + entry.setValue("h'"+((ISignalChangeBitVector)event).getValue().toHexString()); + } else if(event instanceof ISignalChangeReal){ + double val = ((ISignalChangeReal)event).getValue(); + if(val>0.001) + entry.setValue(String.format("%1$,.3f", val)); + else + entry.setValue(Double.toString(val)); } } else if(entry.getKey() instanceof ITxStream){ ITxStream stream = (ITxStream) entry.getKey(); @@ -551,9 +562,10 @@ public class WaveformViewer implements IWaveformViewer { public ISelection getSelection() { if (currentTxSelection != null) return new StructuredSelection(currentTxSelection); - else if (currentWaveformSelection != null) - return new StructuredSelection(currentWaveformSelection.waveform); - else + else if (currentWaveformSelection != null) { + Object[] elem = {currentWaveformSelection.waveform, currentWaveformSelection}; + return new StructuredSelection(elem); + } else return new StructuredSelection(); } @@ -738,6 +750,7 @@ public class WaveformViewer implements IWaveformViewer { setCursorTime(time); waveformCanvas.reveal(time); waveformCanvas.redraw(); + updateValueList(); } } diff --git a/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/WaveformColors.java b/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/WaveformColors.java index 382f526..72fb07e 100644 --- a/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/WaveformColors.java +++ b/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/WaveformColors.java @@ -14,7 +14,7 @@ public enum WaveformColors { LINE, LINE_HIGHLITE, TRACK_BG_EVEN, TRACK_BG_ODD, TRACK_BG_HIGHLITE, TX_BG, TX_BG_HIGHLITE, TX_BORDER, - SIGNAL0, SIGNAL1, SIGNALZ, SIGNALX, SIGNALU, SIGNAL_TEXT, + SIGNAL0, SIGNAL1, SIGNALZ, SIGNALX, SIGNALU, SIGNAL_TEXT, SIGNAL_REAL, CURSOR, CURSOR_DRAG, CURSOR_TEXT, MARKER, MARKER_TEXT, REL_ARROW, REL_ARROW_HIGHLITE } \ No newline at end of file From bda2a84532aacb383437f07b890668621c47d1b5 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 11 Oct 2018 14:48:36 +0200 Subject: [PATCH 11/16] Fixed #6 Implement right-click menue for signal names --- .../scviewer/e4/application/parts/WaveformViewer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index b46b2c9..78699a0 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -245,10 +245,12 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis if (filesToLoad.size() > 0) loadDatabase(persistedState); eventBroker.post(WaveStatusBarControl.ZOOM_LEVEL, zoomLevel[waveformPane.getZoomLevel()]); +// menuService.registerContextMenu(waveformPane.getNameControl(), +// "com.minres.scviewer.e4.application.popupmenu.namecontext"); //$NON-NLS-1$ menuService.registerContextMenu(waveformPane.getNameControl(), - "com.minres.scviewer.e4.application.popupmenu.namecontext"); //$NON-NLS-1$ + "com.minres.scviewer.e4.application.popupmenu.wavecontext"); //$NON-NLS-1$ menuService.registerContextMenu(waveformPane.getValueControl(), - "com.minres.scviewer.e4.application.popupmenu.namecontext"); //$NON-NLS-1$ + "com.minres.scviewer.e4.application.popupmenu.wavecontext"); //$NON-NLS-1$ menuService.registerContextMenu(waveformPane.getWaveformControl(), "com.minres.scviewer.e4.application.popupmenu.wavecontext"); //$NON-NLS-1$ ePartService.addPartListener(new PartListener() { @@ -412,7 +414,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis */ @Focus public void setFocus() { - myParent.setFocus(); + waveformPane.getWaveformControl().setFocus(); } /** @@ -658,6 +660,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis index++; waveformPane.getStreamList().addAll(index, streams); } + setFocus(); } /** From 694423be3b0a52779aafce488dc87a4467078146 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 11 Oct 2018 14:54:47 +0200 Subject: [PATCH 12/16] [WIP] extended application to configure waveform display --- .../Application.e4xmi | 3 +- .../META-INF/MANIFEST.MF | 56 ++++++++-------- ....java => NavigateToolbarContribution.java} | 2 +- .../WaveformPopupMenuContribution.java | 67 +++++++++++++++++++ .../preferences/DefaultValuesInitializer.java | 1 + 5 files changed, 99 insertions(+), 30 deletions(-) rename com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/{NavigateContribution.java => NavigateToolbarContribution.java} (98%) create mode 100644 com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java diff --git a/com.minres.scviewer.e4.application/Application.e4xmi b/com.minres.scviewer.e4.application/Application.e4xmi index 35149e6..6035d3a 100644 --- a/com.minres.scviewer.e4.application/Application.e4xmi +++ b/com.minres.scviewer.e4.application/Application.e4xmi @@ -108,7 +108,7 @@ - + @@ -204,6 +204,7 @@ + diff --git a/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF b/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF index 93b5bc6..ccd278f 100644 --- a/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF @@ -5,33 +5,33 @@ Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true Bundle-Version: 1.1.1.qualifier Bundle-Vendor: %Bundle-Vendor Require-Bundle: javax.inject;bundle-version="1.0.0", - org.eclipse.core.runtime;bundle-version="3.11.1", - org.eclipse.swt;bundle-version="3.104.1", - org.eclipse.e4.ui.model.workbench;bundle-version="1.1.100", - org.eclipse.jface;bundle-version="3.11.0", - org.eclipse.e4.ui.services;bundle-version="1.2.0", - org.eclipse.e4.ui.workbench;bundle-version="1.3.0", - org.eclipse.e4.core.di;bundle-version="1.5.0", - org.eclipse.e4.ui.di;bundle-version="1.1.0", - org.eclipse.e4.core.contexts;bundle-version="1.4.0", - com.minres.scviewer.database.ui.swt;bundle-version="1.0.0", - com.minres.scviewer.database.ui, - com.minres.scviewer.database;bundle-version="1.0.0", - org.eclipse.equinox.ds;bundle-version="1.4.300", - org.eclipse.equinox.util;bundle-version="1.0.500", - org.eclipse.osgi.services;bundle-version="3.5.0", - org.eclipse.e4.core.services;bundle-version="2.0.0", - org.eclipse.osgi.services;bundle-version="3.5.0", - org.eclipse.core.jobs, - org.eclipse.osgi, - com.google.guava, - org.eclipse.equinox.preferences, - org.eclipse.core.expressions, - org.eclipse.e4.core.commands;bundle-version="0.11.0", - org.eclipse.e4.ui.workbench.addons.swt, - com.opcoach.e4.preferences, - org.eclipse.e4.core.di.extensions, - org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0" + org.eclipse.core.runtime;bundle-version="3.11.1", + org.eclipse.swt;bundle-version="3.104.1", + org.eclipse.e4.ui.model.workbench;bundle-version="1.1.100", + org.eclipse.jface;bundle-version="3.11.0", + org.eclipse.e4.ui.services;bundle-version="1.2.0", + org.eclipse.e4.ui.workbench;bundle-version="1.3.0", + org.eclipse.e4.core.di;bundle-version="1.5.0", + org.eclipse.e4.ui.di;bundle-version="1.1.0", + org.eclipse.e4.core.contexts;bundle-version="1.4.0", + com.minres.scviewer.database.ui.swt;bundle-version="1.0.0", + com.minres.scviewer.database.ui, + com.minres.scviewer.database;bundle-version="1.0.0", + org.eclipse.equinox.ds;bundle-version="1.4.300", + org.eclipse.equinox.util;bundle-version="1.0.500", + org.eclipse.osgi.services;bundle-version="3.5.0", + org.eclipse.e4.core.services;bundle-version="2.0.0", + org.eclipse.osgi.services;bundle-version="3.5.0", + org.eclipse.core.jobs, + org.eclipse.osgi, + com.google.guava, + org.eclipse.equinox.preferences, + org.eclipse.core.expressions, + org.eclipse.e4.core.commands;bundle-version="0.11.0", + org.eclipse.e4.ui.workbench.addons.swt, + com.opcoach.e4.preferences, + org.eclipse.e4.core.di.extensions, + org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: com.minres.scviewer.database, - javax.inject;version="1.0.0" + javax.inject;version="1.0.0" diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateContribution.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateToolbarContribution.java similarity index 98% rename from com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateContribution.java rename to com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateToolbarContribution.java index cc61765..fc8db23 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateContribution.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/NavigateToolbarContribution.java @@ -32,7 +32,7 @@ import com.minres.scviewer.e4.application.parts.WaveformViewer; /** * The Class NavigateContribution. Currently not used in Application.e4xmi */ -public class NavigateContribution { +public class NavigateToolbarContribution { /** The part service. */ @Inject EPartService partService; diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java new file mode 100644 index 0000000..d5d9193 --- /dev/null +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java @@ -0,0 +1,67 @@ + +package com.minres.scviewer.e4.application.elements; + +import java.util.List; + +import javax.inject.Inject; + +import org.eclipse.e4.ui.di.AboutToShow; +import org.eclipse.e4.ui.di.AboutToHide; +import org.eclipse.e4.ui.model.application.ui.basic.MPart; +import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; +import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement; +import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; + +import com.minres.scviewer.database.ISignal; +import com.minres.scviewer.database.ISignalChange; +import com.minres.scviewer.database.ISignalChangeBit; +import com.minres.scviewer.database.ISignalChangeBitVector; +import com.minres.scviewer.database.ISignalChangeReal; +import com.minres.scviewer.database.ui.GotoDirection; +import com.minres.scviewer.e4.application.parts.WaveformViewer; + +public class WaveformPopupMenuContribution { + int counter=0; + + @Inject MPart activePart; + + @AboutToShow + public void aboutToShow(List items) { + Object obj = activePart.getObject(); + if(obj instanceof WaveformViewer){ + WaveformViewer wfv = (WaveformViewer)obj; + ISelection sel = wfv.getSelection(); + if(!sel.isEmpty() && sel instanceof IStructuredSelection) { + Object selected = ((IStructuredSelection)sel).getFirstElement(); + if(selected instanceof ISignal) { + ISignalChange s = (ISignalChange) ((ISignal) selected).getEvents().firstEntry().getValue(); + if(s instanceof ISignalChangeReal) { + MDirectMenuItem mdi = MMenuFactory.INSTANCE.createDirectMenuItem(); + mdi.setLabel("Analog linear"); + items.add(mdi); + mdi = MMenuFactory.INSTANCE.createDirectMenuItem(); + mdi.setLabel("Analog step"); + items.add(mdi); + } else if(s instanceof ISignalChangeBitVector) { + MDirectMenuItem mdi = MMenuFactory.INSTANCE.createDirectMenuItem(); + mdi.setLabel("Analog linear"); + items.add(mdi); + mdi = MMenuFactory.INSTANCE.createDirectMenuItem(); + mdi.setLabel("Analog step"); + items.add(mdi); + } + } + } + } + + } + + + @AboutToHide + public void aboutToHide(List items) { + + } + +} \ No newline at end of file diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java index 2851277..17afd9b 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java @@ -49,6 +49,7 @@ public class DefaultValuesInitializer extends AbstractPreferenceInitializer { colors[WaveformColors.SIGNAL_REAL.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_YELLOW); colors[WaveformColors.SIGNAL_NAN.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED); colors[WaveformColors.SIGNAL_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE); + colors[WaveformColors.SIGNAL_REAL.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_YELLOW); colors[WaveformColors.CURSOR.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_RED); colors[WaveformColors.CURSOR_DRAG.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_GRAY); colors[WaveformColors.CURSOR_TEXT.ordinal()] = SWTResourceManager.getColor(SWT.COLOR_WHITE); From 6cc5597c256afabcb43d6a4c5ab29fee389d899f Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 14 Oct 2018 08:59:17 +0200 Subject: [PATCH 13/16] Added handler and configurability of wavefrom view --- .../inputs/simple_system.vcd | 24 +- .../database/swt/internal/SignalPainter.java | 237 ++++++++++-------- .../database/swt/internal/WaveformViewer.java | 57 +++-- .../scviewer/database/ui/IWaveformViewer.java | 2 + .../scviewer/database/ui/TrackEntry.java | 16 ++ .../minres/scviewer/database/BitVector.java | 45 ++++ .../Application.e4xmi | 44 ++-- .../WaveformPopupMenuContribution.java | 105 ++++++-- .../e4/application/handlers/AboutHandler.java | 6 +- .../handlers/ChangeValueDisplay.java | 51 ++++ .../handlers/ChangeWaveformDisplay.java | 51 ++++ .../e4/application/parts/WaveformViewer.java | 6 +- 12 files changed, 469 insertions(+), 175 deletions(-) create mode 100644 com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ChangeValueDisplay.java create mode 100644 com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ChangeWaveformDisplay.java diff --git a/com.minres.scviewer.database.test/inputs/simple_system.vcd b/com.minres.scviewer.database.test/inputs/simple_system.vcd index 539f4a6..20cce8a 100755 --- a/com.minres.scviewer.database.test/inputs/simple_system.vcd +++ b/com.minres.scviewer.database.test/inputs/simple_system.vcd @@ -1622,7 +1622,7 @@ b1110100011010100101001010 aabdd 0aabdv 0aabdw 0aabdx -r1.0 bbbbb +r0.0 bbbbb $end #10000 @@ -1640,6 +1640,28 @@ $end 0aabcq 0aabcy 0aabde +r1.0 bbbbb + +#20000 +r2.0 bbbbb + +#30000 +r2.5 bbbbb + +#40000 +r1.5 bbbbb + +#50000 +r-1.0 bbbbb + +#60000 +r-2.5 bbbbb + +#70000 +r-1.0 bbbbb + +#80000 +r0.0 bbbbb #1287121272 b1000000000100000000000000000100 aabcr diff --git a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java index b924b83..ce0de77 100644 --- a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java +++ b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java @@ -67,7 +67,6 @@ public class SignalPainter extends TrackPainter { private static final JPanel DUMMY_PANEL = new JPanel(); private final WaveformCanvas waveCanvas; - private ISignal signal; int yOffsetT; int yOffsetM; @@ -77,7 +76,6 @@ public class SignalPainter extends TrackPainter { public SignalPainter(WaveformCanvas txDisplay, boolean even, TrackEntry trackEntry) { super(trackEntry, even); this.waveCanvas = txDisplay; - this.signal = trackEntry.getSignal(); } private int getXEnd(long time) { @@ -86,6 +84,7 @@ public class SignalPainter extends TrackPainter { } public void paintArea(GC gc, Rectangle area) { + ISignal signal = trackEntry.getSignal(); if (trackEntry.selected) gc.setBackground(this.waveCanvas.colors[WaveformColors.TRACK_BG_HIGHLITE.ordinal()]); else @@ -156,9 +155,14 @@ public class SignalPainter extends TrackPainter { if(left.value instanceof ISignalChangeBit) return new SingleBitStencil(); else if (left.value instanceof ISignalChangeBitVector) - return new MultiBitStencil(gc); + if(trackEntry.waveDisplay==TrackEntry.WaveDisplay.DEFAULT) + return new MultiBitStencil(gc); + else + return new MultiBitStencilAnalog(entries, left.value, + trackEntry.waveDisplay==TrackEntry.WaveDisplay.CONTINOUS, + trackEntry.valueDisplay==TrackEntry.ValueDisplay.SIGNED); else if (left.value instanceof ISignalChangeReal) - return new RealStencil(entries, left.value); + return new RealStencil(entries, left.value, trackEntry.waveDisplay==TrackEntry.WaveDisplay.CONTINOUS); else return null; } @@ -200,7 +204,18 @@ public class SignalPainter extends TrackPainter { gc.setForeground(colorBorder); gc.drawPolygon(points); gc.setForeground(waveCanvas.colors[WaveformColors.SIGNAL_TEXT.ordinal()]); - String label = "h'" + last.getValue().toHexString(); + //TODO: this code should be provided from a central location + String label = null; + switch(trackEntry.valueDisplay) { + case SIGNED: + label=Long.toString(last.getValue().toSignedValue()); + break; + case UNSIGNED: + label=Long.toString(last.getValue().toUnsignedValue()); + break; + default: + label="h'"+last.getValue().toHexString(); + } Point bb = getBoxWidth(gc, label); if (xBegin < area.x) { xBegin = area.x; @@ -224,6 +239,62 @@ public class SignalPainter extends TrackPainter { } + private class MultiBitStencilAnalog implements SignalStencil { + + final boolean continous; + final boolean signed; + private long minVal; + private long range; + + @SuppressWarnings("unchecked") + public MultiBitStencilAnalog(NavigableMap entries, ISignalChange left, boolean continous, boolean signed) { + this.continous=continous; + this.signed=signed; + Collection values = ((NavigableMap) entries).values(); + minVal=((ISignalChangeBitVector) left).getValue().toUnsignedValue(); + range=2; + if(!values.isEmpty()) { + long maxVal=minVal; + for (ISignalChange e : entries.values()) { + long v = ((ISignalChangeBitVector)e).getValue().toUnsignedValue(); + maxVal=Math.max(maxVal, v); + minVal=Math.min(minVal, v); + } + if(maxVal==minVal) { + maxVal--; + minVal++; + } + range = maxVal-minVal; + } else + minVal--; + + } + + public void draw(GC gc, Rectangle area, ISignalChange left, ISignalChange right, int xBegin, int xEnd, boolean multiple) { + long leftVal = ((ISignalChangeBitVector) left).getValue().toUnsignedValue(); + long rightVal= ((ISignalChangeBitVector) right).getValue().toUnsignedValue(); + gc.setForeground(waveCanvas.colors[WaveformColors.SIGNAL_REAL.ordinal()]); + int yOffsetLeft = (int) ((leftVal-minVal) / range * (yOffsetB-yOffsetT)); + int yOffsetRight = (int) ((rightVal-minVal) / range * (yOffsetB-yOffsetT)); + if(continous) { + if (xEnd > maxX) { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, maxX, yOffsetB-yOffsetRight); + } else { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetRight); + } + } else { + if (xEnd > maxX) { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, maxX, yOffsetB-yOffsetLeft); + } else { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetLeft); + if(yOffsetRight!=yOffsetLeft) { + gc.drawLine(xEnd, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetRight); + } + } + } + } + } + private class SingleBitStencil implements SignalStencil { public void draw(GC gc, Rectangle area, ISignalChange left, ISignalChange right, int xBegin, int xEnd, boolean multiple) { if (multiple) { @@ -269,49 +340,47 @@ public class SignalPainter extends TrackPainter { } } } -/* + private class RealStencil implements SignalStencil { - double min; - double max; - double diff; + + double minVal, range; - public RealStencil(ISignalChange value, NavigableMap entries) { - min=((ISignalChangeReal) value).getValue(); - max=min; - for (ISignalChange e : entries.values()) { - double v = ((ISignalChangeReal)e).getValue(); - max= Double.isNaN(max)? v : Math.max(max, v); - min= Double.isNaN(min)? v : Math.min(min, v); - } - int nans = (Double.isNaN(max)?2:0) + (Double.isNaN(max)?1:0); - switch(nans) { - case 0: - break; - case 1: - max=min; - break; - case 2: - min=max; - case 3: - max=min=0; - } - diff=max-min; - if(diff==0.0) { - if(max>0) - min=0.0; - else if(min<0.0) - max=0.0; - else { - max=1.0; - min=0.0; + final double scaleFactor = 1.05; + + boolean continous=true; + + @SuppressWarnings("unchecked") + public RealStencil(NavigableMap entries, ISignalChange left, boolean continous) { + this.continous=continous; + Collection values = ((NavigableMap) entries).values(); + minVal=((ISignalChangeReal) left).getValue(); + range=2.0; + if(!values.isEmpty()) { + double maxVal=minVal; + for (ISignalChange e : entries.values()) { + double v = ((ISignalChangeReal)e).getValue(); + if(Double.isNaN(maxVal)) + maxVal=v; + else if(!Double.isNaN(v)) + maxVal=Math.max(maxVal, v); + if(Double.isNaN(minVal)) + minVal=v; + else if(!Double.isNaN(v)) + minVal=Math.min(minVal, v); } - diff=max-min; + if(Double.isNaN(maxVal)){ + maxVal=minVal=0.0; + } + range = (maxVal-minVal)*scaleFactor; + double avg = (maxVal+minVal)/2.0; + minVal=avg-(avg-minVal)*scaleFactor; } } public void draw(GC gc, Rectangle area, ISignalChange left, ISignalChange right, int xBegin, int xEnd, boolean multiple) { - double value = ((ISignalChangeReal)left).getValue(); - if(Double.isNaN(value)) { + double leftVal = ((ISignalChangeReal) left).getValue(); + double rightVal= ((ISignalChangeReal) right).getValue(); + if(Double.isNaN(leftVal)) { Color color = waveCanvas.colors[WaveformColors.SIGNAL_NAN.ordinal()]; int width = xEnd - xBegin; if (width > 1) { @@ -329,82 +398,28 @@ public class SignalPainter extends TrackPainter { gc.setForeground(color); gc.drawLine(xEnd, yOffsetT, xEnd, yOffsetB); } - } else { - Color color = waveCanvas.colors[WaveformColors.SIGNAL_ANALOG.ordinal()]; - int height=yOffsetT-yOffsetB; - double offset=value-min; - int yOffset=diff>0?(int)(height*(offset/diff)) + yOffsetB:yOffsetM; - gc.setForeground(color); - if (xEnd > maxX) { - gc.drawLine(xBegin, yOffset, maxX, yOffset); - } else { - gc.drawLine(xBegin, yOffset, xEnd, yOffset); - double nextOffset = ((ISignalChangeReal)right).getValue()-min; - int yNext = diff>0?(int)(height*(nextOffset/diff)) + yOffsetB:height/2; - if (yOffset != yNext) - gc.drawLine(xEnd, yOffset, xEnd, yNext); - } - } - } - } -*/ - private class RealStencil implements SignalStencil { - - double minVal, range; - - final double scaleFactor = 1.05; - - boolean stepWise=true; - - @SuppressWarnings("unchecked") - public RealStencil(NavigableMap entries, ISignalChange left) { - Collection values = ((NavigableMap) entries).values(); - minVal=((ISignalChangeReal) left).getValue(); - range=2.0; - if(!values.isEmpty()) { - double maxVal=minVal; - for(ISignalChangeReal v:values) { - minVal=Math.min(minVal, v.getValue()); - maxVal=Math.max(maxVal, v.getValue()); - } - range = (maxVal-minVal)*scaleFactor; - double avg = (maxVal+minVal)/2.0; - minVal=avg-(avg-minVal)*scaleFactor; - } - } - - public void draw(GC gc, Rectangle area, ISignalChange left, ISignalChange right, int xBegin, int xEnd, boolean multiple) { - double leftVal = ((ISignalChangeReal) left).getValue(); - double rightVal= ((ISignalChangeReal) right).getValue(); -// if (multiple) { -// gc.setForeground(waveCanvas.colors[WaveformColors.SIGNALX.ordinal()]); -// } else { + } else { gc.setForeground(waveCanvas.colors[WaveformColors.SIGNAL_REAL.ordinal()]); -// } - int yOffsetLeft = (int) ((leftVal-minVal) / range * (yOffsetB-yOffsetT)); - int yOffsetRight = (int) ((rightVal-minVal) / range * (yOffsetB-yOffsetT)); - if(stepWise) { - if (xEnd > maxX) { - gc.drawLine(xBegin, yOffsetB-yOffsetLeft, maxX, yOffsetB-yOffsetLeft); + int yOffsetLeft = (int) ((leftVal-minVal) / range * (yOffsetB-yOffsetT)); + int yOffsetRight = Double.isNaN(rightVal)?yOffsetLeft:(int) ((rightVal-minVal) / range * (yOffsetB-yOffsetT)); + if(continous) { + if (xEnd > maxX) { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, maxX, yOffsetB-yOffsetRight); + } else { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetRight); + } } else { - gc.drawLine(xBegin, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetLeft); - if(yOffsetRight!=yOffsetLeft) { - gc.drawLine(xEnd, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetRight); + if (xEnd > maxX) { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, maxX, yOffsetB-yOffsetLeft); + } else { + gc.drawLine(xBegin, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetLeft); + if(yOffsetRight!=yOffsetLeft) { + gc.drawLine(xEnd, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetRight); + } } } - - } else { - if (xEnd > maxX) { - gc.drawLine(xBegin, yOffsetB-yOffsetLeft, maxX, yOffsetB-yOffsetRight); - } else { - gc.drawLine(xBegin, yOffsetB-yOffsetLeft, xEnd, yOffsetB-yOffsetRight); - } } } } - public ISignal getSignal() { - return signal; - } - } diff --git a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java index ac95951..139e26f 100644 --- a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java +++ b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java @@ -119,8 +119,6 @@ public class WaveformViewer implements IWaveformViewer { private TreeMap trackVerticalOffset; - private HashMap, String> actualValues; - private Font nameFont, nameFontB; protected MouseListener nameValueMouseListener = new MouseAdapter() { @@ -225,7 +223,6 @@ public class WaveformViewer implements IWaveformViewer { trackVerticalOffset = new TreeMap(); trackVerticalHeight=0; - actualValues = new HashMap, String>(); nameFont = parent.getDisplay().getSystemFont(); nameFontB = SWTResourceManager.getBoldFont(nameFont); @@ -384,19 +381,18 @@ public class WaveformViewer implements IWaveformViewer { waveformCanvas.getDisplay().asyncExec(new Runnable() { @Override public void run() { - updateTracklist(); + update(); } }); } } - protected void updateTracklist() { + public void update() { trackVerticalHeight = 0; int nameMaxWidth = 0; int previousHeight = trackVerticalOffset.size() == 0 ? 0 : trackVerticalOffset.lastKey(); IWaveformPainter painter = null; trackVerticalOffset.clear(); - actualValues.clear(); waveformCanvas.clearAllWaveformPainter(); boolean even = true; boolean clearSelection = true; @@ -407,12 +403,12 @@ public class WaveformViewer implements IWaveformViewer { streamEntry.vOffset=trackVerticalHeight; clearSelection &= currentWaveformSelection!=null && (streamEntry.waveform != currentWaveformSelection.waveform); if (streamEntry.isStream()) { + streamEntry.currentValue=""; streamEntry.height *= streamEntry.getStream().getMaxConcurrency(); painter = new StreamPainter(waveformCanvas, even, streamEntry); - actualValues.put(streamEntry.waveform, ""); } else if (streamEntry.isSignal()) { + streamEntry.currentValue="---"; painter = new SignalPainter(waveformCanvas, even, streamEntry); - actualValues.put(streamEntry.waveform, "---"); } waveformCanvas.addWaveformPainter(painter); trackVerticalOffset.put(trackVerticalHeight, streamEntry); @@ -440,14 +436,15 @@ public class WaveformViewer implements IWaveformViewer { for(Entry> entry: trackVerticalOffset.entrySet()){ System.out.println(" "+entry.getKey()+": " +entry.getValue().getFullName()); } - */ } + */ + } private int calculateValueWidth() { TextLayout tl = new TextLayout(waveformCanvas.getDisplay()); tl.setFont(nameFontB); int valueMaxWidth = 0; - for (String v : actualValues.values()) { - tl.setText(v); + for (TrackEntry v : streams) { + tl.setText(v.currentValue); valueMaxWidth = Math.max(valueMaxWidth, tl.getBounds().width); } return valueMaxWidth + 15; @@ -455,22 +452,32 @@ public class WaveformViewer implements IWaveformViewer { private void updateValueList(){ final Long time = getCursorTime(); - for(Entry, String> entry:actualValues.entrySet()){ - if(entry.getKey() instanceof ISignal){ - ISignalChange event = ((ISignal)entry.getKey()).getWaveformEventsBeforeTime(time); + for(TrackEntry entry:streams){ + if(entry.isSignal()){ + ISignalChange event = ((ISignal)entry.waveform).getWaveformEventsBeforeTime(time); if(event instanceof ISignalChangeBit){ - entry.setValue("b'"+((ISignalChangeBit)event).getValue()); + entry.currentValue="b'"+((ISignalChangeBit)event).getValue(); } else if(event instanceof ISignalChangeBitVector){ - entry.setValue("h'"+((ISignalChangeBitVector)event).getValue().toHexString()); + // TODO: same code resides in SignalPainter, fix it + switch(entry.valueDisplay) { + case SIGNED: + entry.currentValue=Long.toString(((ISignalChangeBitVector)event).getValue().toSignedValue()); + break; + case UNSIGNED: + entry.currentValue=Long.toString(((ISignalChangeBitVector)event).getValue().toUnsignedValue()); + break; + default: + entry.currentValue="h'"+((ISignalChangeBitVector)event).getValue().toHexString(); + } } else if(event instanceof ISignalChangeReal){ double val = ((ISignalChangeReal)event).getValue(); if(val>0.001) - entry.setValue(String.format("%1$,.3f", val)); + entry.currentValue=String.format("%1$,.3f", val); else - entry.setValue(Double.toString(val)); + entry.currentValue=Double.toString(val); } - } else if(entry.getKey() instanceof ITxStream){ - ITxStream stream = (ITxStream) entry.getKey(); + } else if(entry.isStream()){ + ITxStream stream = (ITxStream) entry.waveform; ITx[] resultsList = new ITx[stream.getMaxConcurrency()]; Entry> firstTx=stream.getEvents().floorEntry(time); if(firstTx!=null){ @@ -492,7 +499,7 @@ public class WaveformViewer implements IWaveformViewer { value+="|"; if(o!=null) value+=((ITx)o).getGenerator().getName(); } - entry.setValue(value); + entry.currentValue=value; } } } @@ -775,7 +782,7 @@ public class WaveformViewer implements IWaveformViewer { int newIdx=idx+i; if(newIdx>=0 && newIdx w = trackEntry.waveform; if (w instanceof ITxStream) subArea.height *= ((ITxStream) w).getMaxConcurrency(); - drawValue(gc, subArea, firstKey, actualValues.get(w), trackEntry.selected); + drawValue(gc, subArea, firstKey, trackEntry.currentValue, trackEntry.selected); } else { for (Entry entry : trackVerticalOffset.subMap(firstKey, true, lastKey, true) .entrySet()) { @@ -833,7 +840,7 @@ public class WaveformViewer implements IWaveformViewer { subArea.height = waveformCanvas.getTrackHeight(); if (w instanceof ITxStream) subArea.height *= ((ITxStream) w).getMaxConcurrency(); - drawValue(gc, subArea, entry.getKey(), actualValues.get(w), entry.getValue().selected); + drawValue(gc, subArea, entry.getKey(), entry.getValue().currentValue, entry.getValue().selected); } } }catch(NoSuchElementException e){} @@ -1001,7 +1008,7 @@ public class WaveformViewer implements IWaveformViewer { else streams.add(tgtIdx, srcWave); currentWaveformSelection=srcWave; - updateTracklist(); + update(); } else if(source instanceof CursorPainter){ ((CursorPainter)source).setTime(0); updateValueList(); diff --git a/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/IWaveformViewer.java b/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/IWaveformViewer.java index cac7994..7f4bd6a 100644 --- a/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/IWaveformViewer.java +++ b/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/IWaveformViewer.java @@ -34,6 +34,8 @@ public interface IWaveformViewer extends PropertyChangeListener, ISelectionProvi public void addSelectionChangedListener(ISelectionChangedListener listener); public void removeSelectionChangedListener(ISelectionChangedListener listener); + + public void update(); public Control getControl(); diff --git a/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/TrackEntry.java b/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/TrackEntry.java index b40748a..7a9f6d9 100644 --- a/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/TrackEntry.java +++ b/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/TrackEntry.java @@ -17,7 +17,17 @@ import com.minres.scviewer.database.ITxStream; import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.IWaveformEvent; + public class TrackEntry { + public enum ValueDisplay { + DEFAULT, SIGNED, UNSIGNED + + } + + public enum WaveDisplay { + DEFAULT, STEP_WISE, CONTINOUS + } + final public IWaveform waveform; public int vOffset; @@ -26,6 +36,12 @@ public class TrackEntry { public boolean selected; + public String currentValue=""; + + public ValueDisplay valueDisplay = ValueDisplay.DEFAULT; + + public WaveDisplay waveDisplay = WaveDisplay.DEFAULT; + public TrackEntry(IWaveform waveform) { this.waveform = waveform; vOffset=0; diff --git a/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java b/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java index 7ceb08d..ff4104a 100644 --- a/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java +++ b/com.minres.scviewer.database/src/com/minres/scviewer/database/BitVector.java @@ -63,4 +63,49 @@ public class BitVector { } return new String(res); } + + public long toUnsignedValue() { + long res = 0; + for(char c:value) { + res<<=1; + switch (c) { + case VALUE_1: + res++; + break; + case VALUE_X: + case VALUE_Z: + return 0; + default: + break; + } + } + return res; + } + + public long toSignedValue() { + Boolean negative=null; + long res = 0; + for(char c:value) { + if(negative == null) { + switch (c) { + case VALUE_1: negative=true; break; + case VALUE_0: negative=false; break; + case VALUE_X: + case VALUE_Z: return 0; + default: + } + } else { + res<<=1; + switch (c) { + case VALUE_1: if(!negative) res++; break; + case VALUE_0: if(negative) res++; break; + case VALUE_X: + case VALUE_Z: return 0; + default: + } + } + } + return negative?-1*(res+1):res; + } } + diff --git a/com.minres.scviewer.e4.application/Application.e4xmi b/com.minres.scviewer.e4.application/Application.e4xmi index 6035d3a..c596fb4 100644 --- a/com.minres.scviewer.e4.application/Application.e4xmi +++ b/com.minres.scviewer.e4.application/Application.e4xmi @@ -142,7 +142,7 @@ - + @@ -171,6 +171,8 @@ + + @@ -204,41 +206,51 @@ - + + + + + - - - - - + + + + + - - - + + + - + - + - + - + - + - + + + + + + + diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java index d5d9193..a08f31c 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java @@ -1,34 +1,44 @@ package com.minres.scviewer.e4.application.elements; +import java.util.Iterator; import java.util.List; import javax.inject.Inject; -import org.eclipse.e4.ui.di.AboutToShow; +import org.eclipse.e4.core.di.annotations.Evaluate; import org.eclipse.e4.ui.di.AboutToHide; +import org.eclipse.e4.ui.di.AboutToShow; +import org.eclipse.e4.ui.model.application.MApplication; +import org.eclipse.e4.ui.model.application.commands.MCommand; +import org.eclipse.e4.ui.model.application.commands.MCommandsFactory; +import org.eclipse.e4.ui.model.application.commands.MParameter; import org.eclipse.e4.ui.model.application.ui.basic.MPart; -import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; +import org.eclipse.e4.ui.model.application.ui.menu.ItemType; +import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement; import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; +import org.eclipse.e4.ui.workbench.modeling.EModelService; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import com.minres.scviewer.database.ISignal; import com.minres.scviewer.database.ISignalChange; -import com.minres.scviewer.database.ISignalChangeBit; import com.minres.scviewer.database.ISignalChangeBitVector; import com.minres.scviewer.database.ISignalChangeReal; -import com.minres.scviewer.database.ui.GotoDirection; +import com.minres.scviewer.database.ui.TrackEntry; +import com.minres.scviewer.database.ui.TrackEntry.ValueDisplay; import com.minres.scviewer.e4.application.parts.WaveformViewer; public class WaveformPopupMenuContribution { int counter=0; @Inject MPart activePart; + + final TrackEntry nullEntry = new TrackEntry(null); - @AboutToShow - public void aboutToShow(List items) { + @Evaluate + public boolean evaluate() { Object obj = activePart.getObject(); if(obj instanceof WaveformViewer){ WaveformViewer wfv = (WaveformViewer)obj; @@ -37,27 +47,82 @@ public class WaveformPopupMenuContribution { Object selected = ((IStructuredSelection)sel).getFirstElement(); if(selected instanceof ISignal) { ISignalChange s = (ISignalChange) ((ISignal) selected).getEvents().firstEntry().getValue(); - if(s instanceof ISignalChangeReal) { - MDirectMenuItem mdi = MMenuFactory.INSTANCE.createDirectMenuItem(); - mdi.setLabel("Analog linear"); - items.add(mdi); - mdi = MMenuFactory.INSTANCE.createDirectMenuItem(); - mdi.setLabel("Analog step"); - items.add(mdi); - } else if(s instanceof ISignalChangeBitVector) { - MDirectMenuItem mdi = MMenuFactory.INSTANCE.createDirectMenuItem(); - mdi.setLabel("Analog linear"); - items.add(mdi); - mdi = MMenuFactory.INSTANCE.createDirectMenuItem(); - mdi.setLabel("Analog step"); - items.add(mdi); + if((s instanceof ISignalChangeReal) || (s instanceof ISignalChangeBitVector)) { + return true; + } + } + } + } + return false; + } + + @AboutToShow + public void aboutToShow(List items, MApplication application, EModelService modelService) { + Object obj = activePart.getObject(); + if(obj instanceof WaveformViewer){ + WaveformViewer wfv = (WaveformViewer)obj; + ISelection sel = wfv.getSelection(); + if(!sel.isEmpty() && sel instanceof IStructuredSelection) { + Iterator it = ((IStructuredSelection)sel).iterator(); + Object first = it.next(); + Object second=null; + if(it.hasNext()) second=it.next(); + if(first instanceof ISignal) { + ISignalChange s = (ISignalChange) ((ISignal) first).getEvents().firstEntry().getValue(); + //com.minres.scviewer.e4.application.menu.mulitvaluesettings + if((s instanceof ISignalChangeReal) || (s instanceof ISignalChangeBitVector)) { + TrackEntry entry=nullEntry; + if(second instanceof TrackEntry) + entry=(TrackEntry)second; + if(s instanceof ISignalChangeBitVector) { + addValueMenuItem(items, application, modelService, "hex", TrackEntry.ValueDisplay.DEFAULT, entry.valueDisplay); + addValueMenuItem(items, application, modelService, "unsigned", TrackEntry.ValueDisplay.UNSIGNED, entry.valueDisplay); + addValueMenuItem(items, application, modelService, "signed", TrackEntry.ValueDisplay.SIGNED, entry.valueDisplay); + items.add(MMenuFactory.INSTANCE.createMenuSeparator()); + addWaveMenuItem(items, application, modelService, "bit vector", TrackEntry.WaveDisplay.DEFAULT, entry.waveDisplay); + } + addWaveMenuItem(items, application, modelService, "analog step-wise", TrackEntry.WaveDisplay.STEP_WISE, entry.waveDisplay); + addWaveMenuItem(items, application, modelService, "analog continous", TrackEntry.WaveDisplay.CONTINOUS, entry.waveDisplay); } } } } } + + private void addValueMenuItem(List items, MApplication application, EModelService modelService, + String label, TrackEntry.ValueDisplay value, TrackEntry.ValueDisplay actual) { + MHandledMenuItem item = MMenuFactory.INSTANCE.createHandledMenuItem(); + item.setType(ItemType.RADIO); + item.setSelected(value==actual); + item.setLabel("Show as "+label); + item.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application"); + List cmds = modelService.findElements(application, "com.minres.scviewer.e4.application.command.changevaluedisplay", MCommand.class, null); + if(cmds.size()!=1) System.err.println("No command found!"); + else item.setCommand(cmds.get(0)); + MParameter param = MCommandsFactory.INSTANCE.createParameter(); + param.setName("com.minres.scviewer.e4.application.commandparameter.changevaluedisplay"); + param.setValue(value.toString()); + item.getParameters().add(param); + items.add(item); + } + private void addWaveMenuItem(List items, MApplication application, EModelService modelService, + String label, TrackEntry.WaveDisplay value, TrackEntry.WaveDisplay actual) { + MHandledMenuItem item = MMenuFactory.INSTANCE.createHandledMenuItem(); + item.setType(ItemType.RADIO); + item.setSelected(value==actual); + item.setLabel("Render "+label); + item.setContributorURI("platform:/plugin/com.minres.scviewer.e4.application"); + List cmds = modelService.findElements(application, "com.minres.scviewer.e4.application.command.changewavedisplay", MCommand.class, null); + if(cmds.size()!=1) System.err.println("No command found!"); + else item.setCommand(cmds.get(0)); + MParameter param = MCommandsFactory.INSTANCE.createParameter(); + param.setName("com.minres.scviewer.e4.application.commandparameter.changewavedisplay"); + param.setValue(value.toString()); + item.getParameters().add(param); + items.add(item); + } @AboutToHide public void aboutToHide(List items) { diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java index 440b272..f7f4d7e 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java @@ -10,6 +10,8 @@ *******************************************************************************/ package com.minres.scviewer.e4.application.handlers; +import javax.inject.Named; + import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.ui.model.application.MApplication; import org.eclipse.e4.ui.model.application.ui.basic.MDialog; @@ -19,9 +21,11 @@ import org.eclipse.swt.widgets.Shell; public class AboutHandler { + static final String DIALOG_ID="com.minres.scviewer.e4.application.dialog.aboutscviewer"; + @Execute public void execute(Shell shell, MApplication app, MWindow window, EModelService ms /*@Named("mdialog01.dialog.0") MDialog dialog*/) { - MDialog dialog = (MDialog) ms.find("com.minres.scviewer.e4.application.dialog.aboutscviewer", app); //$NON-NLS-1$ + MDialog dialog = (MDialog) ms.find(DIALOG_ID, app); //$NON-NLS-1$ dialog.setToBeRendered(true); dialog.setToBeRendered(false); } diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ChangeValueDisplay.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ChangeValueDisplay.java new file mode 100644 index 0000000..caaf007 --- /dev/null +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ChangeValueDisplay.java @@ -0,0 +1,51 @@ + +package com.minres.scviewer.e4.application.handlers; + +import java.util.Iterator; + +import javax.inject.Named; + +import org.eclipse.e4.core.di.annotations.CanExecute; +import org.eclipse.e4.core.di.annotations.Execute; +import org.eclipse.e4.ui.model.application.ui.basic.MPart; +import org.eclipse.e4.ui.workbench.modeling.EPartService; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; + +import com.minres.scviewer.database.ui.TrackEntry; +import com.minres.scviewer.e4.application.parts.WaveformViewer; + +public class ChangeValueDisplay { + + static final String PARAMETER_ID="com.minres.scviewer.e4.application.commandparameter.changevaluedisplay"; //$NON-NLS-1$ + + @CanExecute + public boolean canExecute(EPartService partService) { + MPart part = partService.getActivePart(); + if(part==null) return false; + return (part.getObject() instanceof WaveformViewer); + } + + @Execute + public void execute(@Named(PARAMETER_ID) String param, EPartService partService) { + MPart part = partService.getActivePart(); + Object obj = part.getObject(); + if(obj instanceof WaveformViewer){ + WaveformViewer wfv = (WaveformViewer)obj; + ISelection sel = wfv.getSelection(); + if(!sel.isEmpty() && sel instanceof IStructuredSelection) { + Iterator it = ((IStructuredSelection)sel).iterator(); + it.next(); + if(it.hasNext()) { + Object second = it.next(); + if(second instanceof TrackEntry) { + TrackEntry.ValueDisplay val = TrackEntry.ValueDisplay.valueOf(param); + ((TrackEntry)second).valueDisplay=val; + wfv.update(); + } + } + } + } + } + +} \ No newline at end of file diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ChangeWaveformDisplay.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ChangeWaveformDisplay.java new file mode 100644 index 0000000..c4af6c0 --- /dev/null +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/ChangeWaveformDisplay.java @@ -0,0 +1,51 @@ + +package com.minres.scviewer.e4.application.handlers; + +import java.util.Iterator; + +import javax.inject.Named; + +import org.eclipse.e4.core.di.annotations.CanExecute; +import org.eclipse.e4.core.di.annotations.Execute; +import org.eclipse.e4.ui.model.application.ui.basic.MPart; +import org.eclipse.e4.ui.workbench.modeling.EPartService; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; + +import com.minres.scviewer.database.ui.TrackEntry; +import com.minres.scviewer.e4.application.parts.WaveformViewer; + +public class ChangeWaveformDisplay { + + static final String PARAMETER_ID="com.minres.scviewer.e4.application.commandparameter.changewavedisplay"; //$NON-NLS-1$ + + @CanExecute + public boolean canExecute(EPartService partService) { + MPart part = partService.getActivePart(); + if(part==null) return false; + return (part.getObject() instanceof WaveformViewer); + } + + @Execute + public void execute(@Named(PARAMETER_ID) String param, EPartService partService) { + MPart part = partService.getActivePart(); + Object obj = part.getObject(); + if(obj instanceof WaveformViewer){ + WaveformViewer wfv = (WaveformViewer)obj; + ISelection sel = wfv.getSelection(); + if(!sel.isEmpty() && sel instanceof IStructuredSelection) { + Iterator it = ((IStructuredSelection)sel).iterator(); + it.next(); + if(it.hasNext()) { + Object second = it.next(); + if(second instanceof TrackEntry) { + TrackEntry.WaveDisplay val= TrackEntry.WaveDisplay.valueOf(param); + ((TrackEntry)second).waveDisplay=val; + wfv.update(); + } + } + } + } + } + +} \ No newline at end of file diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index 928de0f..9b76489 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -744,7 +744,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis //FIXME: need to use unitString and unitMultiplier from class WaveformCanvas which is located in >com.minres.scviewer.database.swt.internal. //Trying to import com.minres.scviewer.database.swt.internal.WaveformCanvas results in the error: //'Access restriction: The type 'WaveformCanvas' is not API (restriction on required project 'com.minres.scviewer.database.ui.swt')'. - public final static String[] unitString={"fs", "ps", "ns", "µs", "ms"};//, "s"}; + public final static String[] unitString={"fs", "ps", "ns", "�s", "ms"};//, "s"}; public final static int[] unitMultiplier={1, 3, 10, 30, 100, 300}; /** @@ -919,5 +919,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis if(navigationRelationType!=relationType) waveformPane.setHighliteRelation(relationType); navigationRelationType=relationType; } + + public void update() { + waveformPane.update(); + } } \ No newline at end of file From dba8b2731d333a4c72b006e522b611d1a0a00e16 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 14 Oct 2018 17:30:37 +0200 Subject: [PATCH 14/16] Added keyboard navigation to scroll, move selection, move selected and zoom --- .../database/swt/internal/WaveformCanvas.java | 40 +++++- .../database/swt/internal/WaveformViewer.java | 110 ++++++++++----- .../scviewer/database/ui/IWaveformViewer.java | 2 + .../e4/application/parts/WaveformViewer.java | 125 ++++++++++++++++++ 4 files changed, 243 insertions(+), 34 deletions(-) diff --git a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformCanvas.java b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformCanvas.java index 815ae84..430e5b7 100644 --- a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformCanvas.java +++ b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformCanvas.java @@ -42,6 +42,7 @@ import com.minres.scviewer.database.IWaveform; import com.minres.scviewer.database.IWaveformEvent; import com.minres.scviewer.database.RelationType; import com.minres.scviewer.database.ui.IWaveformViewer; +import com.minres.scviewer.database.ui.TrackEntry; import com.minres.scviewer.database.ui.WaveformColors; public class WaveformCanvas extends Canvas { @@ -181,6 +182,9 @@ public class WaveformCanvas extends Canvas { return origin; } + public int getWidth() { + return getClientArea().width; + } public void setOrigin(Point origin) { setOrigin(origin.x, origin.y); } @@ -292,9 +296,13 @@ public class WaveformCanvas extends Canvas { } public void addWaveformPainter(IWaveformPainter painter) { + addWaveformPainter(painter, true); + } + + void addWaveformPainter(IWaveformPainter painter, boolean update) { trackAreaPainter.addTrackPainter(painter); wave2painterMap.put(painter.getTrackEntry().waveform, painter); - syncScrollBars(); + if(update) syncScrollBars(); } public List getCursorPainters() { @@ -311,7 +319,7 @@ public class WaveformCanvas extends Canvas { super.dispose(); } - /* Initalize the scrollbar and register listeners. */ + /* Initialize the scrollbar and register listeners. */ private void initScrollBars() { ScrollBar horizontal = getHorizontalBar(); horizontal.setEnabled(false); @@ -469,6 +477,27 @@ public class WaveformCanvas extends Canvas { } } + public void reveal(IWaveform waveform) { + for (IWaveformPainter painter : wave2painterMap.values()) { + TrackEntry te = painter.getTrackEntry(); + if(te.waveform == waveform) { + Point size = getSize(); + //size.x -= getVerticalBar().getSize().x + 2; + size.y -=+rulerHeight; + ScrollBar sb = getHorizontalBar(); + if((sb.getStyle()&SWT.SCROLLBAR_OVERLAY)!=0 && sb.isVisible()) // TODO: check on other platform than MacOSX + size.y-= getHorizontalBar().getSize().y; + int top = te.vOffset; + int bottom = top + trackHeight; + if (top < -origin.y) { + setOrigin(origin.x, -(top-trackHeight)); + } else if (bottom > (size.y - origin.y)) { + setOrigin(origin.x, size.y - bottom); + } + } + } + } + public void reveal(long time) { int scaledTime = (int) (time / scaleFactor); Point size = getSize(); @@ -513,4 +542,11 @@ public class WaveformCanvas extends Canvas { } } + long getMaxVisibleTime() { + return (getClientArea().width+origin.x)*scaleFactor; + } + + long getOriginTime() { + return origin.x * scaleFactor; + } } diff --git a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java index 139e26f..d39f065 100644 --- a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java +++ b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/WaveformViewer.java @@ -66,6 +66,7 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.ScrollBar; +import org.eclipse.swt.widgets.Widget; import org.eclipse.wb.swt.SWTResourceManager; import com.google.common.collect.Lists; @@ -109,6 +110,8 @@ public class WaveformViewer implements IWaveformViewer { final WaveformCanvas waveformCanvas; + private boolean revealSelected=false; + private Composite top; protected ObservableList streams; @@ -142,12 +145,10 @@ public class WaveformViewer implements IWaveformViewer { @Override public void mouseDown(MouseEvent e) { start=new Point(e.x, e.y); + if((e.stateMask&SWT.MODIFIER_MASK)!=0) return; //don't react on modifier if (e.button == 1) { initialSelected = waveformCanvas.getClicked(start); } else if (e.button == 3) { - List hitted = waveformCanvas.getClicked(start); - if(hitted!=null && hitted.size()>0) - setSelection(new StructuredSelection(hitted)); Menu topMenu= top.getMenu(); if(topMenu!=null) topMenu.setVisible(true); } @@ -155,29 +156,18 @@ public class WaveformViewer implements IWaveformViewer { @Override public void mouseUp(MouseEvent e) { - if (e.button == 1) { + if((e.stateMask&SWT.MODIFIER_MASK&~SWT.SHIFT)!=0) return; //don't react on modifier + if (e.button == 1 && ((e.stateMask&SWT.SHIFT)==0)) { if(Math.abs(e.x-start.x)<3 && Math.abs(e.y-start.y)<3){ - // first set time + // first set cursor time setCursorTime(snapOffsetToEvent(e)); // then set selection and reveal setSelection(new StructuredSelection(initialSelected)); - e.widget.getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - waveformCanvas.redraw(); - updateValueList(); - } - }); + asyncUpdate(e.widget); } - }else if (e.button == 2) { + }else if (e.button == 2 ||(e.button==1 && (e.stateMask&SWT.SHIFT)!=0)) { setMarkerTime(snapOffsetToEvent(e), selectedMarker); - e.widget.getDisplay().asyncExec(new Runnable() { - @Override - public void run() { - waveformCanvas.redraw(); - updateValueList(); - } - }); + asyncUpdate(e.widget); } } @@ -378,6 +368,18 @@ public class WaveformViewer implements IWaveformViewer { @Override public void propertyChange(PropertyChangeEvent pce) { if ("size".equals(pce.getPropertyName()) || "content".equals(pce.getPropertyName())) { + if(revealSelected) { + waveformCanvas.getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + update(); + waveformCanvas.reveal(currentWaveformSelection.waveform); + valueList.redraw(); + nameList.redraw(); + } + }); + revealSelected=false; + } else waveformCanvas.getDisplay().asyncExec(new Runnable() { @Override public void run() { @@ -410,13 +412,14 @@ public class WaveformViewer implements IWaveformViewer { streamEntry.currentValue="---"; painter = new SignalPainter(waveformCanvas, even, streamEntry); } - waveformCanvas.addWaveformPainter(painter); + waveformCanvas.addWaveformPainter(painter, false); trackVerticalOffset.put(trackVerticalHeight, streamEntry); tl.setText(streamEntry.waveform.getFullName()); nameMaxWidth = Math.max(nameMaxWidth, tl.getBounds().width); trackVerticalHeight += streamEntry.height; even = !even; } + waveformCanvas.syncScrollBars(); nameList.setSize(nameMaxWidth + 15, trackVerticalHeight); nameListScrolled.setMinSize(nameMaxWidth + 15, trackVerticalHeight); valueList.setSize(calculateValueWidth(), trackVerticalHeight); @@ -566,9 +569,10 @@ public class WaveformViewer implements IWaveformViewer { */ @Override public ISelection getSelection() { - if (currentTxSelection != null) - return new StructuredSelection(currentTxSelection); - else if (currentWaveformSelection != null) { + if (currentTxSelection != null) { + Object[] elem = {currentTxSelection, currentWaveformSelection}; + return new StructuredSelection(elem); + } else if (currentWaveformSelection != null) { Object[] elem = {currentWaveformSelection.waveform, currentWaveformSelection}; return new StructuredSelection(elem); } else @@ -611,6 +615,7 @@ public class WaveformViewer implements IWaveformViewer { currentWaveformSelection = (TrackEntry) sel; if(currentTxSelection!=null && currentTxSelection.getStream()!=currentWaveformSelection) currentTxSelection=null; + selectionChanged = true; } } @@ -623,6 +628,7 @@ public class WaveformViewer implements IWaveformViewer { } if(currentWaveformSelection!=null) currentWaveformSelection.selected=true; if (selectionChanged) { + waveformCanvas.reveal(currentWaveformSelection.waveform); waveformCanvas.setSelected(currentTxSelection); valueList.redraw(); nameList.redraw(); @@ -646,7 +652,16 @@ public class WaveformViewer implements IWaveformViewer { */ @Override public void moveSelection(GotoDirection direction) { - moveSelection(direction, NEXT_PREV_IN_STREAM) ; + if(direction==GotoDirection.NEXT || direction==GotoDirection.PREV) + moveSelection(direction, NEXT_PREV_IN_STREAM) ; + else { + int idx = streams.indexOf(currentWaveformSelection); + if(direction==GotoDirection.UP && idx>0) { + setSelection(new StructuredSelection(streams.get(idx-1))); + } else if(direction==GotoDirection.DOWN && idx<(streams.size()-1)) { + setSelection(new StructuredSelection(streams.get(idx+1))); + } + } } /* (non-Javadoc) @@ -776,17 +791,21 @@ public class WaveformViewer implements IWaveformViewer { @Override public void moveSelectedTrack(int i) { if(currentWaveformSelection!=null){ - ITx selectedTx=currentTxSelection; - TrackEntry selectedWaveform=currentWaveformSelection; int idx = streams.indexOf(currentWaveformSelection); int newIdx=idx+i; if(newIdx>=0 && newIdx100) percent=100; + int diff = (waveformCanvas.getWidth()*percent)/100; +// ScrollBar sb = waveformCanvas.getHorizontalBar(); +// int x = sb.getSelection(); +// System.out.println("Setting sb to "+ (x+diff)); +// if((x+diff)>0) +// sb.setSelection(x+diff); +// else +// sb.setSelection(0); + Point o = waveformCanvas.getOrigin(); + waveformCanvas.setOrigin(o.x-diff, o.y); + waveformCanvas.redraw(); + } + + public void asyncUpdate(Widget widget) { + widget.getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + waveformCanvas.redraw(); + updateValueList(); + } + }); + } } diff --git a/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/IWaveformViewer.java b/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/IWaveformViewer.java index 7f4bd6a..5a4f967 100644 --- a/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/IWaveformViewer.java +++ b/com.minres.scviewer.database.ui/src/com/minres/scviewer/database/ui/IWaveformViewer.java @@ -102,4 +102,6 @@ public interface IWaveformViewer extends PropertyChangeListener, ISelectionProvi public long getBaselineTime(); public void setBaselineTime(Long scale); + + public void scrollHorizontal(int percent); } \ No newline at end of file diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index 9b76489..7b8ad35 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -32,6 +32,7 @@ import javax.inject.Named; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.jobs.IJobChangeEvent; @@ -56,12 +57,23 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.KeyAdapter; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.KeyListener; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.MouseTrackListener; +import org.eclipse.swt.events.MouseWheelListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; import com.minres.scviewer.database.ITx; import com.minres.scviewer.database.ITxRelation; @@ -237,6 +249,117 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis selectionService.setSelection(event.getSelection()); } }); + waveformPane.getWaveformControl().addMouseTrackListener(new MouseTrackListener() { + + @Override + public void mouseHover(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseExit(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseEnter(MouseEvent e) { + // TODO Auto-generated method stub + + } + }); + + waveformPane.getWaveformControl().addMouseWheelListener(new MouseWheelListener() { + + @Override + public void mouseScrolled(MouseEvent e) { + // TODO Auto-generated method stub + + } + }); + + waveformPane.getWaveformControl().addListener(SWT.KeyDown, new Listener() { + + @Override + public void handleEvent(Event e) { + int state = e.stateMask & SWT.MODIFIER_MASK; + if(Platform.OS_MACOSX.equals(Platform.getOS())) { //swap cammnd and control for MacOSX + if((state&SWT.COMMAND)!=0) { + state&=~SWT.COMMAND; + state|=SWT.CONTROL; + } else if((state&SWT.CONTROL)!=0) { + state&=~SWT.CONTROL; + state|=SWT.COMMAND; + } + } + if(state==SWT.ALT) { + switch(e.keyCode) { + case SWT.ARROW_LEFT: + waveformPane.scrollHorizontal(-100); + return; + case SWT.ARROW_RIGHT: + waveformPane.scrollHorizontal(100); + return; + case SWT.KEYPAD_ADD: + return; + case SWT.KEYPAD_SUBTRACT: + return; + } + } else if(state==SWT.CTRL) { + int zoomlevel = waveformPane.getZoomLevel(); + switch(e.keyCode) { + case '+': + case SWT.KEYPAD_ADD: + if(zoomlevel>0) + waveformPane.setZoomLevel(zoomlevel-1); + return; + case '-': + case SWT.KEYPAD_SUBTRACT: + if(zoomlevel cursors = waveformPane.getCursorList(); From e41b7e25ed445f419d9f4dd174cd1477b1089687 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 14 Oct 2018 20:44:17 +0200 Subject: [PATCH 15/16] Updated reading/writing of scview files, added command line argument to load config file --- .../scviewer/e4/application/E4LifeCycle.java | 25 +- .../e4/application/options/OptionData.java | 275 +++++++ .../e4/application/options/OptionSet.java | 276 +++++++ .../e4/application/options/Options.java | 768 ++++++++++++++++++ .../e4/application/parts/WaveformViewer.java | 57 +- 5 files changed, 1369 insertions(+), 32 deletions(-) create mode 100644 com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/OptionData.java create mode 100644 com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/OptionSet.java create mode 100644 com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/Options.java diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java index 07d2a46..707989f 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java @@ -33,6 +33,10 @@ import org.eclipse.equinox.app.IApplicationContext; import org.osgi.service.event.Event; import org.osgi.service.event.EventHandler; +import com.minres.scviewer.e4.application.options.Options; +import com.minres.scviewer.e4.application.options.Options.Multiplicity; +import com.minres.scviewer.e4.application.options.Options.Separator; + /** * This implementation contains e4 LifeCycle annotated methods.
* There is a corresponding entry in plugin.xml (under the @@ -59,7 +63,14 @@ public class E4LifeCycle { */ @PostContextCreate void postContextCreate(IApplicationContext appContext, final IEventBroker eventBroker) { - final String[] args = (String[])appContext.getArguments().get(IApplicationContext.APPLICATION_ARGS); + final String[] args = (String[])appContext.getArguments().get(IApplicationContext.APPLICATION_ARGS); + Options opt = new Options(args, 1); + opt.getSet().addOption("c", Separator.BLANK, Multiplicity.ONCE); + if (!opt.check(Options.DEFAULT_SET, true, true)) { + System.exit(1); + } + final String confFile =opt.getSet().isSet("c")?opt.getSet().getOption("c").getResultValue(0):""; + // react on the first view being created, at that time the UI is available eventBroker.subscribe(UIEvents.UILifeCycle.ACTIVATE, new EventHandler() { @Override @@ -68,9 +79,10 @@ public class E4LifeCycle { if(part!=null){ IEclipseContext ctx = part.getContext(); OpenViewHandler openViewHandler= new OpenViewHandler(); + if(confFile.length()>0) openViewHandler.setConfigFile(confFile); ContextInjectionFactory.inject(openViewHandler, ctx); eventBroker.unsubscribe(this); - for(String name:args){ + for(String name:opt.getSet().getData()){ if(new File(name).exists()) openViewHandler.openViewForFile(name); } } @@ -136,6 +148,7 @@ public class E4LifeCycle { /** The part service. */ @Inject EPartService partService; + String confFile=""; /** * Open view for file. * @@ -150,7 +163,13 @@ public class E4LifeCycle { partService.showPart(part, PartState.ACTIVATE); IEclipseContext ctx=part.getContext(); ctx.modify("input", file); //$NON-NLS-1$ - ctx.declareModifiable("input"); //$NON-NLS-1$ + //ctx.declareModifiable("input"); //$NON-NLS-1$ + ctx.modify("config", confFile); //$NON-NLS-1$ + //ctx.declareModifiable("config"); //$NON-NLS-1$ + } + + public void setConfigFile(String confFile) { + this.confFile=confFile; } } } diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/OptionData.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/OptionData.java new file mode 100644 index 0000000..e1218c8 --- /dev/null +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/OptionData.java @@ -0,0 +1,275 @@ +package com.minres.scviewer.e4.application.options; + +/** + * This class holds all the data for an option. This includes the prefix, the key, the separator + * (for value options), the multiplicity, and all the other settings describing the option. The class + * is designed to be only a data container from a user perspective, i. e. the user has read-access to + * any data determined by the {@link Options#check()}, but not access to any of the other methods + * which are used internally for the operation of the actual check. + */ + +public class OptionData { + + private final static String CLASS = "OptionData"; + + private Options.Prefix prefix = null; + private String key = null; + private boolean detail = false; + private Options.Separator separator = null; + private boolean value = false; + private Options.Multiplicity multiplicity = null; + private java.util.regex.Pattern pattern = null; + private int counter = 0; + private java.util.ArrayList values = null; + private java.util.ArrayList details = null; + +/** + * The constructor + */ + + OptionData(Options.Prefix prefix, + String key, + boolean detail, + Options.Separator separator, + boolean value, + Options.Multiplicity multiplicity) { + + if (prefix == null) throw new IllegalArgumentException(CLASS + ": prefix may not be null"); + if (key == null) throw new IllegalArgumentException(CLASS + ": key may not be null"); + if (separator == null) throw new IllegalArgumentException(CLASS + ": separator may not be null"); + if (multiplicity == null) throw new IllegalArgumentException(CLASS + ": multiplicity may not be null"); + +//.... The data describing the option + + this.prefix = prefix; + this.key = key; + this.detail = detail; + this.separator = separator; + this.value = value; + this.multiplicity = multiplicity; + +//.... Create the pattern to match this option + + if (value) { + if (separator == Options.Separator.BLANK) { + if (detail) { + pattern = java.util.regex.Pattern.compile(prefix.getName() + key + "((\\w|\\.)+)$"); + } else { + pattern = java.util.regex.Pattern.compile(prefix.getName() + key + "$"); + } + } else { + if (detail) { + pattern = java.util.regex.Pattern.compile(prefix.getName() + key + "((\\w|\\.)+)" + separator.getName() + "(.+)$"); + } else { + pattern = java.util.regex.Pattern.compile(prefix.getName() + key + separator.getName() + "(.+)$"); + } + } + } else { + pattern = java.util.regex.Pattern.compile(prefix.getName() + key + "$"); + } + +//.... Structures to hold result data + + if (value) { + values = new java.util.ArrayList(); + if (detail) + details = new java.util.ArrayList(); + } + + } + +/** + * Getter method for prefix property + *

+ * @return The value for the prefix property + */ + + Options.Prefix getPrefix() { + return prefix; + } + +/** + * Getter method for key property + *

+ * @return The value for the key property + */ + + String getKey() { + return key; + } + +/** + * Getter method for detail property + *

+ * @return The value for the detail property + */ + + boolean useDetail() { + return detail; + } + +/** + * Getter method for separator property + *

+ * @return The value for the separator property + */ + + Options.Separator getSeparator() { + return separator; + } + +/** + * Getter method for value property + *

+ * @return The value for the value property + */ + + boolean useValue() { + return value; + } + +/** + * Getter method for multiplicity property + *

+ * @return The value for the multiplicity property + */ + + Options.Multiplicity getMultiplicity() { + return multiplicity; + } + +/** + * Getter method for pattern property + *

+ * @return The value for the pattern property + */ + + java.util.regex.Pattern getPattern() { + return pattern; + } + +/** + * Get the number of results found for this option, which is number of times the key matched + *

+ * @return The number of results + */ + + public int getResultCount() { + if (value) { + return values.size(); + } else { + return counter; + } + } + +/** + * Get the value with the given index. The index can range between 0 and {@link #getResultCount()} - 1. + * However, only for value options, a non-null value will be returned. Non-value options always + * return null. + *

+ * @param index The index for the desired value + *

+ * @return The option value with the given index + *

+ * @throws IllegalArgumentException If the value for index is out of bounds + */ + + public String getResultValue(int index) { + if (!value) return null; + if (index < 0 || index >= getResultCount()) throw new IllegalArgumentException(CLASS + ": illegal value for index"); + return values.get(index); + } + +/** + * Get the detail with the given index. The index can range between 0 and {@link #getResultCount()} - 1. + * However, only for value options which take details, a non-null detail will be returned. Non-value options + * and value options which do not take details always return null. + *

+ * @param index The index for the desired value + *

+ * @return The option detail with the given index + *

+ * @throws IllegalArgumentException If the value for index is out of bounds + */ + + public String getResultDetail(int index) { + if (!detail) return null; + if (index < 0 || index >= getResultCount()) throw new IllegalArgumentException(CLASS + ": illegal value for index"); + return details.get(index); + } + +/** + * Store the data for a match found + */ + + void addResult(String valueData, String detailData) { + if (value) { + if (valueData == null) throw new IllegalArgumentException(CLASS + ": valueData may not be null"); + values.add(valueData); + if (detail) { + if (detailData == null) throw new IllegalArgumentException(CLASS + ": detailData may not be null"); + details.add(detailData); + } + } + counter++; + } + +/** + * This is the overloaded {@link Object#toString()} method, and it is provided mainly for debugging + * purposes. + *

+ * @return A string representing the instance + */ + + public String toString() { + + StringBuffer sb = new StringBuffer(); + + sb.append("Prefix : "); + sb.append(prefix); + sb.append('\n'); + sb.append("Key : "); + sb.append(key); + sb.append('\n'); + sb.append("Detail : "); + sb.append(detail); + sb.append('\n'); + sb.append("Separator : "); + sb.append(separator); + sb.append('\n'); + sb.append("Value : "); + sb.append(value); + sb.append('\n'); + sb.append("Multiplicity: "); + sb.append(multiplicity); + sb.append('\n'); + sb.append("Pattern : "); + sb.append(pattern); + sb.append('\n'); + + sb.append("Results : "); + sb.append(counter); + sb.append('\n'); + if (value) { + if (detail) { + for (int i = 0; i < values.size(); i++) { + sb.append(details.get(i)); + sb.append(" / "); + sb.append(values.get(i)); + sb.append('\n'); + } + } else { + for (int i = 0; i < values.size(); i++) { + sb.append(values.get(i)); + sb.append('\n'); + } + } + } + + return sb.toString(); + + } + +} + + diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/OptionSet.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/OptionSet.java new file mode 100644 index 0000000..c320f61 --- /dev/null +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/OptionSet.java @@ -0,0 +1,276 @@ +package com.minres.scviewer.e4.application.options; + +/** + * This class holds the information for a set of options. A set can hold any number of + * OptionData instances which are checked together to determine success or failure. + *

+ * The approach to use this class looks like this: + *

+ *

    + *
  1. The user uses any of the Options.addSet() (e. g. {@link Options#addSet(String)}) to create + * any number of sets required (or just relies on the default set, if only one set is required) + *
  2. The user adds all required option definitions to each set + *
  3. Using any of the Options.check() methods, each set can be checked whether the options + * that were specified on the command line satisfy its requirements + *
  4. If the check was successful for a given set, several data items are available from this class: + *
      + *
    • All options defined for the set (through with e. g. values, details, and multiplicity are available) + *
    • All data items found (these are the items on the command line which do not start with the prefix, + * i. e. non-option arguments) + *
    • All unmatched arguments on the command line (these are the items on the command line which start + * with the prefix, but do not match to one of the options). + * Programs can elect to ignore these, or react with an error + *
    + *
+ */ + +public class OptionSet { + + private final static String CLASS = "OptionSet"; + + private java.util.ArrayList options = new java.util.ArrayList(); + private java.util.HashMap keys = new java.util.HashMap(); + private java.util.ArrayList unmatched = new java.util.ArrayList(); + private java.util.ArrayList data = new java.util.ArrayList(); + private String setName = null; + private int minData = 0; + private int maxData = 0; + private Options.Prefix prefix = null; + private Options.Multiplicity defaultMultiplicity = null; + +/** + * Constructor + */ + + OptionSet(Options.Prefix prefix, Options.Multiplicity defaultMultiplicity, String setName, int minData, int maxData) { + if (setName == null) throw new IllegalArgumentException(CLASS + ": setName may not be null"); + if (minData < 0) throw new IllegalArgumentException(CLASS + ": minData must be >= 0"); + if (maxData < minData) throw new IllegalArgumentException(CLASS + ": maxData must be >= minData"); + this.prefix = prefix; + this.defaultMultiplicity = defaultMultiplicity; + this.setName = setName; + this.minData = minData; + this.maxData = maxData; + } + +/** + * Get a list of all the options defined for this set + *

+ * @return A list of {@link OptionData} instances defined for this set + */ + + public java.util.ArrayList getOptionData() { + return options; + } + +/** + * Get the data for a specific option, identified by its key name (which is unique) + *

+ * @param key The key for the option + *

+ * @return The {@link OptionData} instance + *

+ * @throws IllegalArgumentException If the key is null or unknown in this set + */ + + public OptionData getOption(String key) { + if (key == null) throw new IllegalArgumentException(CLASS + ": key may not be null"); + if (!keys.containsKey(key)) throw new IllegalArgumentException(CLASS + ": unknown key: " + key); + return keys.get(key); + } + +/** + * Check whether a specific option is set, i. e. whether it was specified at least once on the command line. + *

+ * @param key The key for the option + *

+ * @return true or false, depending on the outcome of the check + *

+ * @throws IllegalArgumentException If the key is null or unknown in this set + */ + + public boolean isSet(String key) { + if (key == null) throw new IllegalArgumentException(CLASS + ": key may not be null"); + if (!keys.containsKey(key)) throw new IllegalArgumentException(CLASS + ": unknown key: " + key); + return keys.get(key).getResultCount() > 0 ? true : false; + } + +/** + * Getter method for setName property + *

+ * @return The value for the setName property + */ + + public String getSetName() { + return setName; + } + +/** + * Getter method for minData property + *

+ * @return The value for the minData property + */ + + public int getMinData() { + return minData; + } + +/** + * Getter method for maxData property + *

+ * @return The value for the maxData property + */ + + public int getMaxData() { + return maxData; + } + +/** + * Return the data items found (these are the items on the command line which do not start with the prefix, i. e. non-option arguments) + *

+ * @return A list of strings with all data items found + */ + + public java.util.ArrayList getData() { + return data; + } + +/** + * Return all unmatched items found (these are the items on the command line which start with the prefix, but do not + * match to one of the options) + *

+ * @return A list of strings with all unmatched items found + */ + + public java.util.ArrayList getUnmatched() { + return unmatched; + } + +/** + * Add a non-value option with the given key, and the default prefix and multiplicity + *

+ * @param key The key for the option + *

+ * @return The set instance itself (to support invocation chaining for addOption() methods) + *

+ * @throws IllegalArgumentException If the key is null or a key with this name has already been defined + */ + + public OptionSet addOption(String key) { + return addOption(key, defaultMultiplicity); + } + +/** + * Add a non-value option with the given key and multiplicity, and the default prefix + *

+ * @param key The key for the option + * @param multiplicity The multiplicity for the option + *

+ * @return The set instance itself (to support invocation chaining for addOption() methods) + *

+ * @throws IllegalArgumentException If the key is null or a key with this name has already been defined + * or if multiplicity is null + */ + + public OptionSet addOption(String key, Options.Multiplicity multiplicity) { + return addOption(key, false, Options.Separator.NONE, false, multiplicity); + } + +/** + * Add a value option with the given key and separator, no details, and the default prefix and multiplicity + *

+ * @param key The key for the option + * @param separator The separator for the option + *

+ * @return The set instance itself (to support invocation chaining for addOption() methods) + *

+ * @throws IllegalArgumentException If the key is null or a key with this name has already been defined + * or if separator is null + */ + + public OptionSet addOption(String key, Options.Separator separator) { + return addOption(key, false, separator, true, defaultMultiplicity); + } + +/** + * Add a value option with the given key, separator, and multiplicity, no details, and the default prefix + *

+ * @param key The key for the option + * @param separator The separator for the option + * @param multiplicity The multiplicity for the option + *

+ * @return The set instance itself (to support invocation chaining for addOption() methods) + *

+ * @throws IllegalArgumentException If the key is null or a key with this name has already been defined + * or if separator or multiplicity are null + */ + + public OptionSet addOption(String key, Options.Separator separator, Options.Multiplicity multiplicity) { + return addOption(key, false, separator, true, multiplicity); + } + +/** + * + * Add a value option with the given key and separator, possibly details, and the default prefix and multiplicity + *

+ * @param key The key for the option + * @param details A boolean indicating whether details are expected for the option + * @param separator The separator for the option + *

+ * @return The set instance itself (to support invocation chaining for addOption() methods) + *

+ * @throws IllegalArgumentException If the key is null or a key with this name has already been defined + * or if separator is null + */ + + public OptionSet addOption(String key, boolean details, Options.Separator separator) { + return addOption(key, details, separator, true, defaultMultiplicity); + } + +/** + * Add a value option with the given key, separator, and multiplicity, possibly details, and the default prefix + *

+ * @param key The key for the option + * @param details A boolean indicating whether details are expected for the option + * @param separator The separator for the option + * @param multiplicity The multiplicity for the option + *

+ * @return The set instance itself (to support invocation chaining for addOption() methods) + *

+ * @throws IllegalArgumentException If the key is null or a key with this name has already been defined + * or if separator or multiplicity are null + */ + + public OptionSet addOption(String key, boolean details, Options.Separator separator, Options.Multiplicity multiplicity) { + return addOption(key, details, separator, true, multiplicity); + } + +/** + * The master method to add an option. Since there are combinations which are not + * acceptable (like a NONE separator and a true value), this method is not public. + * Internally, we only supply acceptable combinations. + */ + + OptionSet addOption(String key, + boolean details, + Options.Separator separator, + boolean value, + Options.Multiplicity multiplicity) { + + if (key == null) throw new IllegalArgumentException(CLASS + ": key may not be null"); + if (multiplicity == null) throw new IllegalArgumentException(CLASS + ": multiplicity may not be null"); + if (separator == null) throw new IllegalArgumentException(CLASS + ": separator may not be null"); + if (keys.containsKey(key)) throw new IllegalArgumentException(CLASS + ": the key " + + key + " has already been defined for this OptionSet"); + + OptionData od = new OptionData(prefix, key, details, separator, value, multiplicity); + options.add(od); + keys.put(key, od); + + return this; + + } + +} + + diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/Options.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/Options.java new file mode 100644 index 0000000..b7e0282 --- /dev/null +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/Options.java @@ -0,0 +1,768 @@ +package com.minres.scviewer.e4.application.options; + +/** + * The central class for option processing. Sets are identified by their name, but there is also + * an anonymous default set, which is very convenient if an application requieres only one set. + */ + +public class Options { + + private final static String CLASS = "Options"; + +/** + * The name used internally for the default set + */ + + public final static String DEFAULT_SET = "DEFAULT_OPTION_SET"; + +/** + * An enum encapsulating the possible separators between value options and their actual values. + */ + + public enum Separator { + +/** + * Separate option and value by ":" + */ + + COLON(':'), + +/** + * Separate option and value by "=" + */ + + EQUALS('='), + +/** + * Separate option and value by blank space + */ + + BLANK(' '), // Or, more precisely, whitespace (as allowed by the CLI) + +/** + * This is just a placeholder in case no separator is required (i. e. for non-value options) + */ + + NONE('D'); // NONE is a placeholder in case no separator is required, 'D' is just an arbitrary dummy value + + private char c; + + private Separator(char c) { + this.c = c; + } + +/** + * Return the actual separator character + *

+ * @return The actual separator character + */ + + char getName() { + return c; + } + + } + +/** + * An enum encapsulating the possible prefixes identifying options (and separating them from command line data items) + */ + + public enum Prefix { + +/** + * Options start with a "-" (typically on Unix platforms) + */ + + DASH('-'), + +/** + * Options start with a "/" (typically on Windows platforms) + */ + + SLASH('/'); + + private char c; + + private Prefix(char c) { + this.c = c; + } + +/** + * Return the actual prefix character + *

+ * @return The actual prefix character + */ + + char getName() { + return c; + } + + } + +/** + * An enum encapsulating the possible multiplicities for options + */ + + public enum Multiplicity { + +/** + * Option needs to occur exactly once + */ + + ONCE, + +/** + * Option needs to occur at least once + */ + + ONCE_OR_MORE, + +/** + * Option needs to occur either once or not at all + */ + + ZERO_OR_ONE, + +/** + * Option can occur any number of times + */ + + ZERO_OR_MORE; + + } + + private java.util.HashMap optionSets = new java.util.HashMap(); + private Prefix prefix = null; + private Multiplicity defaultMultiplicity = null; + private String[] arguments = null; + private boolean ignoreUnmatched = false; + private int defaultMinData = 0; + private int defaultMaxData = 0; + private StringBuffer checkErrors = null; + +/** + * Constructor + *

+ * @param args The command line arguments to check + * @param prefix The prefix to use for all command line options. It can only be set here for all options at + * the same time + * @param defaultMultiplicity The default multiplicity to use for all options (can be overridden when adding an option) + * @param defMinData The default minimum number of data items for all sets (can be overridden when adding a set) + * @param defMaxData The default maximum number of data items for all sets (can be overridden when adding a set) + *

+ * @throws IllegalArgumentException If either args, prefix, or defaultMultiplicity + * is null - or if the data range values don't make sense + */ + + public Options(String args[], Prefix prefix, Multiplicity defaultMultiplicity, int defMinData, int defMaxData) { + + if (args == null) throw new IllegalArgumentException(CLASS + ": args may not be null"); + if (prefix == null) throw new IllegalArgumentException(CLASS + ": prefix may not be null"); + if (defaultMultiplicity == null) throw new IllegalArgumentException(CLASS + ": defaultMultiplicity may not be null"); + + if (defMinData < 0) throw new IllegalArgumentException(CLASS + ": defMinData must be >= 0"); + if (defMaxData < defMinData) throw new IllegalArgumentException(CLASS + ": defMaxData must be >= defMinData"); + + arguments = new String[args.length]; + int i = 0; + for (String s : args) + arguments[i++] = s; + + this.prefix = prefix; + this.defaultMultiplicity = defaultMultiplicity; + this.defaultMinData = defMinData; + this.defaultMaxData = defMaxData; + + } + +/** + * Constructor + *

+ * @param args The command line arguments to check + * @param prefix The prefix to use for all command line options. It can only be set here for all options at + * the same time + * @param defaultMultiplicity The default multiplicity to use for all options (can be overridden when adding an option) + * @param data The default minimum and maximum number of data items for all sets (can be overridden when adding a set) + *

+ * @throws IllegalArgumentException If either args, prefix, or defaultMultiplicity + * is null - or if the data range value doesn't make sense + */ + + public Options(String args[], Prefix prefix, Multiplicity defaultMultiplicity, int data) { + this(args, prefix, defaultMultiplicity, data, data); + } + +/** + * Constructor. The default number of data items is set to 0. + *

+ * @param args The command line arguments to check + * @param prefix The prefix to use for all command line options. It can only be set here for all options at + * the same time + * @param defaultMultiplicity The default multiplicity to use for all options (can be overridden when adding an option) + *

+ * @throws IllegalArgumentException If either args, prefix, or defaultMultiplicity + * is null + */ + + public Options(String args[], Prefix prefix, Multiplicity defaultMultiplicity) { + this(args, prefix, defaultMultiplicity, 0, 0); + } + +/** + * Constructor. The prefix is set to {@link Prefix#DASH}. + *

+ * @param args The command line arguments to check + * @param defaultMultiplicity The default multiplicity to use for all options (can be overridden when adding an option) + * @param defMinData The default minimum number of data items for all sets (can be overridden when adding a set) + * @param defMaxData The default maximum number of data items for all sets (can be overridden when adding a set) + *

+ * @throws IllegalArgumentException If either args or defaultMultiplicity + * is null - or if the data range values don't make sense + */ + + public Options(String args[], Multiplicity defaultMultiplicity, int defMinData, int defMaxData) { + this(args, Prefix.DASH, defaultMultiplicity, defMinData, defMaxData); + } + +/** + * Constructor. The prefix is set to {@link Prefix#DASH}. + *

+ * @param args The command line arguments to check + * @param defaultMultiplicity The default multiplicity to use for all options (can be overridden when adding an option) + * @param data The default minimum and maximum number of data items for all sets (can be overridden when adding a set) + *

+ * @throws IllegalArgumentException If either args or defaultMultiplicity + * is null - or if the data range value doesn't make sense + */ + + public Options(String args[], Multiplicity defaultMultiplicity, int data) { + this(args, Prefix.DASH, defaultMultiplicity, data, data); + } + +/** + * Constructor. The prefix is set to {@link Prefix#DASH}, and the default number of data items is set to 0. + *

+ * @param args The command line arguments to check + * @param defaultMultiplicity The default multiplicity to use for all options (can be overridden when adding an option) + *

+ * @throws IllegalArgumentException If either args or defaultMultiplicity + * is null + */ + + public Options(String args[], Multiplicity defaultMultiplicity) { + this(args, Prefix.DASH, defaultMultiplicity, 0, 0); + } + +/** + * Constructor. The prefix is set to {@link Prefix#DASH}, the default number of data items is set to 0, and + * the multiplicity is set to {@link Multiplicity#ONCE}. + *

+ * @param args The command line arguments to check + *

+ * @throws IllegalArgumentException If args is null + */ + + public Options(String args[]) { + this(args, Prefix.DASH, Multiplicity.ONCE); + } + +/** + * Constructor. The prefix is set to {@link Prefix#DASH}, and + * the multiplicity is set to {@link Multiplicity#ONCE}. + *

+ * @param args The command line arguments to check + * @param data The default minimum and maximum number of data items for all sets (can be overridden when adding a set) + *

+ * @throws IllegalArgumentException If args is null - or if the data range value doesn't make sense + */ + + public Options(String args[], int data) { + this(args, Prefix.DASH, Multiplicity.ONCE, data, data); + } + +/** + * Constructor. The prefix is set to {@link Prefix#DASH}, and + * the multiplicity is set to {@link Multiplicity#ONCE}. + *

+ * @param args The command line arguments to check + * @param defMinData The default minimum number of data items for all sets (can be overridden when adding a set) + * @param defMaxData The default maximum number of data items for all sets (can be overridden when adding a set) + *

+ * @throws IllegalArgumentException If args is null - or if the data range values don't make sense + */ + + public Options(String args[], int defMinData, int defMaxData) { + this(args, Prefix.DASH, Multiplicity.ONCE, defMinData, defMaxData); + } + +/** + * Constructor. The default number of data items is set to 0, and + * the multiplicity is set to {@link Multiplicity#ONCE}. + *

+ * @param args The command line arguments to check + * @param prefix The prefix to use for all command line options. It can only be set here for all options at + * the same time + *

+ * @throws IllegalArgumentException If either args or prefix is null + */ + + public Options(String args[], Prefix prefix) { + this(args, prefix, Multiplicity.ONCE, 0, 0); + } + +/** + * Constructor. The multiplicity is set to {@link Multiplicity#ONCE}. + *

+ * @param args The command line arguments to check + * @param prefix The prefix to use for all command line options. It can only be set here for all options at + * @param data The default minimum and maximum number of data items for all sets (can be overridden when adding a set) + *

+ * @throws IllegalArgumentException If either args or prefix is null + * - or if the data range value doesn't make sense + */ + + public Options(String args[], Prefix prefix, int data) { + this(args, prefix, Multiplicity.ONCE, data, data); + } + +/** + * Constructor. The multiplicity is set to {@link Multiplicity#ONCE}. + *

+ * @param args The command line arguments to check + * @param prefix The prefix to use for all command line options. It can only be set here for all options at + * the same time + * @param defMinData The default minimum number of data items for all sets (can be overridden when adding a set) + * @param defMaxData The default maximum number of data items for all sets (can be overridden when adding a set) + *

+ * @throws IllegalArgumentException If either args or prefix is null + * - or if the data range values don't make sense + */ + + public Options(String args[], Prefix prefix, int defMinData, int defMaxData) { + this(args, prefix, Multiplicity.ONCE, defMinData, defMaxData); + } + +/** + * Return the (first) matching set. This invocation does not ignore unmatched options and requires that + * data items are the last ones on the command line. + *

+ * @return The first set which matches (i. e. the check() method returns true) - or + * null, if no set matches. + */ + + public OptionSet getMatchingSet() { + return getMatchingSet(false, true); + } + +/** + * Return the (first) matching set. + *

+ * @param ignoreUnmatched A boolean to select whether unmatched options can be ignored in the checks or not + * @param requireDataLast A boolean to indicate whether the data items have to be the last ones on the command line or not + *

+ * @return The first set which matches (i. e. the check() method returns true) - or + * null, if no set matches. + */ + + public OptionSet getMatchingSet(boolean ignoreUnmatched, boolean requireDataLast) { + for (String setName : optionSets.keySet()) + if (check(setName, ignoreUnmatched, requireDataLast)) + return optionSets.get(setName); + return null; + } + +/** + * Add an option set. + *

+ * @param setName The name for the set. This must be a unique identifier + * @param minData The minimum number of data items for this set + * @param maxData The maximum number of data items for this set + *

+ * @return The new Optionset instance created. This is useful to allow chaining of addOption() + * calls right after this method + */ + + public OptionSet addSet(String setName, int minData, int maxData) { + if (setName == null) throw new IllegalArgumentException(CLASS + ": setName may not be null"); + if (optionSets.containsKey(setName)) throw new IllegalArgumentException(CLASS + ": a set with the name " + + setName + " has already been defined"); + OptionSet os = new OptionSet(prefix, defaultMultiplicity, setName, minData, maxData); + optionSets.put(setName, os); + return os; + } + +/** + * Add an option set. + *

+ * @param setName The name for the set. This must be a unique identifier + * @param data The minimum and maximum number of data items for this set + *

+ * @return The new Optionset instance created. This is useful to allow chaining of addOption() + * calls right after this method + */ + + public OptionSet addSet(String setName, int data) { + return addSet(setName, data, data); + } + +/** + * Add an option set. The defaults for the number of data items are used. + *

+ * @param setName The name for the set. This must be a unique identifier + *

+ * @return The new Optionset instance created. This is useful to allow chaining of addOption() + * calls right after this method + */ + + public OptionSet addSet(String setName) { + return addSet(setName, defaultMinData, defaultMaxData); + } + +/** + * Return an option set - or null, if no set with the given name exists + *

+ * @param setName The name for the set to retrieve + *

+ * @return The set to retrieve (or null, if no set with the given name exists) + */ + + public OptionSet getSet(String setName) { + return optionSets.get(setName); + } + +/** + * This returns the (anonymous) default set + *

+ * @return The default set + */ + + public OptionSet getSet() { + if (getSet(DEFAULT_SET) == null) + addSet(DEFAULT_SET, defaultMinData, defaultMaxData); + return getSet(DEFAULT_SET); + } + +/** + * The error messages collected during the last option check (invocation of any of the check() methods). This + * is useful to determine what was wrong with the command line arguments provided + *

+ * @return A string with all collected error messages + */ + + public String getCheckErrors() { + return checkErrors.toString(); + } + +/** + * Run the checks for the default set. ignoreUnmatched is set to false, and + * requireDataLast is set to true. + *

+ * @return A boolean indicating whether all checks were successful or not + */ + + public boolean check() { + return check(DEFAULT_SET, false, true); + } + +/** + * Run the checks for the default set. + *

+ * @param ignoreUnmatched A boolean to select whether unmatched options can be ignored in the checks or not + * @param requireDataLast A boolean to indicate whether the data items have to be the last ones on the command line or not + *

+ * @return A boolean indicating whether all checks were successful or not + */ + + public boolean check(boolean ignoreUnmatched, boolean requireDataLast) { + return check(DEFAULT_SET, ignoreUnmatched, requireDataLast); + } + +/** + * Run the checks for the given set. ignoreUnmatched is set to false, and + * requireDataLast is set to true. + *

+ * @param setName The name for the set to check + *

+ * @return A boolean indicating whether all checks were successful or not + *

+ * @throws IllegalArgumentException If either setName is null, or the set is unknown. + */ + + public boolean check(String setName) { + return check(setName, false, true); + } + +/** + * Run the checks for the given set. + *

+ * @param setName The name for the set to check + * @param ignoreUnmatched A boolean to select whether unmatched options can be ignored in the checks or not + * @param requireDataLast A boolean to indicate whether the data items have to be the last ones on the command line or not + *

+ * @return A boolean indicating whether all checks were successful or not + *

+ * @throws IllegalArgumentException If either setName is null, or the set is unknown. + */ + + public boolean check(String setName, boolean ignoreUnmatched, boolean requireDataLast) { + + if (setName == null) throw new IllegalArgumentException(CLASS + ": setName may not be null"); + if (optionSets.get(setName) == null) throw new IllegalArgumentException(CLASS + ": Unknown OptionSet: " + setName); + + checkErrors = new StringBuffer(); + checkErrors.append("Checking set "); + checkErrors.append(setName); + checkErrors.append('\n'); + +//.... Access the data for the set to use + + OptionSet set = optionSets.get(setName); + java.util.ArrayList options = set.getOptionData(); + java.util.ArrayList data = set.getData(); + java.util.ArrayList unmatched = set.getUnmatched(); + +//.... Catch some trivial cases + + if (options.size() == 0) { // No options have been defined at all + if (arguments.length == 0) { // No arguments have been given: in this case, this is a success + return true; + } else { + checkErrors.append("No options have been defined, nothing to check\n"); + return false; + } + } else if (arguments.length == 0) { // Options have been defined, but no arguments given + checkErrors.append("Options have been defined, but no arguments have been given; nothing to check\n"); + return false; + } + +//.... Parse all the arguments given + + int ipos = 0; + int offset = 0; + java.util.regex.Matcher m = null; + String value = null; + String detail = null; + String next = null; + String key = null; + String pre = Character.toString(prefix.getName()); + boolean add = true; + boolean[] matched = new boolean[arguments.length]; + + for (int i = 0; i < matched.length; i++) // Initially, we assume there was no match at all + matched[i] = false; + + while (true) { + + value = null; + detail = null; + offset = 0; + add = true; + key = arguments[ipos]; + + for (OptionData optionData : options) { // For each argument, we may need to check all defined options + m = optionData.getPattern().matcher(key); + if (m.lookingAt()) { + if (optionData.useValue()) { // The code section for value options + if (optionData.useDetail()) { + detail = m.group(1); + offset = 2; // required for correct Matcher.group access below + } + if (optionData.getSeparator() == Separator.BLANK) { // In this case, the next argument must be the value + if (ipos + 1 == arguments.length) { // The last argument, thus no value follows it: Error + checkErrors.append("At end of arguments - no value found following argument "); + checkErrors.append(key); + checkErrors.append('\n'); + add = false; + } else { + next = arguments[ipos + 1]; + if (next.startsWith(pre)) { // The next one is an argument, not a value: Error + checkErrors.append("No value found following argument "); + checkErrors.append(key); + checkErrors.append('\n'); + add = false; + } else { + value = next; + matched[ipos++] = true; // Mark the key and the value + matched[ipos] = true; + } + } + } else { // The value follows the separator in this case + value = m.group(1 + offset); + matched[ipos] = true; + } + } else { // Simple, non-value options + matched[ipos] = true; + } + + if (add) optionData.addResult(value, detail); // Store the result + break; // No need to check more options, we have a match + } + } + + ipos++; // Advance to the next argument to check + if (ipos >= arguments.length) break; // Terminating condition for the check loop + + } + +//.... Identify unmatched arguments and actual (non-option) data + + int first = -1; // Required later for requireDataLast + for (int i = 0; i < matched.length; i++) { // Assemble the list of unmatched options + if (!matched[i]) { + if (arguments[i].startsWith(pre)) { // This is an unmatched option + unmatched.add(arguments[i]); + checkErrors.append("No matching option found for argument "); + checkErrors.append(arguments[i]); + checkErrors.append('\n'); + } else { // This is actual data + if (first < 0) first = i; + data.add(arguments[i]); + } + } + } + +//.... Checks to determine overall success; start with multiplicity of options + + boolean err = true; + + for (OptionData optionData : options) { + + key = optionData.getKey(); + err = false; // Local check result for one option + + switch (optionData.getMultiplicity()) { + case ONCE: if (optionData.getResultCount() != 1) err = true; break; + case ONCE_OR_MORE: if (optionData.getResultCount() == 0) err = true; break; + case ZERO_OR_ONE: if (optionData.getResultCount() > 1) err = true; break; + } + + if (err) { + checkErrors.append("Wrong number of occurences found for argument "); + checkErrors.append(prefix.getName()); + checkErrors.append(key); + checkErrors.append('\n'); + return false; + } + + } + +//.... Check range for data + + if (data.size() < set.getMinData() || data.size() > set.getMaxData()) { + checkErrors.append("Invalid number of data arguments: "); + checkErrors.append(data.size()); + checkErrors.append(" (allowed range: "); + checkErrors.append(set.getMinData()); + checkErrors.append(" ... "); + checkErrors.append(set.getMaxData()); + checkErrors.append(")\n"); + return false; + } + +//.... Check for location of the data in the list of command line arguments + + if (requireDataLast) { + if (first + data.size() != arguments.length) { + checkErrors.append("Invalid data specification: data arguments are not the last ones on the command line\n"); + return false; + } + } + +//.... Check for unmatched arguments + + if (!ignoreUnmatched && unmatched.size() > 0) return false; // Don't accept unmatched arguments + +//.... If we made it to here, all checks were successful + + return true; + + } + +/** + * Add the given non-value option to all known sets. + * See {@link OptionSet#addOption(String)} for details. + */ + + public void addOptionAllSets(String key) { + for (String setName : optionSets.keySet()) + optionSets.get(setName).addOption(key, defaultMultiplicity); + } + +/** + * Add the given non-value option to all known sets. + * See {@link OptionSet#addOption(String, Options.Multiplicity)} for details. + */ + + public void addOptionAllSets(String key, Multiplicity multiplicity) { + for (String setName : optionSets.keySet()) + optionSets.get(setName).addOption(key, false, Separator.NONE, false, multiplicity); + } + +/** + * Add the given value option to all known sets. + * See {@link OptionSet#addOption(String, Options.Separator)} for details. + */ + + public void addOptionAllSets(String key, Separator separator) { + for (String setName : optionSets.keySet()) + optionSets.get(setName).addOption(key, false, separator, true, defaultMultiplicity); + } + +/** + * Add the given value option to all known sets. + * See {@link OptionSet#addOption(String, Options.Separator, Options.Multiplicity)} for details. + */ + + public void addOptionAllSets(String key, Separator separator, Multiplicity multiplicity) { + for (String setName : optionSets.keySet()) + optionSets.get(setName).addOption(key, false, separator, true, multiplicity); + } + +/** + * Add the given value option to all known sets. + * See {@link OptionSet#addOption(String, boolean, Options.Separator)} for details. + */ + + public void addOptionAllSets(String key, boolean details, Separator separator) { + for (String setName : optionSets.keySet()) + optionSets.get(setName).addOption(key, details, separator, true, defaultMultiplicity); + } + +/** + * Add the given value option to all known sets. + * See {@link OptionSet#addOption(String, boolean, Options.Separator, Options.Multiplicity)} for details. + */ + + public void addOptionAllSets(String key, boolean details, Separator separator, Multiplicity multiplicity) { + for (String setName : optionSets.keySet()) + optionSets.get(setName).addOption(key, details, separator, true, multiplicity); + } + +/** + * This is the overloaded {@link Object#toString()} method, and it is provided mainly for debugging + * purposes. + *

+ * @return A string representing the instance + */ + + public String toString() { + + StringBuffer sb = new StringBuffer(); + + for (OptionSet set : optionSets.values()) { + sb.append("Set: "); + sb.append(set.getSetName()); + sb.append('\n'); + for (OptionData data : set.getOptionData()) { + sb.append(data.toString()); + sb.append('\n'); + } + } + + return sb.toString(); + + } + +} + + diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index 7b8ad35..36061ab 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -14,10 +14,10 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.io.File; import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.List; @@ -58,19 +58,12 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.swt.SWT; -import org.eclipse.swt.events.KeyAdapter; -import org.eclipse.swt.events.KeyEvent; -import org.eclipse.swt.events.KeyListener; -import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.MouseTrackListener; import org.eclipse.swt.events.MouseWheelListener; -import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; @@ -87,6 +80,8 @@ import com.minres.scviewer.database.ui.GotoDirection; import com.minres.scviewer.database.ui.ICursor; import com.minres.scviewer.database.ui.IWaveformViewer; import com.minres.scviewer.database.ui.TrackEntry; +import com.minres.scviewer.database.ui.TrackEntry.ValueDisplay; +import com.minres.scviewer.database.ui.TrackEntry.WaveDisplay; import com.minres.scviewer.database.ui.WaveformColors; import com.minres.scviewer.e4.application.Messages; import com.minres.scviewer.e4.application.internal.status.WaveStatusBarControl; @@ -95,7 +90,6 @@ import com.minres.scviewer.e4.application.internal.util.IFileChangeListener; import com.minres.scviewer.e4.application.internal.util.IModificationChecker; import com.minres.scviewer.e4.application.preferences.DefaultValuesInitializer; import com.minres.scviewer.e4.application.preferences.PreferenceConstants; -//import com.minres.scviewer.database.swt.internal.WaveformCanvas; /** * The Class WaveformViewerPart. @@ -115,6 +109,10 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis /** The Constant SHOWN_WAVEFORM. */ protected static final String SHOWN_WAVEFORM = "SHOWN_WAVEFORM"; //$NON-NLS-1$ + protected static final String VALUE_DISPLAY = ".VALUE_DISPLAY"; //$NON-NLS-1$ + + protected static final String WAVE_DISPLAY = ".WAVE_DISPLAY"; //$NON-NLS-1$ + /** The Constant SHOWN_CURSOR. */ protected static final String SHOWN_CURSOR = "SHOWN_CURSOR"; //$NON-NLS-1$ @@ -154,7 +152,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis @Inject ESelectionService selectionService; - /** The e part service. */ + /** The part service. */ @Inject EPartService ePartService; @@ -344,17 +342,6 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis case SWT.HOME: return; //TODO: should be handled case SWT.END: return; //TODO: should be handled } -// String string = e.type == SWT.KeyDown ? "DOWN:" : "UP :"; -// string += " stateMask=0x" + Integer.toHexString (e.stateMask) + ","; // SWT.CTRL, SWT.ALT, SWT.SHIFT, SWT.COMMAND -// string += " keyCode=0x" + Integer.toHexString (e.keyCode) + ","; -// string += " character=0x" + Integer.toHexString (e.character) ; -// if (e.keyLocation != 0) { -// string += " location="; -// if (e.keyLocation == SWT.LEFT) string += "LEFT"; -// if (e.keyLocation == SWT.RIGHT) string += "RIGHT"; -// if (e.keyLocation == SWT.KEYPAD) string += "KEYPAD"; -// } -// System.out.println (string); } } @@ -510,7 +497,7 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis */ @Inject @Optional - public void setPartInput(@Named("input") Object partInput) { + public void setPartInput(@Named("input") Object partInput, @Named("config") Object partConfig) { if (partInput instanceof File) { filesToLoad = new ArrayList(); File file = (File) partInput; @@ -534,6 +521,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis } if (filesToLoad.size() > 0) loadDatabase(persistedState); + if(partConfig instanceof String) { + loadState((String) partConfig); + } } } @@ -589,12 +579,13 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis FileInputStream in = new FileInputStream(fileName); props.load(in); in.close(); + @SuppressWarnings({ "unchecked", "rawtypes" }) + HashMap propMap = new HashMap((Map) props); + restoreWaveformViewerState(propMap); + } catch(FileNotFoundException e) { } catch (IOException e) { e.printStackTrace(); } - @SuppressWarnings({ "unchecked", "rawtypes" }) - HashMap propMap = new HashMap((Map) props); - restoreWaveformViewerState(propMap); } /** @@ -608,8 +599,8 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis index = 0; for (TrackEntry trackEntry : waveformPane.getStreamList()) { persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName()); - persistedState.put(SHOWN_WAVEFORM + index+".VALUE_DISPLAY", trackEntry.valueDisplay.toString()); - persistedState.put(SHOWN_WAVEFORM + index+".WAVE_DISPLAY", trackEntry.waveDisplay.toString()); + persistedState.put(SHOWN_WAVEFORM + index + VALUE_DISPLAY, trackEntry.valueDisplay.toString()); + persistedState.put(SHOWN_WAVEFORM + index + WAVE_DISPLAY, trackEntry.waveDisplay.toString()); index++; } List cursors = waveformPane.getCursorList(); @@ -633,8 +624,16 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis List res = new LinkedList<>(); for (int i = 0; i < waves; i++) { IWaveform waveform = database.getStreamByName(state.get(SHOWN_WAVEFORM + i)); - if (waveform != null) - res.add(new TrackEntry(waveform)); + if (waveform != null) { + TrackEntry t = new TrackEntry(waveform); + res.add(t); + String v = state.get(SHOWN_WAVEFORM + i + VALUE_DISPLAY); + if(v!=null) + t.valueDisplay=ValueDisplay.valueOf(v); + String s = state.get(SHOWN_WAVEFORM + i + WAVE_DISPLAY); + if(s!=null) + t.waveDisplay=WaveDisplay.valueOf(s); + } } if (res.size() > 0) waveformPane.getStreamList().addAll(res); From 0107c423a36f9ade05bf6287cb326ecaf62a7519 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 14 Oct 2018 21:29:09 +0200 Subject: [PATCH 16/16] Fixed warnings in Java files and MANIFESTS.MF, updated version numbers --- .../META-INF/MANIFEST.MF | 1 + .../META-INF/MANIFEST.MF | 1 + .../META-INF/MANIFEST.MF | 1 + .../META-INF/MANIFEST.MF | 3 ++- com.minres.scviewer.database.ui.swt/pom.xml | 2 +- .../database/swt/internal/SignalPainter.java | 2 -- .../META-INF/MANIFEST.MF | 3 ++- com.minres.scviewer.database.ui/pom.xml | 4 ++-- .../META-INF/MANIFEST.MF | 3 ++- com.minres.scviewer.database.vcd/pom.xml | 5 +++-- .../scviewer/database/vcd/VCDFileParser.java | 1 - .../META-INF/MANIFEST.MF | 1 + .../Application.e4xmi | 2 +- .../META-INF/MANIFEST.MF | 3 ++- com.minres.scviewer.e4.application/pom.xml | 3 +-- .../WaveformPopupMenuContribution.java | 1 - .../e4/application/handlers/AboutHandler.java | 5 +---- .../e4/application/messages.properties | 4 ++-- .../e4/application/options/Options.java | 2 +- .../e4/application/parts/AboutDialog.java | 2 +- .../org/eclipse/wb/swt/ResourceManager.java | 10 +++++----- com.minres.scviewer.e4.product/pom.xml | 3 +-- .../scviewer.product | 3 +-- com.minres.scviewer.parent/pom.xml | 2 +- com.minres.scviewer.ui/META-INF/MANIFEST.MF | 1 + .../com/minres/scviewer/ui/TxEditorPart.java | 18 ++++++++++++------ .../META-INF/MANIFEST.MF | 1 + 27 files changed, 47 insertions(+), 40 deletions(-) diff --git a/com.minres.scviewer.database.sqlite/META-INF/MANIFEST.MF b/com.minres.scviewer.database.sqlite/META-INF/MANIFEST.MF index ced4ce9..7a73230 100644 --- a/com.minres.scviewer.database.sqlite/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.database.sqlite/META-INF/MANIFEST.MF @@ -15,3 +15,4 @@ Bundle-ActivationPolicy: lazy Embed-Dependency: sqlite-jdbc Embedded-Artifacts: sqlite-jdbc-3.8.7.jar;g="org.xerial"; a="sqlite-jdbc";v="3.8.7" +Automatic-Module-Name: com.minres.scviewer.database.sqlite diff --git a/com.minres.scviewer.database.test/META-INF/MANIFEST.MF b/com.minres.scviewer.database.test/META-INF/MANIFEST.MF index 28455ce..229f904 100644 --- a/com.minres.scviewer.database.test/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.database.test/META-INF/MANIFEST.MF @@ -12,3 +12,4 @@ Require-Bundle: org.junit, com.minres.scviewer.database.vcd;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy Service-Component: OSGI-INF/component.xml +Automatic-Module-Name: com.minres.scviewer.database.test diff --git a/com.minres.scviewer.database.text/META-INF/MANIFEST.MF b/com.minres.scviewer.database.text/META-INF/MANIFEST.MF index d2d630f..44292a9 100644 --- a/com.minres.scviewer.database.text/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.database.text/META-INF/MANIFEST.MF @@ -15,3 +15,4 @@ Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0", com.google.guava;bundle-version="15.0.0" Service-Component: OSGI-INF/component.xml Bundle-ActivationPolicy: lazy +Automatic-Module-Name: com.minres.scviewer.database.text diff --git a/com.minres.scviewer.database.ui.swt/META-INF/MANIFEST.MF b/com.minres.scviewer.database.ui.swt/META-INF/MANIFEST.MF index 4dd40bf..26854e4 100644 --- a/com.minres.scviewer.database.ui.swt/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.database.ui.swt/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SWT widget Bundle-SymbolicName: com.minres.scviewer.database.ui.swt -Bundle-Version: 1.1.0.qualifier +Bundle-Version: 2.0.0.qualifier Bundle-Vendor: MINRES Technologies GmbH Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.eclipse.swt;bundle-version="3.103.1", @@ -17,3 +17,4 @@ Export-Package: com.minres.scviewer.database.swt Bundle-ClassPath: . Bundle-ActivationPolicy: lazy Bundle-Activator: com.minres.scviewer.database.swt.DatabaseUiPlugin +Automatic-Module-Name: com.minres.scviewer.database.ui.swt diff --git a/com.minres.scviewer.database.ui.swt/pom.xml b/com.minres.scviewer.database.ui.swt/pom.xml index 387a391..6b6a315 100644 --- a/com.minres.scviewer.database.ui.swt/pom.xml +++ b/com.minres.scviewer.database.ui.swt/pom.xml @@ -1,6 +1,7 @@ 4.0.0 com.minres.scviewer.database.ui.swt + 2.0.0-SNAPSHOT eclipse-plugin com.minres.scviewer @@ -8,5 +9,4 @@ 1.0.0-SNAPSHOT ../com.minres.scviewer.parent - 1.1.0-SNAPSHOT \ No newline at end of file diff --git a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java index ce0de77..934109c 100644 --- a/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java +++ b/com.minres.scviewer.database.ui.swt/src/com/minres/scviewer/database/swt/internal/SignalPainter.java @@ -242,14 +242,12 @@ public class SignalPainter extends TrackPainter { private class MultiBitStencilAnalog implements SignalStencil { final boolean continous; - final boolean signed; private long minVal; private long range; @SuppressWarnings("unchecked") public MultiBitStencilAnalog(NavigableMap entries, ISignalChange left, boolean continous, boolean signed) { this.continous=continous; - this.signed=signed; Collection values = ((NavigableMap) entries).values(); minVal=((ISignalChangeBitVector) left).getValue().toUnsignedValue(); range=2; diff --git a/com.minres.scviewer.database.ui/META-INF/MANIFEST.MF b/com.minres.scviewer.database.ui/META-INF/MANIFEST.MF index 1b3f7ff..7895eed 100644 --- a/com.minres.scviewer.database.ui/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.database.ui/META-INF/MANIFEST.MF @@ -2,9 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Database UI Bundle-SymbolicName: com.minres.scviewer.database.ui -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 2.0.0.qualifier Bundle-Vendor: MINRES Technologies GmbH Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: com.minres.scviewer.database.ui Require-Bundle: com.minres.scviewer.database, org.eclipse.jface +Automatic-Module-Name: com.minres.scviewer.database.ui diff --git a/com.minres.scviewer.database.ui/pom.xml b/com.minres.scviewer.database.ui/pom.xml index e7f049f..559e80c 100644 --- a/com.minres.scviewer.database.ui/pom.xml +++ b/com.minres.scviewer.database.ui/pom.xml @@ -1,12 +1,12 @@ 4.0.0 com.minres.scviewer.database.ui - 1.0.0-SNAPSHOT + 2.0.0-SNAPSHOT eclipse-plugin com.minres.scviewer com.minres.scviewer.parent - 1.0.0-SNAPSHOT + 2.0.0-SNAPSHOT ../com.minres.scviewer.parent \ No newline at end of file diff --git a/com.minres.scviewer.database.vcd/META-INF/MANIFEST.MF b/com.minres.scviewer.database.vcd/META-INF/MANIFEST.MF index 035983b..968707f 100644 --- a/com.minres.scviewer.database.vcd/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.database.vcd/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: VCD signal database Bundle-SymbolicName: com.minres.scviewer.database.vcd -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 2.0.0.qualifier Bundle-Vendor: MINRES Technologies GmbH Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0", @@ -13,3 +13,4 @@ Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0", Service-Component: OSGI-INF/component.xml Bundle-ActivationPolicy: lazy Import-Package: com.google.common.collect +Automatic-Module-Name: com.minres.scviewer.database.vcd diff --git a/com.minres.scviewer.database.vcd/pom.xml b/com.minres.scviewer.database.vcd/pom.xml index f938751..f1a21ec 100644 --- a/com.minres.scviewer.database.vcd/pom.xml +++ b/com.minres.scviewer.database.vcd/pom.xml @@ -4,8 +4,9 @@ com.minres.scviewer com.minres.scviewer.parent - 1.0.0-SNAPSHOT + 2.0.0-SNAPSHOT ../com.minres.scviewer.parent eclipse-plugin - \ No newline at end of file + 2.0.0-SNAPSHOT + \ No newline at end of file diff --git a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java index 06976f8..c714dec 100644 --- a/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java +++ b/com.minres.scviewer.database.vcd/src/com/minres/scviewer/database/vcd/VCDFileParser.java @@ -149,7 +149,6 @@ class VCDFileParser { if (tokenizer.sval.charAt(0) == '#') { // If the line begins with a #, this is a timestamp. currentTime = Long.parseLong(tokenizer.sval.substring(1)) * picoSecondsPerIncrement; } else { - boolean isReal=false; if(tokenizer.sval.equals("$comment")){ do { if (!nextToken()) return false; diff --git a/com.minres.scviewer.database/META-INF/MANIFEST.MF b/com.minres.scviewer.database/META-INF/MANIFEST.MF index 7260a67..c1ec1ec 100644 --- a/com.minres.scviewer.database/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.database/META-INF/MANIFEST.MF @@ -11,3 +11,4 @@ Service-Component: OSGI-INF/component.xml,OSGI-INF/component2.xml Require-Bundle: org.eclipse.equinox.ds;bundle-version="1.4.200", org.eclipse.equinox.util;bundle-version="1.0.500", org.eclipse.osgi.services;bundle-version="3.4.0" +Automatic-Module-Name: com.minres.scviewer.database diff --git a/com.minres.scviewer.e4.application/Application.e4xmi b/com.minres.scviewer.e4.application/Application.e4xmi index c596fb4..8b7c1e3 100644 --- a/com.minres.scviewer.e4.application/Application.e4xmi +++ b/com.minres.scviewer.e4.application/Application.e4xmi @@ -142,7 +142,7 @@ - + diff --git a/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF b/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF index ccd278f..96a8505 100644 --- a/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true -Bundle-Version: 1.1.1.qualifier +Bundle-Version: 2.0.0.qualifier Bundle-Vendor: %Bundle-Vendor Require-Bundle: javax.inject;bundle-version="1.0.0", org.eclipse.core.runtime;bundle-version="3.11.1", @@ -35,3 +35,4 @@ Require-Bundle: javax.inject;bundle-version="1.0.0", Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: com.minres.scviewer.database, javax.inject;version="1.0.0" +Automatic-Module-Name: com.minres.scviewer.e4.application diff --git a/com.minres.scviewer.e4.application/pom.xml b/com.minres.scviewer.e4.application/pom.xml index c337711..91d86b7 100644 --- a/com.minres.scviewer.e4.application/pom.xml +++ b/com.minres.scviewer.e4.application/pom.xml @@ -4,9 +4,8 @@ com.minres.scviewer com.minres.scviewer.parent - 1.0.0-SNAPSHOT + 2.0.0-SNAPSHOT ../com.minres.scviewer.parent eclipse-plugin - 1.1.1-SNAPSHOT \ No newline at end of file diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java index a08f31c..89eb25a 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/elements/WaveformPopupMenuContribution.java @@ -27,7 +27,6 @@ import com.minres.scviewer.database.ISignalChange; import com.minres.scviewer.database.ISignalChangeBitVector; import com.minres.scviewer.database.ISignalChangeReal; import com.minres.scviewer.database.ui.TrackEntry; -import com.minres.scviewer.database.ui.TrackEntry.ValueDisplay; import com.minres.scviewer.e4.application.parts.WaveformViewer; public class WaveformPopupMenuContribution { diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java index f7f4d7e..6d5db35 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/handlers/AboutHandler.java @@ -10,11 +10,8 @@ *******************************************************************************/ package com.minres.scviewer.e4.application.handlers; -import javax.inject.Named; - import org.eclipse.e4.core.di.annotations.Execute; import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.ui.basic.MDialog; import org.eclipse.e4.ui.model.application.ui.basic.MWindow; import org.eclipse.e4.ui.workbench.modeling.EModelService; import org.eclipse.swt.widgets.Shell; @@ -25,7 +22,7 @@ public class AboutHandler { @Execute public void execute(Shell shell, MApplication app, MWindow window, EModelService ms /*@Named("mdialog01.dialog.0") MDialog dialog*/) { - MDialog dialog = (MDialog) ms.find(DIALOG_ID, app); //$NON-NLS-1$ + MWindow dialog = (MWindow) ms.find(DIALOG_ID, app); //$NON-NLS-1$ dialog.setToBeRendered(true); dialog.setToBeRendered(false); } diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties index 7848715..4a5a274 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/messages.properties @@ -1,5 +1,5 @@ -AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: 1.2.2\n -AboutDialog_1=\nCopyright (c) 2015,2016,2017 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.apache.jdbm and org.sqlite JDBC driver\n\nSources code is hosted at GitHub: https://github.com/minres/SCViewer\n +AboutDialog_0=\nSCViewer - a SystemC waveform viewer\n\nVersion: 2.0\n +AboutDialog_1=\nCopyright (c) 2015, 2018 MINRES Technologies GmbH and others.\n\nAll rights reserved. MINRES and the MINRES logo are trademarks of MINRES Technologies GmbH, http://www.minres.com/. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html\n\nParts of the software are governed by the Apache License Version 2.0 available at http://www.apache.org/licenses/. These are namely org.apache.jdbm and org.sqlite JDBC driver\n\nSources code is hosted at GitHub: https://github.com/minres/SCViewer\n DesignBrowser_12=Append all after DesignBrowser_16=Insert all before DesignBrowser_2=Enter text to filter waveforms diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/Options.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/Options.java index b7e0282..0e66ed0 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/Options.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/options/Options.java @@ -135,7 +135,6 @@ public class Options { private Prefix prefix = null; private Multiplicity defaultMultiplicity = null; private String[] arguments = null; - private boolean ignoreUnmatched = false; private int defaultMinData = 0; private int defaultMaxData = 0; private StringBuffer checkErrors = null; @@ -634,6 +633,7 @@ public class Options { case ONCE: if (optionData.getResultCount() != 1) err = true; break; case ONCE_OR_MORE: if (optionData.getResultCount() == 0) err = true; break; case ZERO_OR_ONE: if (optionData.getResultCount() > 1) err = true; break; + case ZERO_OR_MORE: break; } if (err) { diff --git a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java index e33b483..8b0745c 100644 --- a/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java +++ b/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/AboutDialog.java @@ -133,7 +133,7 @@ public class AboutDialog extends Dialog { // links are activated on mouse down when the control key is held down // if ((event.stateMask & SWT.MOD1) != 0) { try { - int offset = ((StyledText)event.widget).getOffsetAtLocation(new Point (event.x, event.y)); + int offset = ((StyledText)event.widget).getOffsetAtPoint(new Point (event.x, event.y)); StyleRange style = ((StyledText)event.widget).getStyleRangeAtOffset(offset); if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK) { Desktop.getDesktop().browse(new java.net.URI(style.data.toString())); diff --git a/com.minres.scviewer.e4.application/src/org/eclipse/wb/swt/ResourceManager.java b/com.minres.scviewer.e4.application/src/org/eclipse/wb/swt/ResourceManager.java index ddf492f..98642cf 100644 --- a/com.minres.scviewer.e4.application/src/org/eclipse/wb/swt/ResourceManager.java +++ b/com.minres.scviewer.e4.application/src/org/eclipse/wb/swt/ResourceManager.java @@ -147,15 +147,15 @@ public class ResourceManager extends SWTResourceManager { CompositeImageDescriptor compositImageDesc = new CompositeImageDescriptor() { @Override protected void drawCompositeImage(int width, int height) { - drawImage(baseImage.getImageData(), 0, 0); + drawImage(createCachedImageDataProvider(baseImage), 0, 0); if (corner == TOP_LEFT) { - drawImage(decorator.getImageData(), 0, 0); + drawImage(createCachedImageDataProvider(decorator), 0, 0); } else if (corner == TOP_RIGHT) { - drawImage(decorator.getImageData(), bib.width - dib.width, 0); + drawImage(createCachedImageDataProvider(decorator), bib.width - dib.width, 0); } else if (corner == BOTTOM_LEFT) { - drawImage(decorator.getImageData(), 0, bib.height - dib.height); + drawImage(createCachedImageDataProvider(decorator), 0, bib.height - dib.height); } else if (corner == BOTTOM_RIGHT) { - drawImage(decorator.getImageData(), bib.width - dib.width, bib.height - dib.height); + drawImage(createCachedImageDataProvider(decorator), bib.width - dib.width, bib.height - dib.height); } } @Override diff --git a/com.minres.scviewer.e4.product/pom.xml b/com.minres.scviewer.e4.product/pom.xml index 92a039e..ff56ab9 100644 --- a/com.minres.scviewer.e4.product/pom.xml +++ b/com.minres.scviewer.e4.product/pom.xml @@ -6,11 +6,10 @@ com.minres.scviewer com.minres.scviewer.parent - 1.0.0-SNAPSHOT + 2.0.0-SNAPSHOT ../com.minres.scviewer.parent com.minres.scviewer.e4.product - 1.3.0-SNAPSHOT eclipse-repository com.minres.scviewer diff --git a/com.minres.scviewer.e4.product/scviewer.product b/com.minres.scviewer.e4.product/scviewer.product index d500d8d..615d49f 100644 --- a/com.minres.scviewer.e4.product/scviewer.product +++ b/com.minres.scviewer.e4.product/scviewer.product @@ -1,7 +1,7 @@ - + @@ -33,7 +33,6 @@ - diff --git a/com.minres.scviewer.parent/pom.xml b/com.minres.scviewer.parent/pom.xml index e69be6d..736e844 100644 --- a/com.minres.scviewer.parent/pom.xml +++ b/com.minres.scviewer.parent/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.minres.scviewer com.minres.scviewer.parent - 1.0.0-SNAPSHOT + 2.0.0-SNAPSHOT pom ../com.minres.scviewer.target diff --git a/com.minres.scviewer.ui/META-INF/MANIFEST.MF b/com.minres.scviewer.ui/META-INF/MANIFEST.MF index fc9a3e3..60150bc 100644 --- a/com.minres.scviewer.ui/META-INF/MANIFEST.MF +++ b/com.minres.scviewer.ui/META-INF/MANIFEST.MF @@ -23,3 +23,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Import-Package: com.google.common.collect Service-Component: OSGI-INF/component.xml +Automatic-Module-Name: com.minres.scviewer.ui diff --git a/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPart.java b/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPart.java index 3663aab..66402d9 100644 --- a/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPart.java +++ b/com.minres.scviewer.ui/src/com/minres/scviewer/ui/TxEditorPart.java @@ -347,12 +347,18 @@ public class TxEditorPart extends EditorPart implements ITabbedPropertySheetPage addStreamToList(stream); } - public void removeStreamFromList(IWaveform obj){ - if(getEditorInput() instanceof TxEditorInput && ((TxEditorInput) getEditorInput()).getStreamNames().contains(obj.getFullName())){ - ((TxEditorInput) getEditorInput()).getStreamNames().remove(obj.getFullName()); - txDisplay.getStreamList().remove(obj); - } else - txDisplay.getStreamList().remove(obj); + public void removeStreamFromList(IWaveform waveform){ + if(getEditorInput() instanceof TxEditorInput && ((TxEditorInput) getEditorInput()).getStreamNames().contains(waveform.getFullName())){ + ((TxEditorInput) getEditorInput()).getStreamNames().remove(waveform.getFullName()); + } + TrackEntry entry=null; + for(TrackEntry e:txDisplay.getStreamList()) { + if(e.waveform==waveform) { + entry=e; + break; + } + } + txDisplay.getStreamList().remove(entry); } public void removeStreamsFromList(IWaveform[] iWaveforms){ diff --git a/com.opcoach.e4.preferences/META-INF/MANIFEST.MF b/com.opcoach.e4.preferences/META-INF/MANIFEST.MF index f49535b..5ec77eb 100644 --- a/com.opcoach.e4.preferences/META-INF/MANIFEST.MF +++ b/com.opcoach.e4.preferences/META-INF/MANIFEST.MF @@ -16,3 +16,4 @@ Require-Bundle: javax.inject, Export-Package: com.opcoach.e4.preferences, com.opcoach.e4.preferences.handlers Bundle-ActivationPolicy: lazy +Automatic-Module-Name: com.opcoach.e4.preferences