--- Quote Start ---
Ok, I understand what you are saying. I looked at my xxx.map.rpt & it says the State I want it to initialize to out of power-up is encoded to all 0's:
Info: State "|CPLD_A_test2|foo:SM1|CURRENT_STATE.wait_state" uses code string "0000000000"
But That isnt a "reset state", I dont have one. If I were to make a reset state, how would it know when to transition to my initial "wait_state"?& why do you need one? my state machine code looks like this:
process(clk)
begin
if clk = '1' and clk'event then
if sreset = '0' then --This is my external reset
CURRENT_STATE <= wait_state;
..
..
end if;
else case CURRENT_STATE is
when wait => do your stuff
It sounds you are saying "most designs" use an external power on reset to drive DEV_Clrn, but I am trying to get around that.
appreciate your patience!
thanks,
ambien
--- Quote End ---
--- Quote Start ---
It might be OK for your wait_state to be the state the state machine enters at power-up reset. If that state waits for some signal that is synchronized to the clock before transitioning to any other state, then you're OK. If the end of the power-up reset condition could cause an immediate exit from that state, then you have to make sure only one state code bit can potentially toggle for that exit or you have to use a synchronized reset signal (whether from an input pin or created internally) to control the exit from that state.
Most designs have a reset on a regular input pin, not the DEV_CLRn special-purpose pin for device-wide reset. You can't use DEV_CLRn in your RTL for a reset signal.
--- Quote End ---
Brad! thanks, that was the problem. in my "wait_state" the conditional was waiting on an active low signal to transition onto the next state. So It sounds like it was coming out of reset seeing this signal cleared & transitioning onto the next state. I made it active High & all seems well. I tried "pre-setting" this port, in vhdl: foo: std_logic := '1', & it still didnt fix it. shouldnt it have? after reading the manual you pointed out on state machines it sounds like these presets are done in configuration mode, not user mode.
thanks! the check is in the mail.
ambien