checkpoint
authoradam <adam@megacz.com>
Thu, 30 Mar 2006 15:13:55 +0000 (10:13 -0500)
committeradam <adam@megacz.com>
Thu, 30 Mar 2006 15:13:55 +0000 (10:13 -0500)
darcs-hash:20060330151355-5007d-d6aa47b5567ff0a5790574a24a96ff8c5ebe7917.gz

25 files changed:
Makefile
src/edu/berkeley/sbp/GSS.java
src/edu/berkeley/sbp/misc/MetaGrammar.java
src/edu/berkeley/sbp/tib/TibDoc.java
tests/ArchSimA3.jar [new file with mode: 0644]
tests/ArchSimModel.dtd [new file with mode: 0644]
tests/ComponentList.dtd [new file with mode: 0644]
tests/OperationList.dtd [new file with mode: 0644]
tests/SimpleFleet.xml [new file with mode: 0644]
tests/archscript.g [new file with mode: 0644]
tests/components.xml [new file with mode: 0644]
tests/connections.xml [new file with mode: 0644]
tests/grappa.jar [new file with mode: 0644]
tests/input.tibdoc
tests/java.tc [new file with mode: 0644]
tests/join.g [new file with mode: 0644]
tests/library.xml [new file with mode: 0644]
tests/parameters.xml [new file with mode: 0644]
tests/regression.tc
tests/scl.g [new file with mode: 0644]
tests/script.xml [new file with mode: 0644]
tests/settings.xml [new file with mode: 0644]
tests/test.archscript [new file with mode: 0644]
tests/test.fleet [new file with mode: 0644]
tests/tibdoc.g

index c2dd714..f61196e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 
 java = java
 
 
 java = java
 
-doc: edu.berkeley.sbp.jar
+tibdoc: edu.berkeley.sbp.jar
        $(java) -cp $< edu.berkeley.sbp.tib.TibDoc \
                tests/tibdoc.g \
                tests/input.tibdoc
        $(java) -cp $< edu.berkeley.sbp.tib.TibDoc \
                tests/tibdoc.g \
                tests/input.tibdoc
