-- FILE : accum.ads -- DATE : 7/98 -- AUTHOR : Sy Wong -- AIM : Specification of accumulator design with HDL; generic N: positive; -- total bits package ACCUM is type device_state is limited private; type device is record carry_in: HDL.input:= false; data_in, accumulator: HDL.bus(0..N-1):= (0..N-1 => FALSE); -- bit 0 is LS carry_out: HDL.output:= FALSE; add: HDL.input:= FALSE; state: device_state; end record; procedure update (d: in out device); private type device_state is record add: boolean:= FALSE; end record; end ACCUM;