FILE: SRHC.rose, from [Indigo]<Rosemary>2.6>Rosemary.DF
last changed by Barth, January 4, 1983 10:44 am
Last Edited by: Spreitzer, September 3, 1984 0:08:46 am PDT
Library ExamplePrimitives;
Imports IO;
SRHC:
LAMBDA [initial: |[0..16)|]
RETURN
CELLTYPE AutoName
PORTS [input< INT[4], clock<, output> INT[4]]
State
latched: [0..15] ← 0
Initializer
latched ← initial
Expand
temp: INT[4] ← |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