I'm experiencing an error using XST during synthesis involving a type
conversion on a port instance:
http://www.xilinx.com/xlnx/xil_ans_display.jsp?iLanguageID=1&iCountryID=1&getPagePath=18188
Is this legal syntax in the vhdl standard?
I was told by a Xilinx applications engineer that they don't have a fix
and I have to do the workaround. What a pain... Do the other synthesis
tools support this syntax?
|
|
0
|
|
|
|
Reply
|
killerhertz (84)
|
8/3/2005 12:59:31 PM |
|
On 3 Aug 2005 05:59:31 -0700, "Brandon" <killerhertz@gmail.com> wrote:
>I'm experiencing an error using XST during synthesis involving a type
>conversion on a port instance:
>http://www.xilinx.com/xlnx/xil_ans_display.jsp?iLanguageID=1&iCountryID=1&getPagePath=18188
>
>Is this legal syntax in the vhdl standard?
Yes. There was a change from VHDL-87 to VHDL-93 that fixed a
silly inconsistency: VHDL-87 didn't accept array type conversions
on a port map, so for example if you have a std_logic_vector signal S
and you want to connect it to an "unsigned" input port P:
.... port map (... P => unsigned(S) ...)
is legal in VHDL-93 but was forbidden in '87.
>I was told by a Xilinx applications engineer that they don't have a fix
>and I have to do the workaround. What a pain... Do the other synthesis
>tools support this syntax?
Mostly, yes.
The workaround is hardly a big deal, though. Just tedious.
It may be cleaner to do the workaround by building a wrapper
entity, so that you can hide the type conversion and its
associated extra signal in the wrapper rather than exposing
it in the upper-level entity.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services
Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
|
|
0
|
|
|
|
Reply
|
Jonathan
|
8/4/2005 1:23:04 PM
|
|
Actually, this syntax was ok:
port map (... P => unsigned(S) ...)
While this was not:
port map (... unsigned(A) => B ...)
I don't understand why they haven't fixed this... Is there any sort of
option to toggle VHDL-93 syntax? I can't find any mention of it in the
XST user guide...
If you don't mind, could you explain the wrapper workaround? I made the
changes manually myself, but that involved creating a duplicate signal
to perform the type conversion on. This is quite sloppy imo, and I
dislike having to tailor my code to a specific tool.
Thanks a bunch.
|
|
0
|
|
|
|
Reply
|
Brandon
|
8/4/2005 8:17:10 PM
|
|
On 4 Aug 2005 13:17:10 -0700, "Brandon" <killerhertz@gmail.com> wrote:
>Actually, this syntax was ok:
>port map (... P => unsigned(S) ...)
>
>While this was not:
>port map (... unsigned(A) => B ...)
ok - both versions should be absolutely fine, assuming
A is an output port of course. Both forms were made
legal in VHDL-93 (in VHDL-87 it would have been necessary
to write your own function, something like "my_unsigned",
so that the conversion is a function call rather than an
array type conversion)
>I don't understand why they haven't fixed this...
Not enough people shouting about it, I guess.
> Is there any sort of
>option to toggle VHDL-93 syntax?
You must have VHDL-93 enabled already, otherwise the input-port
conversion would also have been illegal.
>If you don't mind, could you explain the wrapper workaround? I made the
>changes manually myself, but that involved creating a duplicate signal
>to perform the type conversion on. This is quite sloppy imo, and I
>dislike having to tailor my code to a specific tool.
Well... the code you end up with will work in any tool OK, it's
just that it is tiresome to do. I wasn't suggesting anything
different - just another layer of module instantiation so that
the conversion is not visible in the top-level module:
entity Original is
port (P: in unsigned(...); Q: out std_logic_vector(...));
end;
entity Wrapper is
port (P: in std_logic_vector(...); Q: out unsigned(...));
end;
architecture Hack of Wrapper is
signal QU: unsigned(...);
begin
Original_Instance: entity work.Original(arch)
port map (P => unsigned(P), Q => QU);
Q <= std_logic_vector(QU);
end;
Now, when you instantiate Wrapper in your top-level module,
no type conversion is needed. I'm sure this is exactly
what you have already done - I'm merely suggesting the
wrapper module as a way of localising the type conversion
so that it doesn't pollute the architecture of the
enclosing module.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services
Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
|
|
0
|
|
|
|
Reply
|
Jonathan
|
8/5/2005 8:23:04 AM
|
|
Actually I did use functions to perform the conversion. For some reason
it only complained when the function call was on the left hand side of
the port map.
Thanks for the help.
|
|
0
|
|
|
|
Reply
|
Brandon
|
8/5/2005 6:33:17 PM
|
|
|
4 Replies
94 Views
(page loaded in 0.11 seconds)
Similiar Articles: Lambda and cast to pointer to void - comp.lang.c++This conversion is implicit. > // 3) is it then legal (and most ... In your example you use C ... 2/6): "The closure type for a lambda ... does not permit conversion of ... VHDL-2002 vs VHDL-93 vs VHDL-87? - comp.lang.vhdlAmbiguous homographs are now legal due to generic ... attribute that is one of 'SIMPLE_NAME, 'INSTANCE_NAME ... A type conversion whose type mark denotes a globally static ... How to port 32 bit unsigned char* to 64 bit - comp.lang.c++ ...... loss of data Without knowing the actual type of ... unsigned char* to an unsigned char const* (a legal conversion ... assembly question - comp.lang.asm.x86 But we can port ... Why no std::back_insert_iterator::value_type? - comp.lang.c++ ...For example it is quite easy to write one ostream ... >From "5.2.3 Explicit type conversion (functional notation ... the cases where the "castless" statement is legal. comp.soft-sys.matlab - page 73... to print out a casual text on buttondown, for example i ... second order differential equation system of type ... How to use Serial Port(RS232 Function) on matlab ... How to create an efficient two dimensional VHDL arrays table ...... std_logic_1164.all; entity NewLUT is port ... 5f4abd6b792= 578ea For an sRGB<-->RGB conversion lookup table example ... or 'unsigned' version of the effective type ... Automating Acrobat PDF to JPG conversion via COM ? - comp.text.pdf ...An example of the simplicity of the use of Netpbm (from ... I meant to type "(or Reader)". I expected you might ... There is a .NET port but I have not been able to get it ... unicode display of common characters - comp.emacsThe text I used as the example in my original message ... browser and copy-and-paste to translate this to legal ... solid block seems to appear when you type a character ... Integer class error - comp.lang.ruby... 3D > VarBind.new(oid.to_s+'.'+result.reset_port.to_s ... some standard Verilog function to do >this, for example ... The Integer class wraps a value of the primitive type ... Bad use of stringstream temporary? - comp.lang.c++... is whether the following line of code is legal and ... is what happens: - array-to-pointer standard conversion ... wrap a stringstream object in a custom class type ... Type conversion - Wikipedia, the free encyclopediaIn computer science, type conversion, typecasting, and coercion are different ... needed at runtime so that the program will run correctly. For example, the following is legal ... Online Conversion - Convert just about anything to anything elseOnline Conversion is a resource for weights, measures, calculators, converters. 7/13/2012 9:12:43 PM
|