Engineering Identifying the purpose of a circuit from the VHDL definition file

Click For Summary
The discussion focuses on interpreting a VHDL definition file to understand a circuit's purpose. The circuit operates on clock ticks, executing a reset, loading a value, counting up, or counting down based on specific signals. The timing graph indicates that the output IQ rolls over to 256, highlighting VHDL's unsigned behavior and the lag of output Q behind IQ due to simultaneous execution of code blocks. The exact purpose of the circuit remains unclear, with speculation that it could function as a reaction timer, but concerns about rollover and value loading are noted. There is also a query regarding the definition of the vector "D."
Weaver
Messages
70
Reaction score
6
Homework Statement
Complete timing signal from VHDL and identify what the circuit is used for (see picture below)
Relevant Equations
N/A
243520


I have attempted to sketch the timing and got the following graph

From reading the VHDL code my understanding is io each rising edge clock tick the system will carry out one of the following (choosing based on priority):
  1. reset if Clear_L is high
  2. load in a value if Clear_D is high
  3. UP count if Up is high
  4. Down count if nothing else
From this, I got this graph:

243521

Points of interest are:
  • IQ rolls over to 128 when 0-1 happens (I believe that's how unsigned works in VHDL)
  • Q lags one behind IQ as with VHDL will simultaneous carry out all lexical blocks of code, meaning the check for UP will occur at the same time Q is assigned to IQ so it won't capture the changed value
But what the point of the circuit is, I am not sure. I guess it could be a for a reaction timer? But I'm really unsure. Especially as will rollover if left for too long and you can load a value in

EDIT: It would roll over to 256 not 128 in the graph as IQ is 8 bits, (I mistakenly read it as 7 bits)
 
Last edited:
Physics news on Phys.org
Is the vector "D" defined somewhere? Sorry if I'm missing it.
 

Similar threads

Replies
1
Views
9K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
Replies
10
Views
10K
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K