Tristan Gingold | 9 Apr 2005 16:39
Picon
Favicon

Re: Why is that needed? ('image attribute usage)

On Fri, Apr 08, 2005 at 05:35:05PM -0300, Salvador Eduardo Tropea wrote:
> Hi!
> 
> I have the following function:
> 
>  Function ToStr(vec : in std_logic_vector) return string is
>    Variable ret : string(vec'length-1 downto 0);
>    Variable aux : string(2 downto 0);
>    Variable j   : integer:=vec'length-1;
>  Begin
>    For i in vec'range loop
>        aux:="" & std_logic'image(vec(i)); -- '0'
>        ret(j):=aux(1);
>        j:=j-1;
>    End Loop;
>    Return ret;
>  End;
> 
> If I use:
> 
> aux:=std_logic'image(vec(i));
> 
> the code behaves really bad, why? what's wrong?
You have found a GHDL bug.
It will be fixed in the new release.

Thanks.
Tristan.

(Continue reading)

Øyvind Harboe | 5 Apr 2005 09:38

Soft CPU emulation and GHDL

A question about GHDL from a software programmer:

It seems to me that a useful application of GHDL would be to
simulate/emulate soft-CPUs with cycle accuracy.

Basically, is it practical to do the following with GHDL?

- Run a small soft-CPU
- Emulate FPGA internal RAM 
- Write some C/C++ code that can print emulate simple hardware, e.g.
  UART output, LED's
- Add C/C++ code to create a JTAG->TCP/IP interface. This would allow
  connecting to the GHDL emulated soft-CPU using GDB TCP/IP remote
  protocol.

BTW, are the archives for ghdl-discuss available anywhere?

[The alternative approach is to translate the soft-CPU VHDL to a
document/specification and then translate the specification into a C/C++
program that emulates/simulates the soft CPU. The disadvantage of this
approach is that the simulator will constantly be out of sync with the
VHDL implementation]

--

-- 
Øyvind Harboe
http://www.zylin.com

Tristan Gingold | 5 Apr 2005 09:27
Picon
Favicon

Re: What happened to the --ieee ghdl flag?

On Mon, Apr 04, 2005 at 09:30:20PM -0500, Jim Hodapp wrote:
> I'm wondering what happened to the --ieee=synopsis or the 2 other
> options for this flag. It seems that the flag isn't in the latest
> version of ghdl, at least that I can tell. The ghdl --help doesn't
> mention anything about the flag either but the online manual for GHDL
> still references it. I need access to the IEEE library that synopsis
> uses to compile some VHDL code that I've inherited for a school project.
Hello,

This flag is still present,
try: ghdl -a --ieee=synopsys
Please, note your typo.

For the --help, try:
ghdl --help -a

Tristan.

Tristan Gingold | 15 Mar 2005 09:21
Picon
Favicon

Re: C to VHDL stimuli assignment

On Mon, Mar 14, 2005 at 02:38:13PM +0100,
federico.aglietti@... wrote:
> Dear all,
> how can I stimulate my VHDL top-level ports by a
> C program? 
> I tried the way explained in previous mails but I couldn't succeed,
> getting wrong values and program exit due to errors.
> 
> Could you please attach any kind of sample code?
There is no simple code to set top level ports externally, although this could
be done.
Why can't you do it in VHDL ?

Tristan.


Gmane