How to do one hot state machine in verilog for Xilinx V5 using XST

I would like to use one hot state machine in verilog. I am using Xilinx V5 FPGA and XST synthesis tool. May i know the verilog syntex to do one hot?

Thanks.

CP

Reply to
cpandya
Loading thread data ...

Repeat 3 times: "Google is gooood."

formatting link

Reply to
John_H

I am still unable to see the xst directive that telss the the xst synthesis tool that the state machine is one-hot. Is there such a thing?

Google is good.

Reply to
cpandya

Find "XST User Guide" (in PDF) on xilinx.com. You will find plenty of informations about XST. The same goes for "Constraints Guide" (also PDF).

(for VHDL) attribute fsm_encoding of {entity_name|signal_name}: {entity|signal} is "{auto|one-hot|compact|gray|sequential|johnson|speed1|user}"; (for Verilog) // synthesis attribute fsm_encoding [of] {module_name|signal_name} [is] {auto|one-hot|compact|gray|sequential|johnson|speed1|user};

Cheers

Reply to
Jarek Rozanski

I do believe the xilinx tools default to 1-hot implementation if left unspecified.

Reply to
Jeff Cunningham

This is in fact true. It's also very annoying if you don't realize this and scratch your head for days wondering why a simple state machine with a 3-bit binary encoding and 8 states can lock up...

Reply to
Gabor

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.