Kleric wrote:
> Hey
>
> I'm having some problems with my code lock machine.
> It is for simulation.
>
> Here is my code:
> http://www.box.com/s/129cbfc83b936f275292
>
> It is a lock machine. When the right code is entered it gets opened.
> Maybe you could help me to get it working.
>
>
> The problem is that when i use this line "wait until
> rising_edge(clock);" in my lock.vhd file it gives me this error:
> Prefixed name 'rising_edge' is not a 1 dimensional array or a function
> or contains a bad suffix (index/slice/selected-name)
rising_edge has been around for quite some time, now. What
old software are you trying to compile this with?
>
> When I replace this line with this:
> wait on clock until clock = '1';
> It compiles.
> But it doesn't work, my graph stays the same all time.
Possibly because this is not the same as rising_edge. You
need to add clock'event to ensure edge dependency like:
wait until clock'event and clock = '1';
>
> Thanks
If you're writing this code with synthesis in mind, you might want
to use a more standard clocking template like:
process_name: begin
process (clock) begin
if rising_edge(clock) then
case current_state is
when 0 =>
. . .
when others =>
next_state <= 0;
end case;
end if;
end process process_name;
Regards,
Gabor