Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

It is strange to me that the verilog program behave differently when I turn a register variable into an output register variable.

GGan4
Beginner
902 Views

I write a finite state machine module using verilog. The state variable is a 2-bit register named STATE. It is strange to me that the program operates correctly only when I set STATE as an output. Is there anyone knows the reason for it, or the difference between whether I set a register variable as output or not?

0 Kudos
1 Reply
ak6dn
Valued Contributor III
204 Views

You have not provided enough information for anyone to comment in a reasonable fashion. What behaves differently, a simulator (which one) or a compiled FPGA? What is the difference? What is the context in which that register variable is used? It is just internal to a module instance, or is it actually an output of a module feeding other signals, that may feedback into an input into the module / state machine?

 

You need to provide snippets of actual code, what environment you are using, and what is the failed behavior vs expected behavior.

0 Kudos
Reply