digraph read_command {
    IDLE [shape="doublecircle",label="IDLE\nreceived_reg=0\nout_data=0\nresponse_type_reg=response_type"]
    node [shape="ellipse"]
    START [label="START\nrecevied_reg=0\ncounter=get_bits(response_type_reg) - 2\ndata_reg=0"]
    LISTEN [label="LISTEN\ndata_reg[0]=sd_cmd"]
    RECEIVING [label="RECEIVING\ncounter--\ndata_reg={data_reg[134:0],sd_cmd}"]
    DONE [label="DONE\nout_data=data_reg\nreceived_reg=1\nreponse_type_reg=response_type"]

    IDLE -> IDLE [label="!listen"]
    IDLE -> START [label="listen"]

    START -> RECEIVING [label="sd_cmd==0"]
    START -> LISTEN [label="sd_cmd!=0"]
    
    LISTEN -> LISTEN [label="sd_cmd!=0"]
    LISTEN -> RECEIVING [label="sd_cmd==0"]

    RECEIVING -> DONE [label="counter==0"]
    RECEIVING -> RECEIVING [label="counter!=0"]

    DONE -> START [label="listen"]
    DONE -> DONE [label="!listen"]

}
