FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-03-2004, 07:38 PM
Simone Winkler
Guest
 
Posts: n/a
Default please help! state machine

Hello!

I've got a strange problem that I don't know any solution for - up to now I
tried everything, but it didn't work.
The state machine always stops to go to the next state - I
really don't understand why.

I've got a state machine with 5 states: SEL_EP, WRITE_INIT, WRITE_DATA,
VAL_BUF and IDLE. It gets stuck after the WRITE_INIT state, just remains in
the WRITE_INIT state all the time. WHY????
The 2nd (smaller) problem is, that the data at write_out comes one clock
cycle too late. I understand why, but how can i change this?

I don't know if it's a good idea to solve my problem with my kind of code,
i'm an "advanced beginner" and as I am used to program "sequential
programming languages" I've got big problems with doing sequential things in
vhdl. What is the easy way to do things one after the other, e.g. write one
byte after the other? (also to be synthesizable).

I put the code at http://members.liwest.at/simsi/stuff/usb.vhd, because it's
quite long to put it here. (don't be afraid - no virus!)

Please help me! I really don't know where to go on.

Thank you,
Simone


Reply With Quote
  #2 (permalink)  
Old 01-04-2004, 03:11 AM
rAinStorms
Guest
 
Posts: n/a
Default Re: please help! state machine

What program you using ..Quartus?

"Simone Winkler" <[email protected]> wrote in message
news:[email protected]
> Hello!
>
> I've got a strange problem that I don't know any solution for - up to now

I
> tried everything, but it didn't work.
> The state machine always stops to go to the next state - I
> really don't understand why.
>
> I've got a state machine with 5 states: SEL_EP, WRITE_INIT, WRITE_DATA,
> VAL_BUF and IDLE. It gets stuck after the WRITE_INIT state, just remains

in
> the WRITE_INIT state all the time. WHY????
> The 2nd (smaller) problem is, that the data at write_out comes one clock
> cycle too late. I understand why, but how can i change this?
>
> I don't know if it's a good idea to solve my problem with my kind of code,
> i'm an "advanced beginner" and as I am used to program "sequential
> programming languages" I've got big problems with doing sequential things

in
> vhdl. What is the easy way to do things one after the other, e.g. write

one
> byte after the other? (also to be synthesizable).
>
> I put the code at http://members.liwest.at/simsi/stuff/usb.vhd, because

it's
> quite long to put it here. (don't be afraid - no virus!)
>
> Please help me! I really don't know where to go on.
>
> Thank you,
> Simone
>
>



Reply With Quote
  #3 (permalink)  
Old 01-04-2004, 10:36 AM
Simone Winkler
Guest
 
Posts: n/a
Default Re: please help! state machine


: What program you using ..Quartus?

Xilinx ISE Webpack 5.2i with ServicePack, Modelsim XE 5.6e Starter.

Reply With Quote
  #4 (permalink)  
Old 01-04-2004, 09:13 PM
Marc Randolph
Guest
 
Posts: n/a
Default Re: please help! state machine

Simone Winkler wrote:
> Hello!
>
> I've got a strange problem that I don't know any solution for - up to now I
> tried everything, but it didn't work.
> The state machine always stops to go to the next state - I
> really don't understand why.
>
> I've got a state machine with 5 states: SEL_EP, WRITE_INIT, WRITE_DATA,
> VAL_BUF and IDLE. It gets stuck after the WRITE_INIT state, just remains in
> the WRITE_INIT state all the time. WHY????
> The 2nd (smaller) problem is, that the data at write_out comes one clock
> cycle too late. I understand why, but how can i change this?
>
> I don't know if it's a good idea to solve my problem with my kind of code,
> i'm an "advanced beginner" and as I am used to program "sequential
> programming languages" I've got big problems with doing sequential things in
> vhdl. What is the easy way to do things one after the other, e.g. write one
> byte after the other? (also to be synthesizable).
>
> I put the code at http://members.liwest.at/simsi/stuff/usb.vhd, because it's
> quite long to put it here. (don't be afraid - no virus!)
>
> Please help me! I really don't know where to go on.


And later posted:

> Xilinx ISE Webpack 5.2i with ServicePack, Modelsim XE 5.6e Starter.


You should be able to use Modelsim to duplicate the lockup, and
therefore see what input to the state machine is causing you the problem.

BTW, you may not be getting what you expect with at least one of your
procedures since the clocked part of the procedure is within another if
statement.

Also, the proper newsgroup for this type of question is

news:comp.lang.vhdl

Have fun,

Marc

Reply With Quote
  #5 (permalink)  
Old 01-05-2004, 11:33 AM
John Adair
Guest
 
Posts: n/a
Default Re: please help! state machine

For starters make sure that your sensitivity list is complete. It isn't at
present and some simulators will simply ignore statements where the "input"
signals are not in the sensitivity list. Synthesisers should do something
similar in theory but most "assume" the sensitivity list.

John Adair
Enterpoint Ltd.

This message is the personal opinion of the sender and not that necessarily
that of Enterpoint Ltd.. Readers should make their own evaluation of the
facts. No responsibility for error or inaccuracy is accepted.


"Simone Winkler" <[email protected]> wrote in message
news:[email protected]
> Hello!
>
> I've got a strange problem that I don't know any solution for - up to now

I
> tried everything, but it didn't work.
> The state machine always stops to go to the next state - I
> really don't understand why.
>
> I've got a state machine with 5 states: SEL_EP, WRITE_INIT, WRITE_DATA,
> VAL_BUF and IDLE. It gets stuck after the WRITE_INIT state, just remains

in
> the WRITE_INIT state all the time. WHY????
> The 2nd (smaller) problem is, that the data at write_out comes one clock
> cycle too late. I understand why, but how can i change this?
>
> I don't know if it's a good idea to solve my problem with my kind of code,
> i'm an "advanced beginner" and as I am used to program "sequential
> programming languages" I've got big problems with doing sequential things

in
> vhdl. What is the easy way to do things one after the other, e.g. write

one
> byte after the other? (also to be synthesizable).
>
> I put the code at http://members.liwest.at/simsi/stuff/usb.vhd, because

it's
> quite long to put it here. (don't be afraid - no virus!)
>
> Please help me! I really don't know where to go on.
>
> Thank you,
> Simone
>
>



Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is wrong with this state machine? Verictor Verilog 4 03-28-2007 07:32 PM
State machine style. Paul Marciano Verilog 14 10-03-2005 11:00 PM
state machine without clock Miller2000 Verilog 15 05-26-2005 02:45 AM


All times are GMT +1. The time now is 05:30 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved