Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ASM and Verilog implementation

Status
Not open for further replies.

shikharmakkar

Junior Member level 1
Joined
Apr 11, 2013
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,427
In the question below, the ASM chart shows that value of q_next is compared to 0 to proceed to next state but before q_next is compared, the value of q is already updated with q_next, so if we compare the value of q with 0, will the results be same in terms of timing and other parameters? Also what should be the types of q_next and q? Should they be reg or wire? I have attached the screenshots of the ASM chart and the Verilog code. I also don't understand the timing implications of conditional box, like when in the wait1 state, we check the value of sw and if true, we decrement the counter and then check if counter has reached to zero and then asser db_tick. I want to understand the time flow when we move from wait1 and increment counter and assert db_tick. Are there any clock cycles involved between these stages, that is moving from a state to a conditional box? Also in the verilog code, we use q_load and q_tick to control the counter. Why these signals are used when we can simply control the counter in the states? Is it done to make sure that the FSM (control path) controls the counter (data path)? Please explain. Thanks in advance.

debouncer.jpg


code.jpg
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top