moduleLava2000.Retime(timeTransform)whereimportLava2000.SignalimportLava2000.GenericimportLava2000.SequentimportLava2000.NetlistimportList(isPrefixOf)------------------------------------------------------------------ time transformationtimeTransform::(Generica,Genericb)=>(a->b)->([a]->[b])timeTransformcirc[]=[]timeTransformcircinps@(inp:_)=mapconstruct.transStruct.netlistphi.struct.circ.symbolizetag$inpwheren=lengthinpsphi(DelayBoolininext)=delayDelayBoolininextphi(DelayIntininext)=delayDelayIntininextphi(VarBools)|tag`isPrefixOf`s=var(drop(lengthtag)s)phi(VarInts)|tag`isPrefixOf`s=var(drop(lengthtag)s)phis=taken(cycle(mapsymbol(zipss)))delaydel~(ini0:_)next=(symbol(delini0(lastnext)):list(n-1)(initnext))vars=map(pickSymbols)inpslist0_=[]listn~(x:xs)=x:list(n-1)xstag="#retime#"------------------------------------------------------------------ the end.