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

Reply

VHDL - Standard library packages for bit and strings?

 
Thread Tools Search this Thread
Old 05-18-2009, 10:45 AM   #1
Default Standard library packages for bit and strings?


I have used VHDL for many years now.
I believe I have a good overview over existing packages.

I think two essential packages are missing:

I will call them BIT_LOGIC and STRING.

Can anyone explain why they have not been made long ago?

STRING (simulation only)
The standard TEXTIO is very primite and simple string functions that can
convert any signal type to a string for write to std_out are missing.
I have made my own and could not do any serious testbench and simulation
work without it. But I simply do not understand why the VHDL committee
has not made a standard lib.
I would propose something like the printf functions in C.
I know it is very easy to do, when you have tryed it ones, but it is a
large step for beginners and it is a vaste or resources that we all do it.
You can get my simple lib for a start, but is very primitive compared to
the printf statement. Anyone with a SW+VHDL background got do it better
than me within a very short time.

So why use bit when we have std_logic, this may be the reason.
First properly implement bit functions should be faster to simulate than
std_logic bacause they only have 2 values compare to 9.
Okay computers are fast and this is not the major reason for slow
simulation on big designs.
But second when designs logic without any tristate function like
internal signals in FPGA and must ASIC I find it much more logical to
use bits.

BIT_LOGIC
Originally VHDL was made without packages for synthesis because it was
made for simulation only. Later when synopsis started to support
synthesis and made the synopsys packages that support std_logic but to
day I would recommend these and only use VHDL standard libs: numeric_std
and numeric_bit. However no libs support a number of functions for bits
that exits in std_logic_1164; E.g:

function "not" (1:bit) return bit;
function "and" (1,r:bit) return bit;
etc

numeric_std defines logic for unsigned and even the rising_edge(clk) but
I miss the logic functions for bit and bit_vector when you do not need
or want to see them as numeric.



Peter Soerensen
  Reply With Quote
Old 05-19-2009, 01:04 PM   #2
Dal
 
Posts: n/a
Default Re: Standard library packages for bit and strings?
See link below for some C type functions.

http://bear.ces.cwru.edu/VHDL/index.html

Also see this thread that discusses some issues I found with the
packages.

http://groups.google.com/group/comp....a9dbaded3bbbcd


Dal
  Reply With Quote
Old 05-19-2009, 05:00 PM   #3
philippe.faes@gmail.com
 
Posts: n/a
Default Re: Standard library packages for bit and strings?
On May 18, 3:08 pm, Alan Fitch <alan.fi...@spamtrap.com> wrote:
> Also the company Easics used to have a package PCK_FIO which emulated
> some printf-like behaviour.
>

This package can be found at:
http://www.easics.com/webtools/freesics

--
Philippe Faes
http://www.sigasi.com


philippe.faes@gmail.com
  Reply With Quote
Old 05-27-2009, 10:15 PM   #4
Peter Soerensen
 
Posts: n/a
Default Re: Standard library packages for bit and strings?
wrote:
> On May 18, 3:08 pm, Alan Fitch <alan.fi...@spamtrap.com> wrote:
>> Also the company Easics used to have a package PCK_FIO which emulated
>> some printf-like behaviour.
>>

> This package can be found at:
> http://www.easics.com/webtools/freesics
>
> --
> Philippe Faes
> http://www.sigasi.com


Thank you Philippe and everyone else for your inputs.

best regards
Peter Sørensen


Peter Soerensen
  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




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