ASM Charts - Deriving Datapath/Control Circuits

Discussion in 'Homework Help' started by jegues, Dec 5, 2010.

  1. jegues

    Thread Starter Well-Known Member

    Sep 13, 2010

    I've been studying some digital logic lately and the last(and most important) topic we've covered is implementing systems using ASM charts and deriving the datapath circuitry and the control circuit ASM chart.

    Now most of the time I'm fine at getting the original ASM chart down just fine but when it comes to deriving the datapath circuitry I tend to derive different solutions than the answers given or miss tiny details.

    Would anyone have any advice on how to consistently implement datapath circuitry?

    Here is one of the pseudo-codes given to us for a ASM system that implements long division by repeated subtraction. ( Q is the quotient Q= A/B, A and B are the two numbers and R is the remainder)

    Q = 0;
    R = A;
    while ((R-B) > 0) do
    R = R-B;
    Q = Q+1;
    end while;

    So the ASM chart we're implementing isn't too crazy and most of the stuff you need to think about for the datapath circuitry can be obtained from the pseudo code.

    Now here's my thought process as I'm implementing the datapath circuitry for this system.

    -Need registers to store A, and B.
    - We need to check whether or not (R-B) > 0, we can do this by a subtractor, but how do we check if it's greater than 0?
    -If it is greater than zero load (R-B) into register R
    -Q always increments by 1 so let's use a counter and initially load it with 0's

    In the figure attached I have the ASM chart for the datapath as well as the actual datapath circuit itself.

    I seem to miss little things like the MUX and Rsel determining whether it's time to load A or (R-B) into register R. Another thing I would have missed the OR gate running to register are with (Load A + ER), as well as using the Carry out to check whether (R-B) > 0.

    Is there a better way of thinking about this?

    I know that every variable I have can be implemented using one of the following: Register, Shift Register, Counter or one of these followed by a combinational logic block. (logic block may contain adder, subtractor, mux, or other logic functions)

    Does anyone have any tips/advice?
    • DPC.JPG
      File size:
      119.5 KB
  2. Georacer


    Nov 25, 2009
    I have never been tought how to translate circuits from the idea plane to an actual schematic. From my point of view it's half experience, half intuition.

    If there is a systematic way to do that, I 'd really want to hear about it.
  3. jegues

    Thread Starter Well-Known Member

    Sep 13, 2010
    Systematic way of doing this would be lovely. Portions of it can be categorized I guess.

    If you're storing information then you're going to be using a register, shifting it, a shift register, incrementing it, a counter etc...