index 1d91f89..5690c07 100644 (file)
@@ -25,7 +25,7 @@ class GSS {
     public  Forest.Ref finalResult;
 
     /** corresponds to a positions <i>between tokens</i> the input stream; same as Tomita's U_i's */
     public  Forest.Ref finalResult;
 
     /** corresponds to a positions <i>between tokens</i> the input stream; same as Tomita's U_i's */
-    public class Phase<Tok> implements Invokable<State, Forest, Phase<Tok>.Node>, IntegerMappable {
+    class Phase<Tok> implements Invokable<State, Forest, Phase<Tok>.Node>, IntegerMappable {
 
         public void invoke(State st, Forest result, Node n) {
             good |= next.newNode(n, result, st, false);
 
         public void invoke(State st, Forest result, Node n) {
             good |= next.newNode(n, result, st, false);
index c96d2ff..378a53c 100644 (file)
@@ -504,6 +504,12 @@ public class MetaGrammar extends StringWalker {
 
 
 
 
 
 
+
+
+
+
+
+
         // DO NOT EDIT STUFF BELOW: IT IS AUTOMATICALLY GENERATED
 new edu.berkeley.sbp.Tree(null, "grammar", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "=", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "s", new edu.berkeley.sbp.Tree[] { })}),
         new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "psx", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "ps", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "!", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "nonTerminal", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "w", new edu.berkeley.sbp.Tree[] { }),
         // DO NOT EDIT STUFF BELOW: IT IS AUTOMATICALLY GENERATED
 new edu.berkeley.sbp.Tree(null, "grammar", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "=", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "s", new edu.berkeley.sbp.Tree[] { })}),
         new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "psx", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "ps", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "!", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "nonTerminal", new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, null, new edu.berkeley.sbp.Tree[] { new edu.berkeley.sbp.Tree(null, "w", new edu.berkeley.sbp.Tree[] { }),
@@ -1158,3 +1164,9 @@ new edu.berkeley.sbp.Tree(null, "grammar", new edu.berkeley.sbp.Tree[] { new edu
 
 
 
 
 
 
+
+
+
+
+
+
index 4dccac8..b8a4c48 100644 (file)
@@ -103,9 +103,9 @@ public class TibDoc {
     public static class Today         extends Text            { }
     public static class Euro          extends Text            { public void toHTML(ToHTML.HTML sb) { sb.entity(8364); } }
     public static class Link          extends Text {
     public static class Today         extends Text            { }
     public static class Euro          extends Text            { public void toHTML(ToHTML.HTML sb) { sb.entity(8364); } }
     public static class Link          extends Text {
-        public Object word;
+        public Text[] text;
         public URI href;
         public URI href;
-        public void toHTML(ToHTML.HTML sb) { sb.tag("a", new Object[] { "href", href }, word); }
+        public void toHTML(ToHTML.HTML sb) { sb.tag("a", new Object[] { "href", href }, text); }
     }
     public static class Entity        extends Text {
         public final String entity;
     }
     public static class Entity        extends Text {
         public final String entity;
diff --git a/tests/ArchSimA3.jar b/tests/ArchSimA3.jar
new file mode 100644 (file)
index 0000000..96f120a
Binary files /dev/null and b/tests/ArchSimA3.jar differ
diff --git a/tests/ArchSimModel.dtd b/tests/ArchSimModel.dtd
new file mode 100644 (file)
index 0000000..31a71d8
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version='1.0' encoding='us-ascii'?>
+
+<!--
+   DTD for an archsim model
+-->
+
+<!ELEMENT model ((component | connection?)+)>
+<!ATTLIST model
+       name CDATA #REQUIRED 
+>
+
+<!ELEMENT component ( parameter | comment )* >
+<!ATTLIST component
+       name CDATA #REQUIRED
+       type CDATA #REQUIRED
+       parameter CDATA #IMPLIED
+>
+
+<!ELEMENT connection (comment*, from+, to+, parameter*)>
+<!ATTLIST connection
+       name CDATA #REQUIRED
+>
+
+<!ELEMENT from (comment*) >
+<!ATTLIST from
+       component CDATA #REQUIRED
+       terminal CDATA #REQUIRED
+>
+
+<!ELEMENT to ( comment* ) >
+<!ATTLIST to
+       component CDATA #REQUIRED
+       terminal CDATA #REQUIRED
+>
+
+<!ELEMENT parameter (comment*) >
+<!ATTLIST parameter
+       name CDATA #REQUIRED
+       value CDATA #REQUIRED
+>
+                   
+<!ELEMENT comment (#PCDATA) >
\ No newline at end of file
diff --git a/tests/ComponentList.dtd b/tests/ComponentList.dtd
new file mode 100644 (file)
index 0000000..d480fe1
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version='1.0' encoding='us-ascii'?>
+
+<!--
+   DTD for a list of components used in archsim models
+-->
+
+<!ELEMENT comment (#PCDATA) >
+
+<!ELEMENT component_list (component*)>
+<!ELEMENT component (type, class, info?)>
+<!ELEMENT type (#PCDATA)>
+<!ELEMENT class (#PCDATA)>
+<!ELEMENT info ((tag | input | output | parameter | global)*) >
+
+<!ELEMENT tag (comment*) >
+<!ATTLIST tag
+       value CDATA #REQUIRED
+>
+
+<!ELEMENT input (comment*) >
+<!ATTLIST input
+       name CDATA #REQUIRED
+>
+
+<!ELEMENT output (comment*) >
+<!ATTLIST output
+       name CDATA #REQUIRED
+>
+
+<!ELEMENT parameter (comment*) >
+<!ATTLIST parameter
+       name CDATA #REQUIRED
+       type CDATA #IMPLIED
+>
+
+<!ELEMENT global (comment*) >
+<!ATTLIST global
+       name CDATA #REQUIRED
+       type CDATA #IMPLIED
+>
diff --git a/tests/OperationList.dtd b/tests/OperationList.dtd
new file mode 100644 (file)
index 0000000..6b69174
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version='1.0' encoding='us-ascii'?>
+
+<!--
+   DTD for operations list
+-->
+
+<!ELEMENT operation_list ( 
+       ( load_parameters
+       | print_parameters
+       | load_components 
+       | load_model
+       | load_aliases
+       | load_program
+       | build_GASP_model
+       | output
+       | journal
+       | error
+       | info
+       | run
+       | step
+       | reset
+       | self_check
+       | print_components
+       | print_model
+       | print_model_description
+       | print_status )* ) >
+
+<!ELEMENT load_parameters (comment* ) >
+<!ATTLIST load_parameters
+       file CDATA #REQUIRED
+> 
+
+<!ELEMENT print_parameters (comment* ) >
+
+<!ELEMENT load_components (comment* ) >
+<!ATTLIST load_components
+       file CDATA #REQUIRED
+> 
+
+<!ELEMENT load_model ( comment* ) >
+<!ATTLIST load_model
+       file CDATA #REQUIRED
+>
+
+<!ELEMENT load_aliases ( comment* ) >
+<!ATTLIST load_aliases
+       file CDATA #REQUIRED
+>
+
+<!ELEMENT load_program ( comment* ) >
+<!ATTLIST load_program
+       file CDATA #REQUIRED
+>
+
+
+<!ELEMENT build_GASP_model (comment*) >
+
+<!ELEMENT output ( comment* ) >
+<!ATTLIST output
+       file CDATA #REQUIRED
+>
+
+<!ELEMENT journal ( comment* ) >
+<!ATTLIST journal
+       file CDATA #REQUIRED
+>
+
+<!ELEMENT error ( comment* ) >
+<!ATTLIST error
+       file CDATA #REQUIRED
+>
+
+<!ELEMENT info ( comment* ) >
+<!ATTLIST info
+       file CDATA #REQUIRED
+>
+
+<!ELEMENT run ( comment* ) >
+<!ATTLIST run
+       time CDATA #REQUIRED 
+>
+
+<!ELEMENT step ( comment* ) >
+<!ATTLIST step
+       number CDATA #IMPLIED
+>
+
+<!ELEMENT self_check ( comment* ) >
+
+<!ELEMENT reset ( comment* ) >
+
+<!ELEMENT print_components ( comment* ) >
+
+<!ELEMENT print_model ( comment* ) >
+
+<!ELEMENT print_model_description ( comment* ) >
+
+<!ELEMENT print_status ( comment* ) >
+
+<!ELEMENT comment (#PCDATA) >
\ No newline at end of file
diff --git a/tests/SimpleFleet.xml b/tests/SimpleFleet.xml
new file mode 100644 (file)
index 0000000..e45a469
--- /dev/null
@@ -0,0 +1,126 @@
+<?xml version='1.0' encoding='utf-8'?>
+
+<!DOCTYPE model SYSTEM "ArchSimModel.dtd">
+
+<model name= "SimpleFleet">
+
+
+<component name= "SourceFunnel" type= "SourceFunnel4" />
+<component name= "InstructionHorn" type= "InstructionHorn4" />
+
+<component name= "Trunk" type= "Trunk" >
+       <parameter name="trunkArbiterDelay" value="5" />
+</component>
+
+<component name= "DestinationHorn" type= "DestinationHorn4" />
+
+<component name= "FetchAndIssue" type= "FetchAndIssue" >
+</component>
+
+<component name= "Fifo5" type= "FifoShip" >
+       <parameter name="fifoCapacity" value="5" />
+       <parameter name="backwardDelay" value="500" />  
+</component>
+
+<component name= "Fifo2" type= "FifoShip" parameter="2" >
+       <parameter name="fifoCapacity" value="2" />
+       <parameter name="forwardDelay" value="100" />
+</component>
+
+<component name= "BitBucket" type= "BitBucket" />
+<component name= "ConstantOne" type= "Constant">
+       <parameter name="constantValue" value= "ONE" />
+</component>
+<component name= "ConstantTwo" type= "Constant" >
+       <parameter name= "constantValue" value="TWO" />
+</component>
+<!-- fetch and issue connections -->
+
+<connection name= "InstructionEntry">
+       <from component= "FetchAndIssue" terminal="InstructionOut" />
+       <to component= "InstructionHorn" terminal="In" />
+</connection>
+
+<connection name= "LiteralBypass">
+       <from component= "FetchAndIssue" terminal="LiteralOut" />
+       <to component= "Trunk" terminal="BypassIn" />
+</connection>
+
+<connection name= "BagNameIn">
+       <from component= "DestinationHorn" terminal="Out0" />
+       <to component= "FetchAndIssue" terminal="In" />
+</connection>
+
+<!-- trunk connections -->
+
+<connection name= "TrunkIn">
+       <from component= "SourceFunnel" terminal="Out" />
+       <to component= "Trunk" terminal="FabricIn" />
+</connection>
+
+<connection name= "TrunkOut">
+       <from component= "Trunk" terminal="Out" />
+       <to component= "DestinationHorn" terminal="In" />
+</connection>
+
+<!-- ship connections -->
+
+<connection name= "ConstOneOut">
+       <from component= "ConstantOne" terminal="Out" />
+       <to component= "SourceFunnel" terminal="SrcIn0" />
+</connection>
+
+<connection name= "Fifo5In">
+       <from component= "DestinationHorn" terminal="Out1" />
+       <to component= "Fifo5" terminal="In" />
+</connection>
+
+<connection name= "Fifo5Out">
+       <from component= "Fifo5" terminal="Out" />
+       <to component= "SourceFunnel" terminal="SrcIn1" />
+</connection>
+
+<connection name= "Fifo2In">
+       <from component= "DestinationHorn" terminal="Out2" />
+       <to component= "Fifo2" terminal="In" />
+</connection>
+
+<connection name= "Fifo2Out">
+       <from component= "Fifo2" terminal="Out" />
+       <to component= "SourceFunnel" terminal="SrcIn2" />
+</connection>
+
+<connection name= "BitBucketIn">
+       <from component= "DestinationHorn" terminal="Out3" />
+       <to component= "BitBucket" terminal="In" />
+</connection>
+
+<connection name= "ConstTwoOut">
+       <from component= "ConstantTwo" terminal="Out" />
+       <to component= "SourceFunnel" terminal="SrcIn3" />
+</connection>
+
+
+<!-- instruction tokens: instr horn to source funnel -->
+
+<connection name= "InstrToken0">
+       <from component= "InstructionHorn" terminal="Out0" />
+       <to component= "SourceFunnel" terminal="In0" />
+</connection>
+
+<connection name= "InstrToken1">
+       <from component= "InstructionHorn" terminal="Out1" />
+       <to component= "SourceFunnel" terminal="In1" />
+</connection>
+
+<connection name= "InstrToken2">
+       <from component= "InstructionHorn" terminal="Out2" />
+       <to component= "SourceFunnel" terminal="In2" />
+</connection>
+
+<connection name= "InstrToken3">
+       <from component= "InstructionHorn" terminal="Out3" />
+       <to component= "SourceFunnel" terminal="In3" />
+</connection>
+
+</model>
\ No newline at end of file
diff --git a/tests/archscript.g b/tests/archscript.g
new file mode 100644 (file)
index 0000000..5e36d45
--- /dev/null
@@ -0,0 +1,45 @@
+// A grammar for assembling archsim networks
+
+s               = !ws (Statement +/ ws) !ws
+
+Statement       = Import | Instance | Settings | Operations
+
+Settings        = "settings" (Setting+/newline) /newline
+Setting         = Name ^"=" quoted              /ws
+
+Import          = ^"import" JavaClassName "as" Type  /ws
+JavaClassName   = Name +/ "."
+
+Instance        = ^"component" !ws ComponentName !ws ":" !ws Type (!newline Connection +/ newline)?
+
+Connection      = Port ^"->" ForeignPort   /ws
+                | Port ^"<-" ForeignPort   /ws
+
+ForeignPort     = ComponentName ^"." Port
+
+Type            = Name
+Port            = Name
+ComponentName   = Name
+Name            = string:: [a-zA-Z0-9_]++
+
+quoted          = "\"" ~[\"]* "\""
+newline         = !ws "\n" !ws
+ws              = [\r\n ]**
+                | [\r\n ]** !Comment !ws
+Comment         = "//" ~[\n]* "\n"
+                | "/*" ~[\n]* "*/"
+
+Operations      = ^"operations" (Operation+/newline) /newline
+Operation       = ^"build_GASP_model"
+                | ^"output" quoted                   /ws
+                | ^"journal" quoted                  /ws
+                | ^"error" quoted                    /ws
+                | ^"info" quoted                     /ws
+                | ^"run" [0-9]++                     /ws
+                | ^"step" [0-9]++                    /ws
+                | ^"self_check"
+                | ^"reset"
+                | ^"print_parameters"
+                | ^"print_components"
+                | ^"print_model"
+                | ^"print_model_description"
diff --git a/tests/components.xml b/tests/components.xml
new file mode 100644 (file)
index 0000000..2494edc
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE component_list SYSTEM 'ComponentList.dtd'>
+<component_list>
+<component><type>PayloadSource</type><class>com.sunlabs.archsim.assignJan18.Source</class></component>
+<component><type>PayloadSink</type><class>com.sunlabs.archsim.assignJan18.Sink</class></component>
+<component><type>FifoElement</type><class>com.sunlabs.archsim.assignJan18.FifoElement</class></component>
+</component_list>
diff --git a/tests/connections.xml b/tests/connections.xml
new file mode 100644 (file)
index 0000000..11e601d
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE model SYSTEM 'ArchSimModel.dtd'>
+ <model name='Assignment 1'>
+  <component name="Source" type="PayloadSource"/>
+  <component name="Sink" type="PayloadSink"/>
+  <component name="FifoOne" type="FifoElement"/>
+  <connection name='FifoOne.In'>
+    <from component="Source" terminal="Out"/>
+    <to   component="FifoOne" terminal="In"/>
+  </connection>
+  <connection name='FifoOne.Out'>
+    <from component="FifoOne" terminal="Out"/>
+    <to   component="Sink" terminal="In"/>
+  </connection>
+ </model>
+
diff --git a/tests/grappa.jar b/tests/grappa.jar
new file mode 100644 (file)
index 0000000..8ee8988
Binary files /dev/null and b/tests/grappa.jar differ
index 4650275..30d0d77 100644 (file)
@@ -8,9 +8,9 @@ header
   this is the body adam@megacz.com text \today
   You can visit {my website}->adam@megacz.com with -- a !hyperlink to it!
 
   this is the body adam@megacz.com text \today
   You can visit {my website}->adam@megacz.com with -- a !hyperlink to it!
 
-  The following demonstrates->http://www.slashdot.org/ verbatim stuff [[Knu68]], as
-  well \br as \br a \br footnote ((like)) because are
-  coool in an O(n^^3) way.
+  The following {demonstrates}->http://www.slashdot.org/ verbatim
+  stuff [[Knu68]], as well \br as \br a \br footnote ((like)) because
+  are coool in an O(n^^3) way.
 
   "" this is a test of \sc{paragraph of fun}
      the blockquote mechanism they,,{yer mom} 
 
   "" this is a test of \sc{paragraph of fun}
      the blockquote mechanism they,,{yer mom} 
diff --git a/tests/java.tc b/tests/java.tc
new file mode 100644 (file)
index 0000000..d9dcf69
--- /dev/null
@@ -0,0 +1,6 @@
+javacase {
+    input "1+1";
+    s    = Expr
+    Expr =       left:Expr ^"+" right:Expr
+         | num:: num:[0-9]+
+}
\ No newline at end of file
diff --git a/tests/join.g b/tests/join.g
new file mode 100644 (file)
index 0000000..0ad7281
--- /dev/null
@@ -0,0 +1,26 @@
+
+
+
+Expr =
+
+
+
+ram addr data we -> data ack =
+  clock => we ? data -> storage.data[addr]
+              : 
+
+
+merge ( a b c ) =
+  a(x)        => rega=x | a_ok
+  b(x)        => regb=x | b_ok
+  a_ok & b_ok => c=x
+
+
+
+bit[32]
+{ alpha=
+
+
+X           (datapath)
+Event-of-X  (control)
+
diff --git a/tests/library.xml b/tests/library.xml
new file mode 100644 (file)
index 0000000..1498416
--- /dev/null
@@ -0,0 +1,804 @@
+<?xml version='1.0' encoding='utf-8'?>
+
+<!--  Component library -->
+
+<!DOCTYPE component_list SYSTEM "ComponentList.dtd">
+
+<component_list>
+
+<!--
+THE FOLLOWING GROUP OF COMPONENTS IS USED FOR BUILDING SWITCH FABRICS.
+-->
+
+<component>
+<type>SourceFunnel</type>
+<class> com.sunlabs.archsim.fleet.HornAndFunnel.SourceFunnel </class>
+<info>
+       <tag value="FABRIC"/>
+       <!--
+       Inputs: In0, In1, ..., InK
+                       SrcIn0, SrcIn1, ..., SrcInK     
+       -->
+       <output name="Out" />
+       <parameter name= "depth" type="int"/>
+       <global name="mergeArbiterDelay" type="int" />
+       <global name="mergePassDelay" type="int" />
+       <global name="mergeAckDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       Takes Payload (instruction) inputs on InX, and Data inputs on
+       SrcInX. When both inputs are received, the data is inserted
+       into the payload and funneled to Out.
+Global parameters: 
+       mergeArbiterDelay
+       mergePassDelay
+       mergeAckDelay
+Individual parameter: 
+       depth = Depth of the tree. The number of input pairs is 2 ^ (depth).
+-->
+</component>
+
+<component>
+<type>InstructionHorn</type>
+<class> com.sunlabs.archsim.fleet.HornAndFunnel.InstructionHorn </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <!--
+       Outputs: Out0, Out1, ... , OutK
+       -->
+       <parameter name= "depth" type="int"/>
+</info>
+<!--
+Behavior: 
+       Instruction horn - takes Payloads (Instructions) on In, 
+       steers them to the output determined by the source
+       attribute from Payload.
+Global parameters:
+Individual parameters: 
+       depth = depth of the tree. The number of outputs is 2 ^ (depth).
+-->
+</component>
+
+<component>
+<type>DestinationHorn</type>
+<class> com.sunlabs.archsim.fleet.HornAndFunnel.DestinationHorn </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <!--
+       Outputs: Out0, Out1, ... , OutK
+       -->
+       <parameter name= "depth" type="int"/>
+</info>
+<!--
+Behavior:
+       Horn, - takes Payloads (Instructions) on In, 
+       steers them to the output determined by the destination
+       attribute from Payload.
+Individual parameter: 
+       depth = d of the tree. The number of outputs is 2 ^ (depth).
+-->
+</component>
+
+<component>
+<type>DataMaskBranch</type>
+<class> com.sunlabs.archsim.fleet.components.switchFabric.DataMaskBranch </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <output name="Out0" />
+       <output name="Out1" />
+       <parameter name="branchMask" type="int" />
+       <parameter name= "branchMaskBit" type="int" />
+</info>
+<!--
+Behavior: 
+       Input received on In is steered either to Out0 or Out1, depending on the
+       specified bit in Integer data carried by Payload.
+Individual parameters: 
+       branchMask (default = 1)
+       branchMaskBit (default = 0)
+-->
+</component>
+
+<component>
+<type>DestinationMaskBranch</type>
+<class> com.sunlabs.archsim.fleet.components.switchFabric.DestinationMaskBranch </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <output name="Out0" />
+       <output name="Out1" />
+       <parameter name="branchMask" type="int" />
+       <parameter name= "branchMaskBit" type="int" />
+</info>
+<!--
+Behavior: 
+       Input received on In is steered either to Out0 or Out1, depending on the
+       specified bit in the Payload's destination
+Individual parameters: 
+       branchMask (default = 1)
+       branchMaskBit (default = 0)
+-->
+</component>
+
+<component>
+<type>SourceMaskBranch</type>
+<class> com.sunlabs.archsim.fleet.components.switchFabric.SourceMaskBranch </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <output name="Out0" />
+       <output name="Out1" />
+       <parameter name="branchMask" type="int"/>
+       <parameter name= "branchMaskBit" type="int"/>
+</info>
+<!--
+Behavior: 
+       Input received on In is steered either to Out0 or Out1, depending on the
+       specified bit in the Payload's source
+Individual parameters: 
+       branchMask (default = 1)
+       branchMaskBit (default = 0)
+-->
+</component>
+
+<component>
+<type>ToggleBranch</type>
+<class> com.sunlabs.archsim.fleet.components.switchFabric.ToggleBranch </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <output name="Out0" />
+       <output name="Out1" />
+       <parameter name="branchFanout" type="int"/>
+</info>
+<!--
+Inputs:                In
+Outputs:       Out0, Out1, ... , OutK
+Behavior: 
+       Input received on In is steered to Out0, Out1, ... , OutK 
+       in a round robin fashion
+Individual parameters: 
+       branchFanout (default = 2)
+-->
+</component>
+
+<component>
+<type>Merge</type>
+<class> com.sunlabs.archsim.fleet.components.switchFabric.Merge </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In0" />
+       <input name="In1" />
+       <output name="Out" />
+       <parameter name="mergeFanIn" type="int"/>
+       <parameter name= "mergeArbiterDelay" type="int"/>
+       <parameter name= "mergePassDelay" type="int"/>
+       <parameter name= "mergeAckDelay" type="int"/>
+       <parameter name= "mergeArbiterActionPassDelay" type="int"/>
+       <parameter name= "mergeIntouActionPassDelay" type="int"/>
+       <parameter name= "mergeInpuAckDelay" type="int"/>
+       <parameter name= "mergeOutputAckDelay" type="int"/>
+       <global name="mergeArbiterDelay" type="int" />
+       <global name="mergePassDelay" type="int" />
+       <global name="mergeAckDelay" type="int" />
+       <global name="mergeArbiterActionPassDelay" type="int" />
+       <global name="mergeIntouActionPassDelay" type="int" />
+       <global name="mergeInpuAckDelay" type="int" />
+       <global name="mergeOutputAckDelay" type="int" />
+</info>
+<!--
+Inputs:        In0, in2, ..., InK
+Outputs:       Out 
+Behavior: Demand merge - all inputs are steered to one output
+-->
+</component>
+
+<component>
+<type>DataPayloadMerge</type>
+<class> com.sunlabs.archsim.fleet.HornAndFunnel.SourceSync </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <input name="SrcIn" />
+       <output name="Out" />
+</info>
+<!--
+Behavior: 
+       Inserts Data arrraiving at SrcIn into Payload arriving at In. After both
+       inputs had arrived, it produces a Payload with inserted Data on Out.
+-->
+</component>
+
+
+<component>
+<type>Trunk</type>
+<class> com.sunlabs.archsim.fleet.components.trunk.Trunk </class>
+<info>
+       <tag value="FABRIC"/>
+
+       <input name="FabricIn" />
+       <input name="BypassIn" />
+
+       <output name="Out" />
+
+       <parameter name="trunkArbiterDelay" type="int"/>
+       <parameter name="trunkCopyDelay" type="int"/>
+       <parameter name="trunkAckDelay" type="int"/>
+
+       <global name="trunkArbiterDelay" type="int" />
+       <global name="trunkCopyDelay" type="int" />
+       <global name="trunkAckDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       Essentially a demand merge - merges inputs on BypassIn (literals) and on
+       FabricIn ("regular" instructions) in one output Out. The two sources of inputs are
+       arbitrated.
+-->
+</component>
+
+<component>
+<type>FifoElement</type>
+<class> com.sunlabs.archsim.fleet.ships.fifo.FifoElement </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <output name="Out" />
+       <parameter name="forwardDelay" type="int"/>
+       <parameter name="backwardDelay" type="int"/>
+       <global name="fifoForwardDelay" type="int" />
+       <global name="fifoBackwardDelay" type="int" />
+</info>
+<!--
+Inputs: In
+Outputs: Out
+Behavior: 
+       A fifo element. Elements strung together form a Fifo
+       Can only be used in a switch fabric not as a ship.
+-->
+</component>
+
+
+<component>
+<type>Fifo</type>
+<class> com.sunlabs.archsim.fleet.ships.fifo.Fifo </class>
+<info>
+       <tag value="FABRIC"/>
+       <input name="In" />
+       <output name="Out" />
+       <parameter name="fifoCapacity" type="int"/>
+       <parameter name="forwardDelay" type="int"/>
+       <parameter name="backwardDelay" type="int"/>
+       <global name="fifoForwardDelay" type="int" /> <!-- applies to one element -->
+       <global name="fifoBackwardDelay" type="int" /> <!-- applies to one element -->
+</info>
+<!--
+Behavior: 
+       A fifo.
+       Can only be used in a switch fabric not as a ship.
+-->
+</component>
+
+<!--
+
+THE FOLLOWING IS IS A LIST OF SHIPS.
+
+-->
+
+<component>
+<type>FetchAndIssue</type>
+<class> com.sunlabs.archsim.fleet.ships.fetchAndIssue.FetchAndIssue </class>
+<info>
+       <tag value="SHIP"/>     <input name="In" />
+       <output name="InstructionOut" />
+       <output name="LiteralOut" />
+       <global name="instructionIssueDelay" type="int" /> 
+       <global name="literalIssueDelay" type="int" /> 
+       <global name="fetchDelay" type="int" /> 
+</info>
+<!--
+Behavior: 
+       Takes a ship name in, fetches the code, issues literals and instructions
+       on corresponding output.                                   
+-->
+</component>
+
+<component>
+<type>Accumulator</type>
+<class> com.sunlabs.archsim.fleet.ships.accumulator.Accumulator </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In" />
+       <output name="Out" />
+       <global name="accumulatorOutDelay" type="int" /> 
+       <global name="accumulatorAckDelay" type="int" /> 
+</info>
+<!--
+Behavior: 
+       Take numbers on In, accumulate values. 
+       When OOB data is received, the sum is produced on Out,
+       and the accumulator is reset.
+-->
+</component>
+
+<component>
+<type>TokenAccumulator</type>
+<class> com.sunlabs.archsim.fleet.ships.tokenaccumulator.TokenAccumulator </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="DataIn" />
+       <input name="TokenOut" />
+       <output name="DataOut" />
+       <output name="TokenIn" />
+</info>
+<!--
+Behavior: 
+       Take numbers on In, accumulate values. 
+       When OOB data is received, the sum is produced on Out,
+       and the accumulator is reset.
+       TokenIn (output) and DataIn (input) form a request acknowledge
+       interface for receiving data.
+       Token Out (input)and DataOut (output) form a request-acknowledge
+       interface for the sum.
+-->
+</component>
+
+<component>
+<type>Adder</type>
+<class> com.sunlabs.archsim.fleet.ships.adder.Adder </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In1" />
+       <input name="In2" />
+       <output name="Out" />
+       <global name="adderDelay" type="int" />
+       <global name="adderAckDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       Receive two numbers on In1 and In2, then produce the sum on Out.
+-->
+</component>
+
+<component>
+<type>TokenAdder</type>
+<class> com.sunlabs.archsim.fleet.ships.tokenadder.TokenAdder </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In1" />
+       <input name="In2" />
+       <input name="TokenOut"/>
+       <output name="Out" />
+       <output name="TokenIn1" />
+       <output name="TokenIn1" />
+       <global name="tokenAdderDelay" type="int" />
+       <global name="tokenAdderAckDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       Receive two numbers on In1 and In2, then produce the sum on Out.
+       Request-acknowledge pairs forming the token interface
+       are: < In1, TokenIn1 >, < In2, TokenIn2 >, < TokenOut, Out >
+-->
+</component>
+
+<component>
+<type>AdderOOB</type>
+<class> com.sunlabs.archsim.fleet.ships.adder_oob.Adder_oob </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In1" />
+       <input name="In2" />
+       <output name="Out" />
+       <global name="adderOOBDelay" type="int" />
+       <global name="adderOOBAckDelay" type="int" />
+</info>
+<!--
+Behavior:
+       Receive two numbers on In1 and In2, then produce the sum on Out.
+       The difference between Adder and Adder_oob is that when A
+       dder_oob receives a OOB data on both inputs, it will produce 
+       an null Data, which will be propagated to other ships on the 
+       computation path and disassemble any standing MOVEs on it's 
+       way. This is used in the Fibonacci Fleet for terminating the 
+       computation.
+-->
+</component>
+
+<component>
+<type>BitBucket</type>
+<class> com.sunlabs.archsim.fleet.ships.bitbucket.BitBucket </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In" />
+       <parameter name="bitBucketdelay" type="int" />
+       <parameter name="bitBucketKeepData" type="int" />
+       <global name="bitBucketdelay" type="int" />
+       <global name="bitBucketKeepData" type="int" />
+</info>
+<!--
+Behavior: 
+       Takes any input and "throws it away".
+       Will keep all data if asked to - useful for testing.    
+-->
+</component>
+
+<component>
+<type>Constant</type>
+<class> com.sunlabs.archsim.fleet.ships.constant.Constant </class>
+<info>
+       <tag value="SHIP"/>
+       <output name="Out" />
+       <parameter name="constantValue" type="any" />
+       <parameter name="constantDelay" type="int" />
+       <global name="constantValue" type="any" />
+       <global name="constantDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       Always produces the same constrant (integer, boolean, or string)
+-->
+</component>
+
+<component>
+<type>Duplicator</type>
+<class> com.sunlabs.archsim.fleet.ships.duplicator.Duplicator </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In" />
+       <output name="Out1" />
+       <output name="Out2" />
+       <global name="duplicatorDelay" type="int" />
+       <global name="duplicatorAckDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       Duplicates data. For each input it receives, 
+       it produces a copy of it on both outputs.         
+-->
+</component>
+
+
+<component>
+<type>FifoShipElement</type>
+<class> com.sunlabs.archsim.fleet.ships.fifo.FifoShipElement </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In" />
+       <output name="Out" />
+       <parameter name="forwardDelay" type="int" />
+       <parameter name="fifoBackwardDelay" type="int" />
+       <global name="fifoShipForwardDelay" type="int" />
+       <global name="fifoShipBackwardDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       A fifo element. Elements strung together form a Fifo
+       Can only be used as a ship, or a part of a ship, 
+       not as a fifo in a switch fabric.
+-->
+</component>
+
+
+<component>
+<type>FifoShip</type>
+<class> com.sunlabs.archsim.fleet.ships.fifo.FifoShip </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In" />
+       <output name="Out" />
+       <parameter name="fifoCapacity" type="int" />
+       <parameter name="forwardDelay" type="int" /> <!-- applies to one element -->
+       <parameter name="fifoBackwardDelay" type="int" /> <!-- applies to one element -->
+       <global name="fifoShipForwardDelay" type="int" />
+       <global name="fifoShipBackwardDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       A fifo. Can only be used as a ship, not as a fifo in a switch fabric.
+-->
+</component>
+
+<component>
+<type>TokenFifoShipElement</type>
+<class> com.sunlabs.archsim.fleet.ships.tokenFifo.TokenFifoShipElement </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In" />
+       <input name="TokenIn" />
+       <output name="Out" />
+       <output name="TokenOut" />
+       <parameter name="forwardDelay" type="int" /> 
+       <parameter name="backwardDelay" type="int" /> 
+       <parameter name="tokenDelay" type="int" /> 
+       <parameter name="ackTokenDelay" type="int" /> 
+       <global name="fifoShipForwardDelay" type="int" />
+       <global name="fifoShipBackwardDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       A token fifo ship element. Elements strung together form a TokenFifo
+       Can only be used as a ship, not as a fifo in a switch fabric.
+       <In, TokenOut>, <TokenIn, Out>
+-->
+</component>
+
+<component>
+<type>TokenFifoShip</type>
+<class> com.sunlabs.archsim.fleet.ships.tokenFifo.TokenFifoShip </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In" />
+       <input name="TokenIn" />
+       <output name="Out" />
+       <output name="TokenOut" />
+       <parameter name="fifoCapacity" type="int" /> 
+       <parameter name="forwardDelay" type="int" /> 
+       <parameter name="backwardDelay" type="int" /> 
+       <parameter name="tokenDelay" type="int" /> 
+       <parameter name="ackTokenDelay" type="int" /> 
+       <global name="fifoShipForwardDelay" type="int" />
+       <global name="fifoShipBackwardDelay" type="int" />
+</info>
+<!--
+Behavior:
+       FifoShip with token interface.
+       Request acknowledge pairs are: <In, TokenOut>, <TokenIn, Out>
+-->
+</component>
+
+<component>
+<type>SimpleMemory</type>
+<class> com.sunlabs.archsim.fleet.ships.memory.SimpleMemory </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="ReadAddress" />
+       <input name="WriteAddress" />
+       <input name="WriteData" />
+       <output name="ReadData" />
+       <output name="WriteNext" />
+       <parameter name="readDelay" type="int" /> 
+       <parameter name="writeDelay" type="int" /> 
+       <parameter name="ackDelay" type="int" /> 
+       <parameter name="ackReadDelay" type="int" /> 
+       <parameter name="ackWriteDelay" type="int" /> 
+       <global name="simpleMemoryReadDelay" type="int" />
+       <global name="simpleMemoryWriteDelay" type="int" />
+       <global name="simpleMemoryAckDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       Memory. Read and write interface operat concurrently.
+       No pipelining - one piece of data is operated on at a time (on
+       each read and write side).
+-->
+</component>
+
+<component>
+<type>Selector</type>
+<class> com.sunlabs.archsim.fleet.ships.selector.Selector </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="In1" />
+       <input name="In2" />
+       <input name="InSelect" />
+       <output name="Out" />
+       <global name="selectorDelay" type="int" />
+       <global name="selectorAckDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       Selector selects between data on In1 and In2, depending on
+       the value it receives on InSelect: 1 selects In1, 2 selects In2.
+       The selcted value is produced on Out.
+       Upon receiving a LAST on its Select input, it will wait for 
+       a LAST to arrive on In1 and In2, consuming and ignoring all 
+       non LAST data.
+-->
+</component>
+
+<component>
+<type>Stride</type>
+<class> com.sunlabs.archsim.fleet.ships.stride.Stride </class>
+<info>
+       <tag value="SHIP"/>
+       <input name="StartValue" />
+       <input name="Step" />
+       <input name="StepCount" />
+       <input name="Next" />
+       <output name="Counter" />
+       <output name="Done" />
+       <parameter name="ackDelay" type="int" />
+       <parameter name="counterDelay" type="int" />
+       <global name="strideCounterDelay" type="int" />
+       <global name="strideAckDelay" type="int" />
+</info>
+<!--
+Behavior: 
+       This is a counter. Setup by providing start value, step size,
+       and step count. Ask for the next value by providing an
+       input on Next. The response is a value on Counter.
+       When the counting is complete, an otput is produced on
+       Done - this is a token that indicates that the stride
+       is ready for the next setup.
+-->    
+</component>
+
+<!--
+
+THESE ARE THE COMPONENTS MADE FOR SPECIALLY FOR COURSE ASSIGNMENTS.
+WHICH SHOULD MAKE IT INTO OUR GENERAL REPERTOAIRE?
+
+-->
+
+<component>
+<type>TwoMerge</type>
+<class> com.sunlabs.archsim.assignJan25.TwoMerge </class>
+</component>
+
+<component>
+<type>Toggle</type>
+<class> com.sunlabs.archsim.assignJan25.Toggle </class>
+</component>
+
+<component>
+<type>RandomBranch</type>
+<class> com.sunlabs.archsim.assignJan25.RandomBranch </class>
+</component>
+
+<component>
+<type>MaskBranch</type>
+<class> com.sunlabs.archsim.assignJan25.MaskBranch </class>
+</component>
+
+<component>
+<type>PayloadSource</type>
+<class> com.sunlabs.archsim.assignJan18.Source </class>
+</component>
+
+<component>
+<type>PayloadSink</type>
+<class> com.sunlabs.archsim.assignJan18.Sink </class>
+</component>
+
+<!--
+
+THESE COMPONENTS ARE INTENDED FOR USE IN AUTOMATED TESTING.
+THEY HAVE ADDITIONAL APIs THAT ACCOMODATE TEST REQUIREMENTS.
+THEY MAY OR MAY NOT CONFORM TO THE CONVENTION THAT A SHIP
+PRODUCES A Data OBJECT AND RECEIVES A Payload OBJECT, 
+WHILE SWITCH FABRIC COMPONENTS RECEIVE AND PRODUCE
+Payload OBJECTS.
+
+-->
+
+
+<component>
+<type>TestDataSink</type>
+<class> com.sunlabs.archsim.fleet.ships.testing.DataSink </class>
+<!--
+Used in automated testing. See code.
+-->
+</component>
+
+<component>
+<type>TestDataSource</type>
+<class> com.sunlabs.archsim.fleet.ships.testing.DataSource </class>
+<!--
+Used in automated testing. See code.
+-->
+</component>
+
+<component>
+<type>TestIntegerSequenceSource</type>
+<class> com.sunlabs.archsim.fleet.ships.testing.IntegerSequenceSource </class>
+<!--
+Used in automated testing. See code.
+-->
+</component>
+
+<component>
+<type>TestPayloadSink</type>
+<class> com.sunlabs.archsim.fleet.ships.testing.PayloadSink </class>
+<!--
+Used in automated testing. See code.
+-->
+</component>
+
+<component>
+<type>TestPayloadSource</type>
+<class> com.sunlabs.archsim.fleet.ships.testing.PayloadSource </class>
+<!--
+Used in automated testing. See code.
+-->
+</component>
+
+<component>
+<type>TestTokenSource</type>
+<class> com.sunlabs.archsim.fleet.ships.testing.TokenSource </class>
+<!--
+Used in automated testing. See code.
+-->
+</component>
+
+<component>
+<type>InstructionHorn4</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.InstructionHorn4 </class>
+<!--
+Used in automated testing. See code.
+-->
+</component>
+
+<!--
+
+THESE COMPONENTS MAY DISAPPEAR OR MAY NEED FIXING. 
+THEY WERE USED IN VERY EARLY TESTS.
+WE LIST THEM HERE FOR OLD TESTS TO STILL RUN.
+
+-->
+
+<component>
+<type>InstructionHorn8</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.InstructionHorn8 </class>
+</component>
+
+<component>
+<type>InstructionHorn16</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.InstructionHorn16 </class>
+</component>
+
+<component>
+<type>SourceFunnel4</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.SourceFunnel4 </class>
+</component>
+
+<component>
+<type>SourceFunnel8</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.SourceFunnel8 </class>
+</component>
+
+<component>
+<type>SourceFunnel16</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.SourceFunnel16 </class>
+</component>
+
+<component>
+<type>DestinationHorn4</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.DestinationHorn4 </class>
+</component>
+
+<component>
+<type>DestinationHorn8</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.DestinationHorn8 </class>
+</component>
+
+<component>
+<type>DestinationHorn16</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.DestinationHorn16 </class>
+</component>
+
+<component>
+<type>InstructionGenerator</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.TestInstrGen </class>
+</component>
+
+<component>
+<type>InstrGen4</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.TestInstrGen4 </class>
+</component>
+
+<component>
+<type>TestShip</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.TestShip </class>
+</component>
+
+<component>
+<type>TestShipRnd</type>
+<class> com.sunlabs.archsim.fleet.components.hornAndFunnelFabric.TestShipRnd </class>
+</component>
+
+</component_list>
diff --git a/tests/parameters.xml b/tests/parameters.xml
new file mode 100644 (file)
index 0000000..68edf67
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version='1.0' encoding='us-ascii'?>
+
+<settings>
+
+<global_log value="true" />
+
+<log_level value= "0" />
+<journal_state value="false" />
+<journal_action value="false" />
+<journal_terminal value="false" />
+
+<journalConnectionDataState value="false" />
+<journalConnectionAckState value="false" />
+
+
+<state_to_action_delay value="10" />
+<action_to_state_delay value="20" />
+<action_fired_delay value="0" />
+
+<arbiter_delay value="20" />
+<merge_arbiter_delay value="20" />
+<merge_pass_delay value="0" />
+<source_sync_pass_data_dela value= "0" />
+<source_sync_ack_delay value= "0" />
+
+<test_ship_source_delay value= "10" />
+<test_ship_sink_delay value= "10" />
+
+<fifo_ship_forward_delay value="10" />
+<fifo_ship_backward_delay value="10" />
+
+</settings>
\ No newline at end of file
index cbb50ce..faba28d 100644 (file)
@@ -355,6 +355,7 @@ testcase {
 
 testcase {
     input "aaaaa";
 
 testcase {
     input "aaaaa";
+    output "top:{a q:{{a a a}} a}";
     s = top:: z (q::"a"*) z
     z = a:: "a"
 }
     s = top:: z (q::"a"*) z
     z = a:: "a"
 }
@@ -363,11 +364,11 @@ testcase {
     input  "if (x) if (y) z else q";
     output "if:{ident:{{x}} else:{if:{ident:{{y}} then:{ident:{{z}}}} ident:{{q}}}}";
 
     input  "if (x) if (y) z else q";
     output "if:{ident:{{x}} else:{if:{ident:{{y}} then:{ident:{{z}}}} ident:{{q}}}}";
 
-    s      = e
+    s      = Expr
     Expr   = if::     "if" "(" Expr ")" IfBody     /ws
            | ident::  [a-z]++
     Expr   = if::     "if" "(" Expr ")" IfBody     /ws
            | ident::  [a-z]++
-    IfBody = else::   Expr             "else" Expr /ws
-           | then::   Expr &~     ~[]* "else" Expr /ws
+    IfBody = else::   Expr            "else"  Expr /ws
+           | then::   Expr &~   (~[]* "else" !Expr /ws)
     ws     = [ ]**
 }
 
     ws     = [ ]**
 }
 
diff --git a/tests/scl.g b/tests/scl.g
new file mode 100644 (file)
index 0000000..11f2dd1
--- /dev/null
@@ -0,0 +1,107 @@
+
+
+data foo = bar;
+type foo = bar;
+
+type Bit     = 0 | 1
+type Char    = Bit[16]
+type Boolean = true    | false
+type Int32   = Bit[32] | oob
+type Int64   = Bit[64] | oob
+type Pointer = Bit[64]
+type CodeBag = Pointer
+type Void   = token
+
+ship Adder3 (a b c -> d e f)
+  input e : !
+  ...
+
+  (x->a) => 3->b
+
+module latch32
+  input  data_in     : Int32
+  input  transparent : Boolean!
+  output data_out    : Int32
+  private
+    state keeper : Int32
+    data_out = keeper
+    transparent(true)  => keeper = data_in
+    transparent(false) => keeper = keeper
+
+module flipflop<T>
+   input  dataIn  : T
+   input  clock   : Void!
+   output dataOut : T
+   private
+      state keeper : T
+      data_out = keeper
+      clock() => keeper := 
+
+module join
+   input  in1 : Void!
+   input  in2 : Void!
+   output out : Void!
+   private
+
+A single-clock synchronous system is therefore a system with only a single variable of event type.  A synchronous sytem with mu
+
+
+// how do you specify the initial state of keeper nodes?  
+
+fleet
+  Adder3[1..3]
+
+
+Type   ::= Boolean
+
+
+
+Action  = Action ","  Action
+        | Value  "->" Port+
+        
+
+Identifier  ::=  Id  |  "(" Sym ")"
+
+Definition  ::=  Identifier "=" Body      /ws
+
+Grammar     ::=  
+
+clock
+random number generator
+register
+fifo
+compare
+
+clear-read port
+
+// positioning of elements on the screen (psuedo-comment?)
+// subcircuits
+// ports (in, out)
+
+Parameter   ::=  Identifier   (":" Type)?
+
+
+andgate {a b}->{c d} = 
+  input a, b
+  output c, d
+
+
+module fifo <in>
+  
+
+latch (input, hold) =
+  old = case 
+  out = case
+    
+
+
+and, xor, 2:1mux, 4:1mux
+
+leds, graphs, clock
+
+charing
+
+rs-latch
+dq-flipflop
+
+parameterization (?)
diff --git a/tests/script.xml b/tests/script.xml
new file mode 100644 (file)
index 0000000..f398525
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE operation_list SYSTEM 'OperationList.dtd'>
+<operation_list>
+  <load_parameters file='settings.xml'/>
+  <print_parameters/>
+  <load_components file='components.xml'/>
+  <print_components/>
+  <load_model file='connections.xml'/>
+  <print_parameters/>
+  <build_GASP_model/>
+  <self_check/>
+  <print_model_description/>
+  <reset/>
+  <print_model/>
+  <run time="1000"/>
+</operation_list>
+
diff --git a/tests/settings.xml b/tests/settings.xml
new file mode 100644 (file)
index 0000000..102666f
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='utf-8'?>
+<settings>
+  <sourceDelay value="50"/>
+  <sourceDisplayGenerated value="false"/>
+  <sourceMaxGenerated value="100"/>
+  <sinkDelay value="10"/>
+  <sinkDisplayReceived value="false"/>
+  <sinkMaxStored value="100"/>
+  <fifo_forward_delay value="10"/>
+  <fifo_ack_delay value="10"/>
+  <state_to_action_delay value="10"/>
+  <action_to_state_delay value="10"/>
+  <action_fired_delay value="0"/>
+  <global_log value="true"/>
+  <log_level value="0"/>
+  <journal_state value="true"/>
+  <journal_action value="false"/>
+  <journal_terminal value="false"/>
+  <journalConnectionDataState value="false"/>
+  <journalConnectionAckState value="false"/>
+</settings>
diff --git a/tests/test.archscript b/tests/test.archscript
new file mode 100644 (file)
index 0000000..b5eaeab
--- /dev/null
@@ -0,0 +1,38 @@
+import com.sunlabs.archsim.assignJan18.Source       as PayloadSource
+import com.sunlabs.archsim.assignJan18.Sink         as PayloadSink
+import com.sunlabs.archsim.assignJan18.FifoElement  as FifoElement
+
+component Source:PayloadSource
+component Sink:PayloadSink
+component FifoOne:FifoElement
+  In  <- Source.Out
+  Out -> Sink.In
+
+operations
+  print_parameters
+  build_GASP_model
+  self_check
+  print_model_description
+  reset
+  print_model
+  run 1000
+
+settings
+  sourceDelay="50"
+  sourceDisplayGenerated="false"
+  sourceMaxGenerated="100"
+  sinkDelay="10"
+  sinkDisplayReceived="false"
+  sinkMaxStored="100"
+  fifo_forward_delay="10"
+  fifo_ack_delay="10"
+  state_to_action_delay="10"
+  action_to_state_delay="10"
+  action_fired_delay="0"
+  global_log="true"
+  log_level="0"
+  journal_state="true"
+  journal_action="false"
+  journal_terminal="false"
+  journalConnectionDataState="false"
+  journalConnectionAckState="false"
diff --git a/tests/test.fleet b/tests/test.fleet
new file mode 100644 (file)
index 0000000..744a0d6
--- /dev/null
@@ -0,0 +1,8 @@
+
+// this is a test
+
+  bob: { z -> q }
+  bob -> mary
+  mary := bob
+
+  a -> foo, /* charles, */ baz
index 68f2b03..ec31d30 100644 (file)
@@ -67,7 +67,6 @@ SectionHeaderBody   =  "=" SectionHeaderBody "="
 sp       = " "**
 blank    = !sp "\n" !sp "\n" !ws
 
 sp       = " "**
 blank    = !sp "\n" !sp "\n" !ws
 
-
 kv           = kv:: key:word "=" val:text /ws
 wp           = w++
 num          = [0-9]++
 kv           = kv:: key:word "=" val:text /ws
 wp           = w++
 num          = [0-9]++
@@ -85,17 +84,17 @@ text         = Item
 Itemx        = !ws Item
              | ()
 Item         = blockquote
 Itemx        = !ws Item
              | ()
 Item         = blockquote
-             > "[]":: { UL:: uli+/ws }          Itemx
-             | "[]":: { OL:: oli+/ws }          Itemx
-             > "[]":: pre                       Itemx
-             > "[]":: link                      Itemx
-             > "[]":: structured                Itemx
-             > "[]":: styled                    Itemx
-             > "[]":: (Chars:: text:alphanum++)      Itemx
-             > "[]":: "\"" text "\""            Itemx
-             > "[]":: symbol                    Itemx
-             > "[]":: (Symbol:: sym++)          Itemx
-             > "[]":: Paragraph                 Itemx
+             > "[]":: { UL:: uli+/ws }           Itemx
+             | "[]":: { OL:: oli+/ws }           Itemx
+             > "[]":: pre                        Itemx
+             > "[]":: link                       Itemx
+             > "[]":: structured                 Itemx
+             > "[]":: styled                     Itemx
+             > "[]":: (Chars:: text:alphanum++)  Itemx
+             > "[]":: "\"" text "\""             Itemx
+             > "[]":: symbol                     Itemx
+             > "[]":: (Symbol:: sym++)           Itemx
+             > "[]":: Paragraph                  Itemx
 
 blockquote   = Blockquote:: "\"\"" text "\"\""
              | Blockquote:: "\"\"" block
 
 blockquote   = Blockquote:: "\"\"" text "\"\""
              | Blockquote:: "\"\"" block
@@ -116,8 +115,8 @@ styled       = Underline::     "__" text "__"
 
 block         = { text }
 
 
 block         = { text }
 
-link          = Link:: text:({ text })     "->" href:(url|email)
-              > Link:: text:alphanum++ !ws "->" href:(url|email)
+link          = Link:: text:({ text })      "->" href:(url|email)
+              > Link:: text:alphanum++  !ws "->" href:(url|email)
 
 structured    = command & "\\" [a-zA-Z0-9]++ block?
               > glyph
 
 structured    = command & "\\" [a-zA-Z0-9]++ block?
               > glyph