Electronic – When and how to separate Control and Datapaths for hardware designs

fpgastate-machinesverilog

Must we always separate control and datapath during hardware programming? Are there any advantages? If yes then what is the basic methodology followed for this strategy? I am trying to interface an SDHC card with FPGA and am confused in implementing the protocol using separate data and control paths.

Best Answer

Yes, you should always split these two parts in your designs.
(Btw. I wouldn't speak of those two if we are talking about simple modules.)

Splitting datapath and control has these advantages:

  • better maintainability
    • data path is easier to understand, because its a flow / directed graph
    • FSMs are easier to understand because they are not overfilled with data
  • "faster" development
    • delegate development to multiple developers
    • datapath modules might get reused in the same or in other projects.
      If both are entwined, a datapath module will not be universal and disallows code/module reuse
  • better testability
    • test datapath modules independently of control
    • test control (mainly one or more FSMs) independently
    • use dummy architectures in the datapath while testing the hosting module computation

Splitting datapath and control also implies to split of parts of the control in subcontrol units like sub-FSMs, counters, ...