- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hello. I am new in VHDL. I try to create train ticket machine using vhdl. It have 3 destination and all destination have fee. When user insert money with same of fee, ticket will out and no change but if user enter extra money than fee, ticket will out also with change.When i run the simulation all output does not appear. Anybody can help me with my code below,please. Thanks. God bless you.
- Etiquetas:
- Intel® Quartus® Prime Software
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Are you simulating with Model-Sim? If yes, when you start it probably you see that it hangs. What really happens is that your testbench doesn't have a stop condition, so simulation never ends:
--- Quote Start --- wait; end process; END; --- Quote End --- If yes, you may click the STOP button or replace the last lines of testbench with assert falsereport "simulation completed"
severity failure;
end process;
end;
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
You're using ISE/ISim. This is an Altera Forum.
There is something strange in your code. You control output like Retrn inside clk'event if. So Retrn is registered. But when you detect reset condition, you assign a reset value only to "Train_state". The simulator show cleary that some signals have and undefined state ( UUUU ).- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Thanks. But i still dont get it. can u show me which code that wrong and what the exactly code that i need change it.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
As I said, assign a value to the output vectors on reset conditions. I do it and Retrn vector gets a defined value. With "money_sum" vector the problem in different. You forgot this signal in the component instantiation in the testbench ( look at the original code ). When you add it, money_sum gets a defined value too.
Because some reason you declare money_sum as inout, so i place the reset value as Hi-Z ( "ZZZZ" ). Check what is the right value on this situation. I post the corrected codes.- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Can you explain in more detail how should work this circuit? I will help you better.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Ok. For example output that I want, if kl_station=1 which the fees for kl ticket is greater than 2.When RM1 insert, Money_sum<="0001",when RM2 insert,Money_sum<="0011" because RM1 + RM2. Then, ticket will be 1 and change must equal to "0001". I hope you understand what I mean.Thanks
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
I don't undestand very well, but it will useful to add the state register to the waveforms. Money_sum is "0001" the after 1 clock cycle RM1 goes '1'. Probably you inferred a register for money_sum but its next state logic isn't clear in your code.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It ok. Thanks for response. I already done it.

- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla