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 10-10-2004, 06:52 PM
Brad Smallridge
Guest
 
Posts: n/a
Default VHDL code for Type and Components

Help!

I have a state machine on my top level for an SRAM controller. The states
are sram_state_read, sram_state_write, sram_state_idle, and
sram_state_reset. Presently the design is flat with no components. I want to
put the SRAM paths in a component by itself. Since the SRAM state machine
may influence other parts of the design, I want to have a separate component
for it, or leave it in the top level. Now it seems to me that one should be
able to pass these states down to to the SRAM paths' component using the
type that I decleare on the top level. However I have been unable to find
the syntax for doing this. I suppose I could "hard code" the states into
known patterns of 1s and 0s and pass the the info into the component using
std_logic_vector but this seems counter to high level language philosophy.
Can anybody help?

Thanks,
Brad Smallridge
b r a d @ a i v i s i o n. c o m



Reply With Quote
  #2 (permalink)  
Old 10-12-2004, 10:00 PM
Joe
Guest
 
Posts: n/a
Default Re: VHDL code for Type and Components

Brad,

This will work if you declare the state types in a separate package file.

Joe
Reply With Quote
  #3 (permalink)  
Old 10-18-2004, 04:20 PM
Jim Lewis
Guest
 
Posts: n/a
Default Re: VHDL code for Type and Components

Brad,
I tend not to pass the state of a statemachine
to other blocks. I tend to do the following
steps:
1) Draw block diagram for statemachine and
datapath/resource blocks the statemachine
controls.
2) Draw bubble diagram (on paper) for statemachine.
3) Factor out any additional resources out of the
statemachine (such as incrementers) and put
them in separate processes or separate components.
4) Code all datapath and resource blocks
5) Fix bubble diagram as when you code the datapath
it is typical that you need something different than
in your original plan.
6) Code statemachine from bubble diagram.

Keep in mind that every designer probably has their
own method, but this ought to get you started.

Cheers,
Jim
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
Jim Lewis
Director of Training mailto:[email protected]
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~




> Help!
>
> I have a state machine on my top level for an SRAM controller. The states
> are sram_state_read, sram_state_write, sram_state_idle, and
> sram_state_reset. Presently the design is flat with no components. I want to
> put the SRAM paths in a component by itself. Since the SRAM state machine
> may influence other parts of the design, I want to have a separate component
> for it, or leave it in the top level. Now it seems to me that one should be
> able to pass these states down to to the SRAM paths' component using the
> type that I decleare on the top level. However I have been unable to find
> the syntax for doing this. I suppose I could "hard code" the states into
> known patterns of 1s and 0s and pass the the info into the component using
> std_logic_vector but this seems counter to high level language philosophy.
> Can anybody help?
>
> Thanks,
> Brad Smallridge
> b r a d @ a i v i s i o n. c o m
>
>
>


Reply With Quote
Reply

Bookmarks


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
type errors in vhdl lucky Verilog 1 09-01-2006 04:41 PM
virtex2.components.all van de Kerkhof FPGA 5 09-29-2004 07:08 AM
[VHDL] Personnal type as port Sylvain Munaut FPGA 1 08-03-2004 10:27 AM
Quartus VHDL problem with aggregate and type cast rickman FPGA 3 07-15-2003 05:24 AM


All times are GMT +1. The time now is 12:12 PM.


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