Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Separating control and data paths

 
Thread Tools Search this Thread
Old 01-19-2006, 09:45 AM   #1
Default Separating control and data paths


I have read that simulation is much better if there is a clear
separation of control and data paths in VHDL. Can someone give me an
example code of this?

thanks
RP



crazyrdx
  Reply With Quote
Old 01-19-2006, 12:12 PM   #2
Marcus Harnisch
 
Posts: n/a
Default Re: Separating control and data paths
Hi RP,

"crazyrdx" <> writes:
> I have read that simulation is much better if there is a clear
> separation of control and data paths in VHDL. Can someone give me an
> example code of this?


I am not sure about getting "better" simulation results, whatever that
means. To me it's more a matter of coding style (which in turn is
often a matter of the targeted application), similar to the never
ending discussions about the benefits of 1/2/3-process FSMs. Actually,
a 2+-process FSM separates control and data paths as well.

OK, here's my example. Think of a register file with N registers. You
could separate the address decoding logic (control path) from register
assignment (data path). Your address decoder would translate the
address to a more abstract representation.

case addr
[...]
when "0101010" => enable_reg <= 99; -- the binary address doesn't have to
-- correspond with the actual index

[...]

end case;

-- this goes into a clocked process
reg[enable_reg] <= data;



Regards,
Marcus


Marcus Harnisch
  Reply With Quote
Old 01-19-2006, 08:10 PM   #3
Mike Treseler
 
Posts: n/a
Default Re: Separating control and data paths
crazyrdx wrote:
> I have read that simulation is much better if there is a clear
> separation of control and data paths in VHDL. Can someone give me an
> example code of this?


I agree with Marcus.
This is a style issue with little
or no effect on sim time or synthesis utilization.
If you feel the need to draw a schematic
and follow the data through it as an
ad hoc simulation of the design you might
prefer multiple processes for data and
control.

Example:
trace the data flow from Tx_v in this schematic:
http://home.comcast.net/~mike_treseler/uart.pdf

If you feel comfortable following data
identifiers through a text logic description
and checking operation from simulation
waveforms, then synthesis will draw
the schematic for you, no matter how
complicated the design is. In this
case, I find a single process design
easier to follow.

Example:
Find all occurrences of the identifier
Tx_v in this logic description:
http://home.comcast.net/~mike_treseler/uart.vhd
Check the Tx_v waveform here:
http://home.comcast.net/~mike_treseler/uart_sim.pdf
and find all occurrences of the value 0C in
all waveforms.


-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 01-22-2006, 06:35 PM   #4
crazyrdx
 
Posts: n/a
Default Re: Separating control and data paths
thanks for your replies.

So as I understand it, this is just about coding style. Wouldnt it mean
that the hardware result is much closer to what we expect if we did it
manually?(thats what i meant by better)?

RP



crazyrdx
  Reply With Quote
Old 01-23-2006, 07:06 AM   #5
Mike Treseler
 
Posts: n/a
Default Re: Separating control and data paths
crazyrdx wrote:
> thanks for your replies.
>
> So as I understand it, this is just about coding style. Wouldnt it mean
> that the hardware result is much closer to what we expect if we did it
> manually?(thats what i meant by better)?


No, the synthesis result would be the same for equivalent
descriptions with different styles.

_Better_ means whatever is easier
for you to understand and simulate.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom control dropdownlist - need advice tcstom Software 0 04-18-2008 11:28 AM
Error with ASP.NET Control Validators in Windows 2003 jogegoca Software 0 10-18-2006 10:47 PM
DIVX REBORN......THIS SUCKS... Joseph S. Powell, III DVD Video 12 06-07-2005 04:35 PM
Disney Treasures: Poor Quality Control. One-Shot Scot DVD Video 21 05-25-2004 04:12 AM
Re: 7. The truth about our creator. .7 john smith DVD Video 2 07-25-2003 03:54 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46