S4      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst u v w x y z { | } ~                                                          1Definitions for expressions, variables, and types(c) 2013 Tom Hawkins & Lee PikeNone!"+@Floating-point typed expression Expressions which can be ordered .Expressions which can be compared for equality Expression of integral type<Returns True if expression is signed, and False if unsigned. Expression of numerical type Typed expression:Types which have a defined The corresponding  of the given object"Types with a defined width in bits&The width of a type, in number of bitsAn untyped term.=A typed expression.eAn untyped array.hA typed array.jUntyped variables.n,Variables updated by state transition rules.pTyped variable|Typed expressionTyped constantThe type of a =.+The number of bytes that an object occupiesBitwise left-shifting.Bitwise right-shifting.Bitwise left-rotation.Bitwise right-rotation. True term. False term.Logical negation. Logical AND. Logical OR.!The conjunction of a E Bool list.!The disjunction of a E Bool list.0True iff the predicate is true for all elements./True iff the predicate is true for any element."Logical implication (if a then b).Equal. Not equal. Less than. Greater than.Less than or equal.Greater than or equal.#Returns the minimum of two numbers.)Returns the minimum of a list of numbers.#Returns the maximum of two numbers.)Returns the maximum of a list of numbers.Limits between min and max.Division. If both the dividend and divisor are constants, a compile-time check is made for divide-by-zero. Otherwise, if the divisor ever evaluates to 0U, a runtime exception will occur, even if the division occurs within the scope of a cond or  that tests for 0E (because Atom generates deterministic-time code, every branch of a cond or  is executed).fDivision, where the C code is instrumented with a runtime check to ensure the divisor does not equal 0. If it is equal to 07, the 3rd argument is a user-supplied non-zero divsor.Modulo. If both the dividend and modulus are constants, a compile-time check is made for divide-by-zero. Otherwise, if the modulus ever evaluates to 0U, a runtime exception will occur, even if the division occurs within the scope of a cond or  that tests for 0E (because Atom generates deterministic-time code, every branch of a cond or  is executed).eModulus, where the C code is instrumented with a runtime check to ensure the modulus does not equal 0. If it is equal to 07, the 3rd argument is a user-supplied non-zero divsor.Returns the value of a n.;Conditional expression. Note, both branches are evaluated! mux test onTrue onFalseArray index to variable.Array index to expression.AConverts an typed expression (E a) to an untyped expression (UE).*Convert a typed variable to an untyped one/Produced an untyped expression from a constant $Logical NOT of an untyped expression&Logical AND of two untyped expressions%Logical OR of two untyped expressions)Check equality on two untyped expressions/Less-than inequality on two untyped expressionsk2-to-1 multiplexer. If selector is true, this returns input 1; if selector is false, this returns input 2.   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ababa < bSelectorInput 1Input 2       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=dcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>no<;:9876543210/.-,+*)('&%$#"! jmlkhiegf |~}p{zyxwvutsrq     &<;:9876543210/.-,+*)('&%$#"! ='dcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>egfhijmlknop {zyxwvutsrq| ~}        "Sharing for UEs, based on IntMaps.(c) 2013 Tom Hawkins & Lee PikeNone!"+ Wrapped in the State Monad.An entry in the Map.Corresponds to ,s --- the elements in the sharing structure.Untyped variables map. Transforms a j into a %, returning the possibly updated map."Get the element associated with a 9 value. It's an error if the element is not in the map. Put a new P in the map, unless it's already in there, and return the hash pointing to the  and a new map.Create the sharing map.Lookup an element in the map, and if it's in there, do nothing, but return its hash value. Otherwise, update the map and return the new hash value for the inserted element.Get a  back out of the .0The list of Hashes to adjacent upstream of a UE.EThe list of all UVs that directly control the value of an expression."All array indexing subexpressions.>99&-(c) 2013 Tom Hawkins & Lee PikeNone!"+ 4The Atom monad holds variable and rule declarations.+7A phase is either the minimum phase or the exact phase..A hierarchical name./A name.4@A Relation is used for relative performance constraints between Action>s. data Relation = Higher UID | Lower UID deriving (Show, Eq)SGiven a top level name and design, elaborates design and returns a design database.2Checks that a rule will not be trivially disabled.yCheck that a variable is assigned more than once in a rule. Will eventually be replaced consistent assignment checking.5#Generic local variable declaration.6&Generic external variable declaration.7Generic array declaration.8#Generic external array declaration.:RAll the variables that directly and indirectly control the value of an expression.;'All primary expressions used in a rule.J      !"#$%&'()*+,-./0123456789:; !"#$9      !"#$%&'()*+,-./0123456789:;= !"#$%&'()*     10/+-,.45678923:;$       !"#$%&'()*+-,./0123456789:; !"#$-(c) 2013 Tom Hawkins & Lee PikeNone!"+<=Topologically sorts a list of expressions and subexpressions.= Number of UE's computed in rule.<%=<=<=<%=Rule scheduling(c) 2013 Tom Hawkins & Lee PikeNone!"+>Schedule expressed as a & and a list of (period, phase, rules).@9Generate a rule scheduling report for the given schedule. &'>?@()*+,-./>?@?>@ &'>?@()*+,-./(Definitions for the language/EDSL itself(c) 2013 Tom Hawkins & Lee PikeNone!"++B Assign an = to a n.CBThe Atom monad captures variable and transition rule declarations.DECreates a hierarchical node, where each node could be an atomic rule.EDefines the period of execution of sub-rules as a factor of the base rate of the system. Rule period is bound by the closest period assertion. For example: > period 10 $ period 2 a -- Rules in a have a period of 2, not 10.F2Returns the execution period of the current scope.GDefines the earliest phase within the period at which the rule should execute; the scheduler attempt to find an optimal phase from 0 <= n < period (thus, the G2 must be at least zero and less than the current E.).H+Ensures an atom is scheduled only at phase n.I'Returns the phase of the current scope.J+Returns the current atom hierarchical path.K#Local boolean variable declaration.L&External boolean variable declaration.M Local int8 variable declaration.N#External int8 variable declaration.O!Local int16 variable declaration.P$External int16 variable declaration.Q!Local int32 variable declaration.R$External int32 variable declaration.S!Local int64 variable declaration.T$External int64 variable declaration.U!Local word8 variable declaration.V$External word8 variable declaration.W"Local word16 variable declaration.X%External word16 variable declaration.Y"Local word32 variable declaration.Z%External word32 variable declaration.["Local word64 variable declaration.\%External word64 variable declaration.]!Local float variable declaration.^$External float variable declaration._"Local double variable declaration.`%External double variable declaration.aUDeclares an action, which executes C code that is optionally passed some parameters.b4Calls an external C function of type 'void f(void)'.cjDeclares a probe. A probe allows inspecting any expression, remotely to its context, at any desired rate.d|Fetches all declared probes to current design point. The list contained therein is (probe name, untyped expression). See  .e Increments a   n.f Decrements a   n.gAdds an enabling condition to an atom subtree of rules. This condition must be true before any rules in hierarchy are allowed to execute.h+Reference to the 64-bit free running clock.iCRule coverage information. (current coverage index, coverage data)jAn assertions checks that an 'E Bool' is true. Assertions are checked between the execution of every rule. Parent enabling conditions can disable assertions, but period and phase constraints do not. Assertion names should be globally unique.kRImplication assertions. Creates an implicit coverage point for the precondition.lA functional coverage point tracks if an event has occured (true). Coverage points are checked at the same time as assertions. Coverage names should be globally unique.8ABCDEF0GHIJKLMNOPQRSTUVWXYZ[\]^_`a_A function which receives a list of C parameters, and returns C code that should be executed.hA list of expressions; the supplied functions receive parameters which correspond to these expressions.b Function fcHuman-readable probe nameExpression to inspectdefghijkl123456789:;  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/5678ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl2CDEFGHIgABef5678KLMNOPQRSTUVWXYZ[\]^_`abcdjlk/Jhi7ABCDEF0GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl123456789:;B2Capturing data that can either be valid or invalid(c) 2013 Tom Hawkins & Lee PikeNone!"+mm2 captures the data and its validity condition. m6 is abstract to prevent rules from using invalid data.nCreate m' given the data and validity condition.o9Get a valid data. Action is disabled if data is invalid.pAction enabled if m is valid.qAction enabled if m is not valid.m<nopqmnopqmnopqm<nopq#Time integrated threshold functions(c) 2013 Tom Hawkins & Lee PikeNone!"+rpBoolean thresholding over time. Output is set when internal counter hits limit, and cleared when counter is 0.shIntegrating threshold. Output is set with integral reaches limit, and cleared when integral reaches 0.rsrsrsrs Fades one signal to another(c) 2013 Tom Hawkins & Lee PikeNone!"+ tFader initalization.uStart at average of A and BvStart at signal BwStart at signal Ax Fader object.yFader constructionzFade to signal A.{Fade to signal B.|/Fade to center, i.e. average of signal A and B. tuvwx=>?@yName Fade rateInitializationSignal ASignal Bz{| tuvwxyz{| xtwvuyz{| twvux=>?@yz{| Common functions.(c) 2013 Tom Hawkins & Lee PikeNone!"+}YA channel is a uni-directional communication link that ensures one read for every write.A Timer.Creates a new timer.6Starts a Timer. A timer can be restarted at any time.Conditionally start a Timer.A4 when a timer has completed. Note that this remains A until the timer is restarted. One-shot on a rising transition.!One-shot on a falling transition.JDebounces a boolean given an on and off time (ticks) and an initial state.1-D lookup table. x. values out of table range are clipped at end y; values. Input table must be monotonically increasing in x.ILinear extrapolation and interpolation on a line with 2 points. The two x6 points must be different to prevent a divide-by-zero.Hysteresis returns A when the input exceeds max and B when the input is less than min0. The state is held when the input is between min and max.2Creates a new channel, with a given name and data.Write data to a }#. A write will only suceed if the } is empty.Read data from a }". A read will only suceed if the } has data to be read.}~CTimer to start)Number of clock ticks the timer shall runTimer to start conditionally Condition for starting the timer#Number of ticks the timer shall runName of the resulting atomOn time in ticksOff time in ticks Initial valueThe boolean to debounceResulting debounced boolean(x, y) lookup tableInput x valueOutput y valueFirst point, (x1, y1)Second point, (x2, y2)Input x valueInterpolated/extrapolated y valueminmaxInput}~}~}~C #C code configuration and generation(c) 2013 Tom Hawkins & Lee PikeNone!"+cData associated with sampling a hardware clock. For the clock to work correctly, you MUST assign __global_clock! the current time (according to  clockNameP) the first time you enter the main Atom-generated function calling your rules.QC function to sample the clock. The function is assumed to have the prototype: clockType clockName(void)."Clock type. Assumed to be one of D, E, F, or G0. It is permissible for the clock to roll over.4Number of ticks in a phase. Must be greater than 0.LC function to delay/sleep. The function is assumed to have the prototype: void delay(clockType i), where i! is the duration of delay/sleep.H|, or a user-defined error-reporting function if the period duration is violated, e.g., the execution time was greater than delta. Assumed to have prototype: void err(void). C code configuration parameters.bAlternative primary function name. If this is empty, then it will default to the name passed to  .+Name of state variable structure. Default: stateyCustom C code to insert above and below the functions, given assertion names, coverage names, and probe names and types.Custom C code to insert above and below the state definition in the header file, given assertion names, coverage names, and probe names and types.Enable rule coverage tracking.*Enable assertions and functional coverage.(Name of assertion function. Prototype: !void assert(int, bool, uint64_t);'Name of coverage function. Prototype:  void cover(int, bool, uint64_t);'Hardware counter to schedule rules, or H (the default).aDefault C code configuration parameters (default function name, no pre/post code, ANSI C types).)Default hardware clock parameters (name "clk(", Word64, delta 1, delay function is "delay", no error function).C99 type naming rules.IJKLMNOP IJKLMNOP Compilation functions(c) 2013 Tom Hawkins & Lee PikeNone!"+"Compiles an atom description to C.Q>@@>Q -Unit testing, coverage, reporting & debugging(c) 2013 Tom Hawkins & Lee PikeNone!"+ Parameters for a test simulation9Name for test (used in log file, state name, and output)"Number of simulation cycles to runAtom specification to testOther C files to build inOther C headers to include6C declarations and definitions inserted prior to the main functionC code executed inside the main function, prior to 0C code executed inside the loop running the test/C code executed after that loop, but still in mainDefault test parametersARun a list of tests, output a report on test passes and coverage.R#Report results on a particular testSRun a single test with the given random seed. This will generate code, compile it with GCC, execute it, and collect its output.Print a string in C using printf, appending a newline.#Print an integral value in C using printf.(Print a floating point value in C using printf.@Print the value of a probe to the console (along with its name). Random seedList of tests to runRMax name length(name, pass, cycles, _, _)S Random seedRTest to run | (name, pass status, cycles run, all coverage names, names covered)Prefix for printed valueIntegral value to printPrefix for printed valueFloating point value to printTUVWXYZ[\] RSTUVWXYZ[\]Top-level Atom module(c) 2013 Tom Hawkins & Lee PikeNone!"+H  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/5678>@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~H@>}~xtwvuyz{|rsmnopqCDEFGHIgABef5678KLMNOPQRSTUVWXYZ[\]^_`abcdjlk/Jhi=dcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>no<;:9876543210/.-,+*)('&%$#"! jmlkhiegf |~}p{zyxwvutsrq  ?Example of referencing external variables and functions in Atom(c) 2015 Chris HodappNone!"+Invoke the Atom compilerTop-level rule;Example design which computes GCD (greatest-common divisor)(c) 2013 Tom Hawkins & Lee PikeNone!"+Invoke the Atom compiler<An example design that computes the greatest common divisor.^^Example usage of probes in Atom(c) 2015 Chris HodappNone!"+Invoke the Atom compiler.Generate a code comment about the given probe.Use a to call  PROBE_PRINTFR on a probe given as (name, value). This will work only on integer-valued probes.Top-level ruleECount up seconds of runtime, assuming our base rate is 1 millisecond:_ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~}{  +    !"#$$%&'()*+,-./00123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                          !"#$%&'())*+,-./0123456789:;<=y  > ? @AB CCCCDE F G H I J K L M N O P Q R S T U V W X Y Z[ atom-1.0.13Language.Atom.ExpressionsLanguage.Atom.LanguageLanguage.Atom.UeMapLanguage.Atom.ElaborationLanguage.Atom.AnalysisLanguage.Atom.SchedulingLanguage.Atom.Common.ValidDataLanguage.Atom.Common.ThresholdLanguage.Atom.Common.FaderLanguage.Atom.CommonLanguage.Atom.CodeLanguage.Atom.CompileLanguage.Atom.UnitLanguage.Atom.Example.ExternalLanguage.Atom.Example.GcdLanguage.Atom.Example.Probes printProbecompile Language.Atombase Data.BitsisSignedbitSize complementxor.|..&.transformers-0.4.3.0Control.Monad.IO.ClassliftIO FloatingEOrdEEqE IntegralENumEExpreTypeconstant expressionvariablerawBitsTypeOftypeOfWidthwidthUEUAtanhUAtanUAcoshUAsinhUCoshUSinhUAcosUCosUAsinUSinUPowUSqrtULogUExpUPiUB2DUB2FUD2BUF2BUMuxULtUEq UBWShiftR UBWShiftLUBWXorUBWOrUBWAndUBWNotUAndUNotUModUDivUMulUSubUAddUCastUConstUVRefEAtanhAtanAcoshAsinhCoshSinhAcosCosAsinSinPowSqrtLogExpPiRetypeB2DB2FD2BF2BMuxLtEqBWShiftRBWShiftLBWXorBWOrBWAndBWNotAndNotModDivMulSubAddCastConstVRefUAUAExternAUVUVExternUVArrayVVariableVDoubleVFloatVWord64VWord32VWord16VWord8VInt64VInt32VInt16VInt8VBool ExpressionEDoubleEFloatEWord64EWord32EWord16EWord8EInt64EInt32EInt16EInt8EBoolCDoubleCFloatCWord64CWord32CWord16CWord8CInt64CInt32CInt16CInt8CBoolTypeDoubleFloatWord64Word32Word16Word8Int64Int32Int16Int8Boolbytes.<<..>>.rolrortruefalsenot_&&.||.and_or_all_any_imply==./=.<.>.<=.>=.min_minimum_max_maximum_limitdiv_div0_mod_mod0_valuemux!!.ueuvuboolunotuanduoruequmuxUeStateUeMapUeElemMUAtanhMUAtanMUAcoshMUAsinhMUCoshMUSinhMUAcosMUCosMUAsinMUSinMUPowMUSqrtMULogMUExpMUPiMUB2DMUB2FMUD2BMUF2BMUMuxMULtMUEq MUBWShiftR MUBWShiftLMUBWXorMUBWOrMUBWAndMUBWNotMUAndMUNotMUModMUDivMUMulMUSubMUAddMUCastMUConstMUVRefMUV MUVExternMUVArrayHashnewUVgetUEnewUEemptyMap maybeUpdate recoverUE ueUpstream nearestUVs arrayIndices isMathHCallAtomStateHierarchy StateArray StateVariableRuleCover ruleCoverAssert ruleAssertruleIdruleName ruleEnable ruleAssigns ruleActions rulePeriod rulePhaseAtomDBatomIdatomName atomNames atomEnableatomSubs atomPeriod atomPhase atomAssigns atomActions atomAsserts atomCoversGlobalgRuleIdgVarIdgArrayIdgStategProbesgPeriodgPhasePhase ExactPhaseMinPhasePathNameUID buildAtomgetput elaboratevarvar'arrayarray'addNameallUVsallUEstoporuleComplexityScheduleschedulereportScheduleAssign<==atomperiod getPeriodphase exactPhasegetPhasepathboolbool'int8int8'int16int16'int32int32'int64int64'word8word8'word16word16'word32word32'word64word64'floatfloat'doubledouble'actioncallprobeprobesincrdecrcondclock nextCoverageassert assertImplycover ValidData validData getValidData whenValid whenInvalid boolThresholddoubleThreshold FaderInitOnCenterOnBOnAFaderfaderfadeToAfadeToB fadeToCenterChannelTimertimer startTimer startTimerIf timerDone oneShotRise oneShotFalldebounce lookupTablelinear hysteresischannel writeChannel readChannel RuleCoverageClock clockName clockTypedeltadelayerrConfig cFuncName cStateNamecCodehCode cRuleCoveragecAssert cAssertName cCoverName hardwareClockdefaults defaultClockcTypewriteCRandomrandomTestnamecycles testbenchmodulesincludesdeclCodeinitCodeloopCodeendCode defaultTestrunTests printStrLnprintIntegralEprintFloatingEmainextern prePostCodecompileExampleexampleprobeStrlogProbe tickSecondsignedghc-prim GHC.Typesult reduceAnd$fBitsE $fFloatingE $fFractionalE$fNumE$fFloatingEDouble$fFloatingEFloat $fOrdEDouble $fOrdEFloat $fOrdEWord64 $fOrdEWord32 $fOrdEWord16 $fOrdEWord8 $fOrdEInt64 $fOrdEInt32 $fOrdEInt16 $fOrdEInt8 $fEqEDouble $fEqEFloat $fEqEWord64 $fEqEWord32 $fEqEWord16 $fEqEWord8 $fEqEInt64 $fEqEInt32 $fEqEInt16 $fEqEInt8 $fEqEBool$fIntegralEWord64$fIntegralEWord32$fIntegralEWord16$fIntegralEWord8$fIntegralEInt64$fIntegralEInt32$fIntegralEInt16$fIntegralEInt8 $fNumEDouble $fNumEFloat $fNumEWord64 $fNumEWord32 $fNumEWord16 $fNumEWord8 $fNumEInt64 $fNumEInt32 $fNumEInt16 $fNumEInt8 $fExprDouble $fExprFloat $fExprWord64 $fExprWord32 $fExprWord16 $fExprWord8 $fExprInt64 $fExprInt32 $fExprInt16 $fExprInt8 $fExprBool $fTypeOfE $fTypeOfUE $fTypeOfA $fTypeOfUA $fTypeOfV $fTypeOfUV $fTypeOfConst $fWidthUV $fWidthUE$fWidthV$fWidthE $fWidthConst $fWidthType$fEqE$fShowE $fShowConstshareunOpbinOptriOplistOp checkEnablecheckAssignConflictsAtomStelaborateRules reIdRules trimState checkName fixedpoint $fMonadIOAtom $fMonadAtom $fFunctorAtom$fApplicativeAtom $fShowRule $fOrdAtomDB $fEqAtomDB $fShowAtomDBeUsage reportPeriod reportUsagetotalComplexityusageusage'split insertUsage $fOrdUsagephase'$fAssignDouble $fAssignFloat$fAssignWord64$fAssignWord32$fAssignWord16 $fAssignWord8 $fAssignInt64 $fAssignInt32 $fAssignInt16 $fAssignInt8 $fAssignBooltoAtoBtoCenterTrueFalseGHC.Word Data.MaybeNothing showConstcodeUEcodeIf declStatecodeRule globalClkcodeAssertionCheckscodePeriodPhasehwClockWarning reportResultrunTestrandom32 $fRandomInt64 $fRandomInt32 $fRandomInt16 $fRandomInt8$fRandomWord64$fRandomWord32$fRandomWord16 $fRandomWord8 $fRandomBool