Safe state machine design problem

Hi all,

I've been going through the archives trying to find a hint to the problem I
am having with a state machine (it occasionaly enters illegal states and
doesn't come out) and I found this post:
---------------------------------------------------------------------
From: iglam (rluking@deletethispart.home.com)
Subject: Re: safe state machine design problem
Newsgroups: comp.lang.vhdl, comp.arch.fpga
Date: 2001-06-08 08:26:41 PST


If you are using enumerated types, then your
when others clause is doing nothing.  You've already listed
all of the elements of the state type when you built your
case statement.  So, the first thing is, your synthesis tool
tosses that line.

Next, your synthesis engine decides to one-hot build the state machine.
OK, great.  Then, you screw up the state by forcing two bits high, and
it goes out to lunch.  Makes sense.  The synthesis tool was not
instructed to put in logic to avoid or get out of lockout states.

Either enumerate the Illegal states and get the synthesis tool to
build a regulare state machine

or

Get the synthesis tool to put the lockout state protection in.  I'm not
familiar with Leonardo, so someone else will have to suggest specific
solutions.

Bob
---------------------------------------------------------------------

So, I was wondering if ignoring illegal states when using enumerated types
is true for XST? That would explain at least some of my problems... Can I
somehow force XST to make a state machine safe without manually coding all
the states?


Thanks,
/Mikhail


0
MM
10/2/2003 6:26:15 PM
comp.arch.fpga 18521 articles. 1 followers. Post Follow

7 Replies
221 Views

Similar Articles

[PageSpeed] 26
MM wrote:

> I've been going through the archives trying to find a hint to the problem I
> am having with a state machine (it occasionaly enters illegal states and
> doesn't come out) 

The most likely reason for *getting* into an illegal state
is missing input synchronization.

The most likely reason for *staying* in an illegal state
is not covering all the state cases in your code.

Consider binary encoding.

  -- Mike Treseler

0
Mike
10/2/2003 8:20:50 PM
"Mike Treseler" <mike.treseler@flukenetworks.com> wrote in message
news:3F7C88A2.7040200@flukenetworks.com...
> The most likely reason for *getting* into an illegal state
> is missing input synchronization.

Understood...

> The most likely reason for *staying* in an illegal state
> is not covering all the state cases in your code.

That's what my original question was about. I do have a statement covering
all other states:
when others =>
     fsm_reg <= idle;
however it doesn't seem to do anything...

> Consider binary encoding.

You mean manual?

Thanks,
/Mikhail


0
MM
10/2/2003 9:26:51 PM
MM wrote:

> That's what my original question was about. I do have a statement covering
> all other states:
> when others =>
>      fsm_reg <= idle;
> however it doesn't seem to do anything...
> 
>>Consider binary encoding.
> 
> You mean manual?

No. I mean change the synthesis seting from one-hot to binary.

Synthesis does not always cover the "others" case
completely for one-hot encoding.


    -- Mike Treseler

0
Mike
10/2/2003 9:36:57 PM
Silly question but, is your design meeting timing? (how fast is the design
in question?)
Have you tried over constraining?


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Euredjian

To send private email:
0_0_0_0_@pacbell.net
where
"0_0_0_0_"  =  "martineu"




"MM" <mbmsv@yahoo.com> wrote in message
news:blhqhd$cijqt$1@ID-204311.news.uni-berlin.de...
> Hi all,
>
> I've been going through the archives trying to find a hint to the problem
I
> am having with a state machine (it occasionaly enters illegal states and
> doesn't come out) and I found this post:
> ---------------------------------------------------------------------
> From: iglam (rluking@deletethispart.home.com)
> Subject: Re: safe state machine design problem
> Newsgroups: comp.lang.vhdl, comp.arch.fpga
> Date: 2001-06-08 08:26:41 PST
>
>
> If you are using enumerated types, then your
> when others clause is doing nothing.  You've already listed
> all of the elements of the state type when you built your
> case statement.  So, the first thing is, your synthesis tool
> tosses that line.
>
> Next, your synthesis engine decides to one-hot build the state machine.
> OK, great.  Then, you screw up the state by forcing two bits high, and
> it goes out to lunch.  Makes sense.  The synthesis tool was not
> instructed to put in logic to avoid or get out of lockout states.
>
> Either enumerate the Illegal states and get the synthesis tool to
> build a regulare state machine
>
> or
>
> Get the synthesis tool to put the lockout state protection in.  I'm not
> familiar with Leonardo, so someone else will have to suggest specific
> solutions.
>
> Bob
> ---------------------------------------------------------------------
>
> So, I was wondering if ignoring illegal states when using enumerated types
> is true for XST? That would explain at least some of my problems... Can I
> somehow force XST to make a state machine safe without manually coding all
> the states?
>
>
> Thanks,
> /Mikhail
>
>


0
Martin
10/3/2003 2:38:13 AM
"Mike Treseler" <mike.treseler@flukenetworks.com> wrote in message
news:3F7C9A79.8090106@flukenetworks.com...
> No. I mean change the synthesis seting from one-hot to binary.
>
> Synthesis does not always cover the "others" case
> completely for one-hot encoding.

I tried gray and it didn't help. I will try binary tomorrow, but I would
like to know when XST covers the "others" case and when it doesn't....

/Mikhail


0
MM
10/3/2003 4:52:03 AM
"Martin Euredjian" <0_0_0_0_@pacbell.net> wrote in message
news:pi5fb.8964$5P7.7307@newssvr27.news.prodigy.com...
> Silly question but, is your design meeting timing? (how fast is the design
> in question?)
> Have you tried over constraining?

The design isn't really fast, only 50 MHz. The state machines in question
are not on critical path. Overconstraining doesn't work well because of a
big 3rd party core, which if overconstrained doesn't meet the timing at all.
I think Mike is right and my problem is related to asynchronous inputs, but
I still want to know more about how XST extracts state machines...

/Mikhail


0
MM
10/3/2003 4:56:35 AM
You can apply a different set of constraints (tigher) just to the logic of
your state machine while other parts of the design are governed by a
(presumably) looser PERIOD constraint.

What you need to do is define FROM/TO constraints to the logic related to
the state machine.  The easiest way to do it might be to use the constraints
editor and find all the FF's related to that module.  It's pretty easy from
there forward.  The PERIOD constraint has the lowest priority of all, so
FROM/TO will override it only for the specified logic.

So, you could have a PERIOD set to 20ns while FROM/TO is specified to 10ns.

Also, I forgot to ask.  Does this happen during/around any reset signals?  I
suffered the pain of having one-hot state machines wake up in illegal
states.  Ultimately it was due to not handling reset properly and having
FF's cleared/set at different times.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Euredjian

To send private email:
0_0_0_0_@pacbell.net
where
"0_0_0_0_"  =  "martineu"



"MM" <mbmsv@yahoo.com> wrote in message
news:blivi5$ckn15$1@ID-204311.news.uni-berlin.de...
> "Martin Euredjian" <0_0_0_0_@pacbell.net> wrote in message
> news:pi5fb.8964$5P7.7307@newssvr27.news.prodigy.com...
> > Silly question but, is your design meeting timing? (how fast is the
design
> > in question?)
> > Have you tried over constraining?
>
> The design isn't really fast, only 50 MHz. The state machines in question
> are not on critical path. Overconstraining doesn't work well because of a
> big 3rd party core, which if overconstrained doesn't meet the timing at
all.
> I think Mike is right and my problem is related to asynchronous inputs,
but
> I still want to know more about how XST extracts state machines...
>
> /Mikhail
>
>


0
Martin
10/3/2003 5:38:47 AM
Reply:
Similar Artilces:

Problem: Linux 2.6 running in vmware
Dear all, for kernel development purposes, I am making use of vmware. With kernels 2.4, everything works fine. However, when I try to boot a 2.6 kernel (no matter wether stock, Debian or self extended), INIT 2.85 crashes with segmentation faults everytime it tris to access the virual disk. Therefore, I kindly ask you for help to solve this problem! Thanks in advance for any hint! Kind regards, Lukas Lukas Ruf wrote: > > Dear all, > > for kernel development purposes, I am making use of vmware. With > kernels 2.4, everything works fine. However, whe...

non linear state space in simulink
hello everyone, I am trying to represent a non linear system in simulink. The linear state space block does not allow this so I'm attempting to do it in an embedded matlab function. I have defined a vector dx in terms of combinations of states and inputs, and plan to use ode45 to solve this. If I define a function: function dx = f(t,x) %define dx as a vector dx=zeros(4,1); dx(1)=x(3); dx(2)=x(4); dx(3)=x(1)-2*x(4)-0.9*(x(1)+0.1)/-0.1*(x(1)-0.9); dx(4)=x(2)-2*x(3)-0.9*x(2)/-0.1*x(2); Then type: [t,x]=ode45(@f ,[0,10],[0;0;0;0]) in the command window, then it appears...

virtual machines
Hello. I have a Fedora 11/Vista dual boot machine (x64 Intel core duo) and would like to be able to run the Vista OS as a virtual machine within the Linux environment. I have installed the virtualization applications but it only appears to be able to create a new image using the original installation media. How can I get the existing installation to run from within Linux? Thanks, Graham Graham Vincent wrote: > Hello. > > I have a Fedora 11/Vista dual boot machine (x64 Intel core duo) and would > like to be able to run the Vista OS as a virtual machine within the Linux > e...

Hogwasher & mouse click problem
Anybody using HW under Lion? When I click with the left mouse button, I get the contextual menu that normally (and still does) comes up when clicking the right button or Control-click (left button). Anybody else have this experience? I'd like to know if this is just an issue of a Lion-incompatible app, or if there's a fix. And please let's not start down the road of "do you know how old that app is..." Thanks, Dave On Wed, 9 Nov 2011 12:50:23 -0500, DaveC wrote (in article <0001HW.CADFFD5F00007AB3B01849DF@news.eternal-september.org>): > Anybody using ...

problems posting
pease ignore: I sent a detailed message a little while ago and it did not seem to post. I'm sending this to test posting is working. ...

ANNOUNCE: Hierarchical finite state machine system
CHSM (Concurrent Hierarchical State Machine) is a language system for specifying concurrent, hierarchical, finite state machines (a realization of "statecharts") to model and control reactive systems. CHSM uses its own specification langauge annotated with C++ code fragments in the tradition of yacc with C code fragments. CHSM has been used successfullly in production environments such as CERN and Philips. Originally developed in partial fulfullment of my master's thesis in 1992, I've finally gotten around to updating it to compiler on modern, standard C++ compil...

can povray drive a cnc or milling machine?
Hi all, I'm trying to familiarise myself with the world of cnc and milling techniques because I would like to create a design (preferably in Povray) and then export the design as a string of xyz positions, so that I can use those to drive stepper motors in a cnc or milling machine and create it in styrofoam. Maybe this is done by a script that 'scans' the object from left to right and then advance a step forward to scan again until the whole object is mapped, but this is just speculation. Hopefully there's a function or plugin available in povray to do t...

Design Flow: STA to Synthesis
Is anyone familiar with Mentor Graphics tools? I am currently using ModelSim 5.5e at school. After I have compiled and functionally verified my VHDL design I would like to synthesize my HDL description into a transistor level design. From there I would like to perform a more detailed timing and power analysis using some standard cell libraries. Is this possible? In the past I have used Cadence's design tools, namely Virtuoso for layout and schematic level. Is it possible with today's automated design software to transform a HDL description into a transistor level description, say, fi...

making arguments safe for ln
I'm currently writing the following in a bash script: ln -s "$TARGET" "$SOURCE" This isn't safe though if "$TARGET" starts with "-" since ln might interpret it as a switch. What's the right way of avoiding this? I was thinking of ln -s ./"$TARGET" "$SOURCE" but that incorrectly mangles the target. Help! -- James Leifer In article <r77smm2lkj7.fsf@brouilly.inria.fr>, James Leifer wrote: [cut] > This isn't safe though if "$TARGET" starts with "-" since ln might > interpret it a...

Unusual Math Problem
CW55 ABC I have a table that contains some amounts AMOUNT1 AMOUNT2 AMOUNT3 .... AMOUNT25 I need to put a button next to each amount to total the amounts above, with a kick.... For each button next to the amount, I need to have it total everything above that number AFTER a blank amount. IE for button 22: assuming amount 18 is blank, I need to add amount19+amount20+amount21. Any Ideas? Tim Morrison On Mon, 28 Jul 2003 08:28:12 -0500, "Tim Morrison" <sales@kjmsoftware.com> wrote: >I have a table that contains some amounts > >AMOUNT1 >AMOUNT2 >AMOUNT3 >...

Server Machine or Dedicated MySQL Server Machine
Hi, I am new to mysql, php and apache and I am looking for advise on the best way to install/configure all three and what server types to have. You can contact me here.... tracy_woodham@hotmail.com Thanks in advance I would go with CentOS Linux ... you can install Apache, MYSQL, PHP right off the bat, mostly configured and ready to go ... all you need to do is start the services. CentOS is based off of redhat linux, works very well as a server because it's not updated as often as most other linux distro's. If you don't like Red Hat Style Linux you can go with Ubuntu Linux Which...

Entourage using RPC over HTTP problem
All, I have my Powerbook talking nicely using RPC/HTTPS to my work email. However we have a separate Exchange domain setup using Microsoft's Provisioning tool for (basically) hosted Exchange mailboxes. I can connect to an account on them by using the https://address.of.webmail.com and logging in as normal - however when I try and setup Entourage to do the same thing it does some weird stuff. It allows me, when specified of course, to see the public folders and seems to connect to the box (ie does not error me and goes from Not Connected to looking like it is online. However that is all th...

Analog IC Design Engineer Needed ASAP! (45353114403)
Analog IC Design Engineer Needed ASAP! (45353114403) ===================================================== Position: Analog IC Design Engineer Reference: MLS00003 Location: Austin TX Duration: Perm Skills: Architectural and transistor-level design and implementation of the analog portions of CMOS mixed-signal IC's. Requires strong circuit design fundamentals and a basic understanding of signal processing, high-level behavioral modeling of analog functions, active device physics and m...

Dynamic Format Usage Problem
Hi, All Here is a simplified version of the problem I am facing. I need to convert attr coding into English description. In the following data u step, the IF-THEN-PUT structure works just fine. Now the problem is that the real data contains many different IDs and each ID has a unique set of possible attributes (as defined by Proc Format), which makes it inefficient to enumerate all the IF possibilites. If I want to use a better structure to replace the IF- THENs, what would it be like? I know it would be difficult for macros because it would need parameter input from the same data step. ...

Lighting switch state communication
I am planning out my new home HA system, and one of the requirements is to have a light switch status, or more precisely, change in status, communicated back to the ELK system I will be using. It dawned on me that my plans to use X10, INSTEON, or Z-wave may not RELIABLY provide this capability. I had been thinking that if I changed the light in question via IR, that the communication of status would work, but not so if the switch itself was used. Has anyone any real life experience with communicating switch status using any of these protocols? Dennis There are X10 light switches m...

US-TX-Austin: WANTED! Logic Design Engineer., Integrated North bridge exp ., P (45337257609)
US-TX-Austin: WANTED! Logic Design Engineer., Integrated North bridge exp ., P (45337257609) ============================================================================================ Position: Microprocessor Logic Designer Reference: SMC01770 Location: Austin TX Duration: Perm Skills: BSEE (MSEE preferred). Integrated Northbridge exp. 5+yrs in logic design and micro architecture development for microprocessors (x86 strongly preferred). Core skills include logic development. Exp in stati...

Calendar.getInstance() thread safe?
Hi, In a multi-threaded application, I encountered problems with dates being "reset" to 1970, or being negative when converted into ms since 1970. I use Calendar to do operations on dates, and as I see no obvious bug in the code, and as the problem occurs randomly and after a certain time, I was wondering if that was a multi-threading issue. So the question is: Is Calendar.getInstance() thread safe? I did not find a satisfying answer searching the web. Is there asbolutely no possibility that two (or more) threads calling Calendar.getInstance() at the same time ...

consignment problem
This is d database i nid to construct: A store that sells both on cash and credit and got its supply by consignment.. can u help me or any suggestions how to contruct my tables??? I nid answer as soon as possible... Tnx for the help... -- Message posted via http://www.accessmonster.com "hugz via AccessMonster.com" <u33625@uwe> wrote > This is d database i nid to construct: A store that > sells both on cash and credit and got its supply by > consignment.. can u help me or any suggestions > how to contruct my tables??? I nid answer as soon > as possible....

Project Lead /Mixed Signal Analog Designer (45349914413)
Project Lead /Mixed Signal Analog Designer (45349914413) ======================================================== Position: Project Lead /Mixed Signa Reference: RWP00025 Location: Austin TX Duration: perm Skills: Project Lead /Mixed Signal Analog Designer Eight to ten years related experience in analog CMOS IC design for signal processing. MSEE required, PhD preferred. Previous Project Lead experience and capabilities is also a must for this role Candidate should have a broad knowledge of analog CMO...

Re: United States Says No! Internet is Ours! #17
>> [TELECOM Digest Editor's Note: But although the 'real roots' work just >> fine, as you note, someone starting their own competing root server >> could bypass all the silly requirements of things like ICANN couldn't >> he? In addition to copying all the data now in use, he could also start >> his own domains, could he not? He could start a domain for example >> called '.abracadabra' or whatever name and it would not be subject to >> any rules but his own. Or am I missing something here? I don't have to pretend t...

MySQL Database design for placing service orders
Hi, I am currently designing a simple service orders database. I have played around with MySQL a bit but this is the first time I'm using it in anger, I have a few design queries to make sure I am implementing the database correctly. Currently I have a number of tables, the first being the package table (lists the different service names - such as small, medium etc). Note in the tables I have trimmed a lot of the unnecessary stuff to save space: Package Table: packageID name PRIMARY KEY (packageID) The package durations table lists the different duartions of packages ...

MicroVitec Cub 3000 problem
Hi, Can anybody help with my monitor problem. I have a MicroVitec Cub3000 colour montor connected to my A3000 but when I switch on the monitor has a green tinge to it. One of two things happen: a) after a period (2 hours in one instance) it will go to normal colour ie no green tinge. or b) if I tap the side it will go to normal colour ie no green tinge. If someone could help me find the problem and sort it, may be a soldering job or something. Regards Ray In article <Xtyne.2092$8m5.1151@newsfe5-gui.ntli.net>, Delllap <delllap@ntlworld.com> wrote: > If someone could help...

pinball machine
Macrown Electronic Development Co.,Ltd is a professional manufacture for games machine, especially in arcade machine,casino machine,game machine,gaming machine,gumball machine,pinball machine,slot machine,vending machine. http://www.macrown.com.cn/arcade-machine.asp http://www.macrown.com.cn/casino-machine.asp http://www.macrown.com.cn/game-machine.asp http://www.macrown.com.cn/gaming-machine.asp http://www.macrown.com.cn/gumball-machine.asp http://www.macrown.com.cn/pinball-machine.asp http://www.macrown.com.cn/slot-machine.asp http://www.macrown.com.cn/vending-machine.asp Power By: http://...

how to design this relation and field
Hi All, we have one database, which includes all course information, for each courses, there is one unique number, and several repeat fields with several instructor's information, such as name and type of instructor. and another database has information of the instructor. what we want is that after typing the unique number, it will put the type of instructor from the above database. but the type of instructor is repeat field, how to deal with this. Thanks a lot, Dong On Thu, 09 Sep 2004 10:30:46 -0400, Dong wrote: > Hi All, > we have one database, which includes all ...

Simulation problem in CVER
Hi 1) Recently i tried to do functional simualtion of my code, which uses some Altera primitives (Altdpram), in CVER. I found that the simulator is doing a core dump. The same is happening with Xilinx BRAM primitive. I am not sure if these primitives are the real problem. I would like to know if anyone else have faced the same problem or similar problem (and a way to solve it :)) FYI: I am using CVER in Cygwin environment. I tried the same code in almost all the recent versions of CVER. 2) I also tried to do timing simulation with the altera library and then with Xilinx library(...