digraph flow {
    rankdir=LR

    f512[label="512 ns\nfiles"]
    f500[label="500 ns\nfiles"]
    {rank=same f512, f500 }

    subgraph cluster_stage1 {
        label="Offline Software Stage 1"
        sig[label="signal\nfiles"]
        node[shape=box]
        decode512[label="remap\nchannels", color=red]
        decode500[label="remap\nchannels", color=red]
        resample[label="resample\n(new)",color=red]
        nf[label="noise\nfilter"]
        sp[label="signal\nprocessing"]

        {rank=same decode512, decode500}

    }

    DAQ[shape=box]

    node[shape=octagon]
    s2[label="stage 2"]
    s3[label="stage 3"]

    DAQ->f512
    DAQ->f500
    sim->f500

    f512->decode512->resample->nf
    f500->decode500->nf->sp->sig->s2->s3

}
