anchor.diff:      );
       sb
     in
  -  let mask_data a w = (* masks the top word *)
  +  let mask_data (a:uint32[]) w = (* masks the top word *)
       let words = (w + 31) / 32 in
       let bits = w % 32 in
       if bits <> 0 then
  
positive.code:       failwith "Tristates not supported in simulation"
    in
  
    let data_map = List.fold_left make_data_map Map.empty (inputs @ outputs @ wires @ regs @ mems @ logic) in
    let seq_data_map = List.fold_left make_data_map Map.empty regs in
    
    let find (signal : Signal) = Map.find signal.uid data_map in
    let find_seq (signal : Signal) = Map.find signal.uid seq_data_map in
  
negative.code:           let nibs = min 8 (width - (i*8)) in
            d.[i] <- 0ul;
            for j=0 to nibs-1 do
              d.[i] <- d.[i] ||| (uint32 ((int_of_hex str.[idx ((i*8)+j)]) <<< (4*j)));
            done;
          done
        );
  