D
David Wade
Guest
On 15/12/2018 07:50, gnuarm.deletethisbit@gmail.com wrote:
In Xilinx can't you looks at the RTL logic generated and see what
signals are being produced?
Dave
On Friday, December 14, 2018 at 11:59:13 PM UTC-5, Weng Tianxiang wrote:
On Friday, December 14, 2018 at 7:30:22 PM UTC-8, gnuarm.del...@gmail.com wrote:
On Thursday, December 13, 2018 at 10:06:58 PM UTC-5, Weng Tianxiang wrote:
On Thursday, December 13, 2018 at 6:09:09 PM UTC-8, gnuarm.del...@gmail.com wrote:
On Thursday, December 13, 2018 at 9:02:26 PM UTC-5, gnuarm.del...@gmail.com wrote:
On Thursday, December 13, 2018 at 3:14:03 PM UTC-5, Weng Tianxiang wrote:
On Thursday, December 13, 2018 at 8:06:46 AM UTC-8, HT-Lab wrote:
On 13/12/2018 13:45, Weng Tianxiang wrote:
Hi,
What is the name of the circuit structure that generates a state machine's jumping signals?
I remember I looked at the circuit structure and wrongly remembered the structure name as "decision tree". By looking at Wikipedia, I realize that it is a wrong name.
What is the correct name?
Thank you.
Weng
Transition or next state logic?
Hans
www.ht-lab.com
Hi,
Sorry, maybe I did not specify my question clearly.
Here is a code example I would ask for answer:
type State_Type is (
S0, S1, ...);
signal WState, WState_NS : State_Type;
...;
a : process(CLK)
begin
if rising_edge(CLK) then
if SINI = '1' then
WState <= S0;
else
WState <= WState_NS;
end if;
end if;
end process;
b : process(all)
begin
case WState is
when S0 =
if C1 then
WState_NS <= S1;
elsif C2 then
WState_NS <= S2;
else
WState_NS <= S0;
end if;
...;
end case;
end process;
Now a synthesizer must generate a signal S0_C1 as follows
S0_C1 <= not SINI and WState = S0 and C1;
When S0_C1 is asserted, WState will go from S0 to S1.
I call signal S0_C1 a jumping signal for the state machine.
I want to know:
1. Is there a systematic circuit structure or a systematic method that can generate signal S0_C1 and others. I think it is an oldest circuit.
2. If there is a systematic circuit structure, what its name is?
3. Do you know how Xilinx or Altera generates a circuit for a state machine?
First of all, I don't agree with your hypothesis that signals S0_C1, et. al. exist at any point in this design. They may, but might not depending on the details of the state encoding and the optimizations performed.
I think what you are failing to consider is that the states, S0, S1, et. al. are encoded in some manner. The actual logic generated would then depend on all the input combinations that assert a given bit in the encoded state values. So if the state variable WState_NS is three bits and uses 00, 01 and 10 for the state values, the variable WState_NS(0) would have its own equation (I'll skip solving that for you) and the variable WState_NS(1) would have another equation which is not likely to be the same.
There are likely to be shared logic in the individual bits of the state variable, but how likely is it that the software will optimize out the exact signals you hypothesize?
Does this make sense?
Rick C.
Tesla referral code + https://ts.la/richard11209
Opps, I should have said if "the state variable WState_NS is two bits"
Rick C.
Rick,
How a state machine is constructed is not important, the important thing is: there is A BIT SIGNAL that will make the state machine going from state S0 to state S1 on the next cycle when it is asserted on the current cycle based on the S0_C1 logic which I have given before.
S0_C1 logic is A BIT SIGNAL.
That is where you fail to understand. Your code does not include the signal S0_C1. The structure of the state machine does not dictate such a signal. You can conceive of this signal in your mind and perform any design tasks using this signal, but that does not mean it is in any way real. Even in the case of a 1-hot encoded machine this signal will only exist if there are no other ways to enter the state S1.
So if you only wish to suppose that the signal S0_C1 exists in your theoretical analysis, fine. I have found in certain cases decomposition to similar basic signals to be useful in specifying state machines in a simple way. But don't for a minute believe that it exists in any real world implementation or is in any way fundamental to the operation of the state machine.
Of your questions:
I want to know:
1. Is there a systematic circuit structure or a systematic method that can > generate signal S0_C1 and others. I think it is an oldest circuit.
Yes, it is called a state/next-state table and is very simple.
2. If there is a systematic circuit structure, what its name is?
We just call it "logic".
3. Do you know how Xilinx or Altera generates a circuit for a state machine?
Yes, they take the logic you define in your HDL and apply the many types of decomposition, optimization and synthesis on it that are also used on all the other logic code you use in the rest of your design.
Rick C.
Tesla referral code -- https://ts.la/richard11209
Hi Rick,
I don't want to start an argument about what I am doing, right or wrong. In a month or so I will publish something that will show your following 2 claims are wrong:
1. Even in the case of a 1-hot encoded machine this signal will only exist if there are no other ways to enter the state S1.
2. But don't for a minute believe that it exists in any real world implementation or is in any way fundamental to the operation of the state machine.
No need to argue. Just explain. "The best argument is that which seems merely an explanation." - Dale Carnegie
I have studied the 1-hot state machine. The only signal required for each "hot" (state element) is it's next value. That value depends on *all* the possible transitions into a given state, not just a transition from any one state into that state which is what your S0_C1 bit signal is. The actual signal at the input to the state FF is the logical OR of the equivalent signal for transitions from *all* the states that have transitions into this state, including a transition from this state itself... unless the clock enable is also used, sometimes inefficiently. So the input to the FF might be an OR of S0_C1, S1_C1N, S2_something...
Of course, you can write your code that way if you wish (write code, draw diagrams, etc). My only point is this has nothing to do with the actual resulting signals produced to construct the state machine in an FPGA or other logic device. The actual input to the state FF is what we call next_state and is not always equivalent to what you seem to be picturing. What you seem to be picturing can be used in design, but it may not be a real signal in the implementation.
Rick C.
Tesla referral code -+ https://ts.la/richard11209
In Xilinx can't you looks at the RTL logic generated and see what
signals are being produced?
Dave