FILE: SRHC.rose, from [Indigo]<Rosemary>2.6>Rosemary.DF
last changed by Barth, January 4, 1983 10:44 am
Last Edited by: Spreitzer, January 25, 1985 2:59:39 pm PST
Library ExamplePrimitives;
Imports $"IO";
SRHC:
LAMBDA [initial: |[0..16)|]
RETURN
CELLTYPE AutoName
PORTS [input< INT[4], clock<, output> INT[4]]
InittableState
latched: [0..15] ← 0
Initializer
latched ← initial
Expand
temp: INT[4] ←v |IO.PutFR["%gD", IO.card[initial]]|;
CEDAR
--any old Cedar code may appear here
... even comment nodes, with -'s and --'s as you please
--a very dull Cedar statement: -- NULL;
;
Pass: PassBlock[input: input, gate: clock, output: temp];
Inv: InvertBlock[input: temp, output: output]
EvalSimple
IF clock THEN latched ← input;
output ← 15 - latched;
ENDCELLTYPE