> On 24/02/2016, at 6:36 am, Thomas Sailer <sai...@sailer.dynip.lugs.ch> wrote:
> 
> Hi Tristan / List,
> 
> I'm having a few issues with e7adf19.
> 
> When compiling a design with mcode, I get:
> 
> error_emit: emit_insn: move/b2, insn= 184 (OE_MOVE)
> 
> Message: ortho_code-x86-emits.adb:146 explicit raise

This looks like a missing error handler for the mcode version.

> With gcc or llvm, I can compile the design, but when trying to run, I get:
> 
> ./xx
> (unknown signal)
> ./xx:error: several sources for unresolved signal
> ./xx:error: error during elaboration
> for signal:

This last is a run time message during execution of xx. It's telling you there 
are multiple drivers for a signal of an unresolved type:

entity foo is
end entity;

architecture fum of foo is
    signal a: bit;
begin
    a <= '0';
    a <= '1';
end architecture;


> How can I get further information which signal is causing this? The design 
> works in another commercial simulator, not that that means a lot standards 
> compliance wise...

This commercial simulator may not be standard compliant:

IEEE Std 1076-2008 6.4.2.3 Signal declarations paragraph 7:

A signal may have one or more sources. For a signal of a scalar type, each 
source is either a driver (see 14.7.2) or an out, inout, buffer, or linkage 
port of a component instance or of a block statement with which the signal is 
associated. For a signal of a composite type, each composite source is a 
collection of scalar sources, one for each scalar subelement of the signal. It 
is an error if, after the elaboration of a description, a signal has multiple 
sources and it is not a resolved signal. It is also an error if, after the 
elaboration of a description, a resolved signal has more sources than the 
number of elements in the index range of the type of the formal parameter of 
the resolution function associated with the resolved signal.

(Emphasis added. Alternatively see paragraph 9 of IEEE Std 1076-1993 4.3.1.2 
Signal declarations, it's identical except the sub clause reference).

With the llvm version there is no further information forthcoming:

 ghdl -r foo
a
./foo:error: several sources for unresolved signal
./foo:error: error during elaboration
for signal: .foo(fum).

(And a missing trailing newline as well as a missing signal name).

If you were to postulate the same cause for mcode and llvm versions there's 
something missing to output the signal name to standard_out.

In grt/grt-signals.adb:333:359:

procedure Check_New_Source (Sig : Ghdl_Signal_Ptr)
   is
      use Grt.Stdio;
      use Grt.Astdio;
   begin
      if Sig.S.Nbr_Drivers + Sig.Nbr_Ports > 0 then
         if Sig.S.Resolv = null then
            --  LRM 4.3.1.2 Signal Declaration
            --  It is an error if, after the elaboration of a description, a
            --  signal has multiple sources and it is not a resolved signal.
            if Sig.Rti /= null then
               Put ("for signal: ");
               Disp_Signals.Put_Signal_Name (stderr, Sig);
               New_Line (stderr);
            end if;
            Error ("several sources for unresolved signal");
         elsif Sig.S.Mode_Sig = Mode_Buffer and False then
            --  LRM 1.1.1.2  Ports
            --  A BUFFER port may have at most one source.

            --  FIXME: this is not true with VHDL-02.
            --  With VHDL-87/93, should also check that: any actual associated
            --  with a formal buffer port may have at most one source.
            Error ("buffer port which more than one source");
         end if;
      end if;
   end Check_New_Source;

It looks like a problem with the Disp_Signals.Put_Signal_Name call.


_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to