<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Ali's Notes &#187; vhdl</title>
	<atom:link href="http://aghoras.wordpress.com/category/vhdl/feed/" rel="self" type="application/rss+xml" />
	<link>http://aghoras.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 29 Dec 2009 22:27:44 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='aghoras.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/23b461566d1cebdf231c43cd84f743a5?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Ali's Notes &#187; vhdl</title>
		<link>http://aghoras.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://aghoras.wordpress.com/osd.xml" title="Ali&#8217;s Notes" />
		<item>
		<title>Thoughts on the use of BUFFER in VHDL</title>
		<link>http://aghoras.wordpress.com/2007/07/19/thoughts-on-the-use-of-buffer-in-vhdl/</link>
		<comments>http://aghoras.wordpress.com/2007/07/19/thoughts-on-the-use-of-buffer-in-vhdl/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 18:33:22 +0000</pubDate>
		<dc:creator>aghoras</dc:creator>
				<category><![CDATA[vhdl]]></category>

		<guid isPermaLink="false">http://aghoras.wordpress.com/2007/07/19/thoughts-on-the-use-of-buffer-in-vhdl/</guid>
		<description><![CDATA[ Simple rules
:   IN               : inputs
:   BUFFER : outputs that never are tri-stated
:   OUT           : tri-statable outputs (unidirectional)
:   INOUT    : [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aghoras.wordpress.com&blog=654975&post=17&subd=aghoras&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h1> Simple rules</h1>
<p>:   IN               : inputs<br />
:   BUFFER : outputs that never are tri-stated<br />
:   OUT           : tri-statable outputs (unidirectional)<br />
:   INOUT    : real bidirectional ports</p>
<h1> More elaborate set of rules</h1>
<p>VHDL&#8217;s features can help you if you let them.  Here is a set of rules which we arrived at empirically, and which really work for us:</p>
<p>1) Any net that logically has a single driver should be declared, at all module levels in the hierarchy, as std_ulogic or std_ulogic_vector and the port type at the module interfaces should be IN or BUFFER.</p>
<p>2) Any net that logically has multiple drivers should be declared, at all driving module levels in the hierarchy, as std_logic or std_logic_vector and the port type at the module interfaces should be OUT or INOUT.  If all of the drivers are limited to a single module (and perhaps its instantiated sub-modules), and the signal is to be exported from the module (toward the root of the hierarchy), then the signal should be cast/converted to a similarly-named std_ulogic or std_ulogic_vector and then exported through a BUFFER port.  This rule can be ignored where external considerations (such as testbench requirements) require that the driven signal be std_logic or std_logic_vector.</p>
<p>3) In general, IN ports should use std_ulogic or std_ulogic_vector.  This means that a cast/conversion from std_logic or std_logic_vector may be necessary in the instantiating hierarchy level.  This rule can be ignored where it makes more sense to do the cast/conversion within the module, such as at the level of the chip pads.</p>
<p>4) Within library cells, all 2-state outputs where both states are actively driven (the norm) should be declared as BUFFERs.  All 3-state outputs and single-ended outputs of library cells should be declared as OUTs.    Within a chip, these rules lead to heavy use of BUFFERs and std_ulogic / std_ulogic_vector for normal nets.  Tri-state nets and some nets with multiple single-ended drivers (fast carry logic and some dynamic logic come to mind) become the only internal std_logic / std_logic_vector nets.</p>
<p>Externally, the environment is not as well determined, and so external inputs to the chip can be declared either as std_logic or std_ulogic; this decision should be based on your standard project practice.  Declaring the external signals as std_logic means that the inputs will need a conversion/cast at the point of logical pad-cell instantiation; declaring the external signals as std_ulogic is more consistent with the internal practice, facilitating reuse of the design as a macro, but may require cast/conversion in the testbench or board level of the hierarchy.</p>
<p>Many may disagree with these rules; no problem <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .  But these rules do use the capabilities of VHDL for maximal early error detection &#8212; each std_ulogic net must have EXACTLY one driver.  Also, in general the number of extra signals required for std_logic nets which have dual std_ulogic nets [because of the conversion/casts of (2) and (3)] will be less than the number of extra signals that will be required to provide output values within a module declared with OUTs.  It took us quite a while to evolve this set of rules; they do work well.</p>
<p>Tom Phinney</p>
<p>Honeywell Inc.</p>
<p>Industrial Automation and Control</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aghoras.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aghoras.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aghoras.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aghoras.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aghoras.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aghoras.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aghoras.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aghoras.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aghoras.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aghoras.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aghoras.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aghoras.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aghoras.wordpress.com&blog=654975&post=17&subd=aghoras&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aghoras.wordpress.com/2007/07/19/thoughts-on-the-use-of-buffer-in-vhdl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc764b06007585fa6fe4e6c6b7aac104?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aghoras</media:title>
		</media:content>
	</item>
		<item>
		<title>Sizing unsigned to bit vectors</title>
		<link>http://aghoras.wordpress.com/2007/05/10/sizing-unsigned-to-bit-vectors/</link>
		<comments>http://aghoras.wordpress.com/2007/05/10/sizing-unsigned-to-bit-vectors/#comments</comments>
		<pubDate>Thu, 10 May 2007 18:38:14 +0000</pubDate>
		<dc:creator>aghoras</dc:creator>
				<category><![CDATA[vhdl]]></category>

		<guid isPermaLink="false">http://aghoras.wordpress.com/2007/05/10/sizing-unsigned-to-bit-vectors/</guid>
		<description><![CDATA[To size a number and store it in a std_logic_vector use the following:
assuming:
signal DataOut     : std_logic_vector(0 to 31) ;
use:
DataOut     &#60;= std_logic_vector(to_unsigned(0,DataOut'length));
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aghoras.wordpress.com&blog=654975&post=5&subd=aghoras&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To size a number and store it in a std_logic_vector use the following:</p>
<p>assuming:</p>
<p><code>signal DataOut     : std_logic_vector(0 to 31) ;</code></p>
<p>use:</p>
<p><code>DataOut     &lt;= std_logic_vector(to_unsigned(0,DataOut'length));</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aghoras.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aghoras.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aghoras.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aghoras.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aghoras.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aghoras.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aghoras.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aghoras.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aghoras.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aghoras.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aghoras.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aghoras.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aghoras.wordpress.com&blog=654975&post=5&subd=aghoras&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aghoras.wordpress.com/2007/05/10/sizing-unsigned-to-bit-vectors/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cc764b06007585fa6fe4e6c6b7aac104?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">aghoras</media:title>
		</media:content>
	</item>
	</channel>
</rss>