Help with VHDL to transition state diagram

Click For Summary

Discussion Overview

The discussion revolves around converting VHDL code into a state transition diagram. Participants are addressing specific lines of VHDL code, seeking clarification on their meanings and implications, and discussing the creation of truth tables related to the circuit's operation.

Discussion Character

  • Homework-related
  • Technical explanation
  • Conceptual clarification
  • Exploratory

Main Points Raised

  • Participants inquire about the meaning of specific VHDL code lines, such as the concatenation operation in "B1 <= B4 & B5 & B7;" and the conditional assignment in "B9 <= '1' when B4 = '0' and B5 = '1' else '0';".
  • There is a discussion on the need to create truth tables for various signals, including B2, B3, B6, and B8, based on inputs A1, B4, B5, and B7.
  • Some participants express uncertainty about the number of inputs and outputs in the circuit, particularly regarding the output A3 and the role of B3, B6, and B7 as outputs in the context of memory storage.
  • Clarifications are made regarding the classification of signals as "middle" signals and the necessity of truth tables for concurrent logic outputs.
  • One participant shares a truth table they created but questions its correctness and seeks feedback on the initial rows.

Areas of Agreement / Disagreement

Participants generally agree on the need for truth tables and the conversion of VHDL code to a state transition diagram. However, there are multiple competing views regarding the interpretation of specific code lines and the structure of the truth tables, indicating that the discussion remains unresolved.

Contextual Notes

Participants express uncertainty about the definitions and roles of various signals in the circuit, highlighting the complexity of the VHDL code and the need for further clarification on how to approach the truth tables and state transition diagrams.

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
15K
  • · Replies 6 ·
Replies
6
Views
4K
Replies
1
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 38 ·
2
Replies
38
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K