Help with VHDL to transition state diagram

Click For Summary
The discussion focuses on understanding a VHDL code snippet related to a state transition diagram. Key points include the concatenation of signals B4, B5, and B7 into a 3-bit vector B1, and the conditional assignment of B9 based on the values of B4 and B5. Participants clarify the meaning of the "with B1 select" statement, explaining that it assigns values to A3 based on specific conditions of B1. The conversation emphasizes the importance of creating truth tables for the signals involved to better understand the circuit's behavior. Overall, the goal is to convert the VHDL code into a state transition diagram for clearer comprehension.
masterchiefo
Messages
211
Reaction score
2

Homework Statement


VHDL code:
http://i.imgur.com/UZrK1ky.png

Homework Equations


B2 = B7 * A1
B3 = (B9 * B2) + (B1(1) * /B1(0) * /A1
B6 = B9 + /A1
B8 = B2 + (B9 * /A1) + (/B5 * (A1 + B7))
If Clock = 1 and rising edge on A2 then we reset B4, B5, B7 to 0.
Else
B4 = B3 = (B9 * B2) + (B1(1) * /B1(0) * /A1
B5 = B6 = B9 + /A1
B7 = B8 = (B2 + (B9 * /A1) + (/B5 * (A1 + B7)))

then this part is confusing me.

end process;

B1 <= B4 & B5 & B7; //What does this mean?
B9 <= '1' when B4 = '0' and B5 = '1' else '0'; //B9 will equal 1 only if B4 and B5 is = to 1 else B9 = 0.
with B1 select //Do not understand this part what does B1 select mean?
A3 <=
'0' when "000" | "111", //when what is 000 or 111?
'1' when others;

end architecture a1;

The Attempt at a Solution


N/A
 
Physics news on Phys.org
Just to clarify, you need help converting this code to a state transistion diagram?

Typically we need you to make an attempt first, but I will answer your direct questions.

masterchiefo said:
B1 <= B4 & B5 & B7; //What does this mean?

B4, B5, and B7 are defined as std_logic. So they are single bit elements
B1 is defined as a 3 bit std_logic_vector.

the & signal will result in a concatenation.

ex.
c2<='1'
c3<='0'
c1<=c2&c3

c1 will be equal to "10"

masterchiefo said:
B9 <= '1' when B4 = '0' and B5 = '1' else '0'; //B9 will equal 1 only if B4 and B5 is = to 1 else B9 = 0.
Almost, B4 has to be 0 and B5 has to be 1

masterchiefo said:
with B1 select //Do not understand this part what does B1 select mean?
A3 <=
'0' when "000" | "111", //when what is 000 or 111?
'1' when others;
in spoken form, this mean A3 is equel to '0' when B1 is "000" or "111"
for all other possible B1 values A3 is equal to '1'
 
donpacino said:
Just to clarify, you need help converting this code to a state transistion diagram?

Typically we need you to make an attempt first, but I will answer your direct questions.
B4, B5, and B7 are defined as std_logic. So they are single bit elements
B1 is defined as a 3 bit std_logic_vector.

the & signal will result in a concatenation.

ex.
c2<='1'
c3<='0'
c1<=c2&c3

c1 will be equal to "10"Almost, B4 has to be 0 and B5 has to be 1in spoken form, this mean A3 is equel to '0' when B1 is "000" or "111"
for all other possible B1 values A3 is equal to '1'
I made a table of truth, but I am not sure if this is correct.
http://i.imgur.com/Z5lhaxV.png

Are my middle signals need to each have a 0|1 bit ?
 
I'm not entirely sure what you are asking but you will need to fill in the truth table and make a state transition diagram.
Also there is a LOT of unnecessary complications here. Is this a homework assignment? what is the purpose of the circuit?

start by making a truth table for B2, B3, B6, and B8 using A1, B4, B5, and B7
then make a separate truth table for A3 from B1 (you already did that)
 
Last edited:
donpacino said:
I'm not entirely sure what you are asking but you will need to fill in the truth table and make a state transition diagram.
Also there is a LOT of unnecessary complications here. Is this a homework assignment? what is the purpose of the circuit?

start by making a truth table for B2, B3, B6, and B8 using A1, B4, B5, and B7
then make a separate truth table for A3 from B1 (you already did that)
This is not really a home work just an optional practice I am doing to understand the concept more. I hate it when I can't understand a concept so I practice until I can master it :)

I'm not entirely sure to understand.

Could you just do the first line for the first table truth please, if this current one is not good?
so the first 4 are my main input. in the middle my signals and last my output

| B2 | B3 | B6 | B8 || B4 | B5 | B7 | B9 || A3 |

thank you very much man for helping.
 
you essentially have 3 components to this circuit.

concurrent logic, which has A1, B4, B5, and B7 as inputs,B2, and B9 as middle, and B3, B6, and B7as outputs.

Then you have you memory holding section, which sets the value of B4, B5, and B7 on the rising edge of A2 based on the value of clock

Then you have more concurrent logic which sets B1 and ultimately sets A3

so first make a truth table for just B2 and B9 from A1, B4, B5, and B7. Then add 4 more columns for the others
 
donpacino said:
you essentially have 3 components to this circuit.

concurrent logic, which has A1, B4, B5, and B7 as inputs,B2, and B9 as middle, and B3, B6, and B7as outputs.

Then you have you memory holding section, which sets the value of B4, B5, and B7 on the rising edge of A2 based on the value of clock

Then you have more concurrent logic which sets B1 and ultimately sets A3

so first make a truth table for just B2 and B9 from A1, B4, B5, and B7. Then add 4 more columns for the others
Why are B2 and B9 as middle?
Also would each of my row have 4 bits too?
also why do I have 3 inputs? when in my code it says «A3 : out std_logic);» In my understanding I have 1 output only?
 
it is a requirement to have a truth table for output of concurrent logic. I called B3, B6, and B7 outputs due to the fact that they are inputs to our memory device

We do have memory in the system, specifically B4, B5, and B7. So we need to define the input to those stages. That input is defined by B3, B6, and B7 (and '0'). To make the truth table for those 3 signals we need to first find B2 and B9, hence 'middle' signals. Then the current state of B4, B5, and B7 along with A1 will be 'inputs'. When I said inputs, i only meant for your intermediate truth table.

If you want to know how the output (A3) will change due to only A1, A2, and clock, then you will need a sequencing diagram and truth table. does that make sense? In addition your output will be unknown until you until you set B4, B5, and B7 to a known state
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
235
Views
14K
  • · Replies 6 ·
Replies
6
Views
4K
Replies
1
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 38 ·
2
Replies
38
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K