Pin numbers assignment

M

Merciadri Luca

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm using an entity `sorter', that I define using

==
entity sorter is
port(
CLK: in std_logic;
BTN_on: in std_logic;
LED_size: out std_logic;
);

attribute pin_numbers of sorter: entity is
"CLK:1 BTN_on:2 LED_size:14";

end sorter;
==

However, ispLEVER gives me `Reference to unknown attribute definition
pin_numbers'. What am I doing wrong?

Thanks.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --

If you fake it, you can't make it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkzlFiUACgkQM0LLzLt8MhzkfgCfZvxK09E4kSF2TmtZJ4OG/Vjc
LmEAn1/BfmjFjae2oE7UIqZPLmctfG/e
=4xSL
-----END PGP SIGNATURE-----
 
Joined
Sep 22, 2009
Messages
7
Reaction score
0
Example of ispLever pin assigments:

ENTITY Demo IS
PORT ( Rst : IN std_logic;
Clk : IN std_logic
);

ATTRIBUTE LOC : string;
ATTRIBUTE LOC OF Rst : SIGNAL IS "112";
ATTRIBUTE LOC OF Clk : SIGNAL IS "124";

END Demo;

The pin syntax may vary between ispLever and ispLever CLASSIC, for example "112" maybe "P112"
 
K

KJ

On Nov 18, 7:03 am, Merciadri Luca <[email protected]>
wrote:
attribute pin_numbers of sorter: entity is
"CLK:1 BTN_on:2 LED_size:14";
However, ispLEVER gives me `Reference to unknown attribute definition
pin_numbers'. What am I doing wrong?

Before you can use an attribute, first you must define what that
attribute is in the first place. The attribute 'pin_numbers' is not a
pre-defined VHDL language attribute, it is a user defined
attribute...so you as the user need to define it. In your case, the
following statement is needed prior to your use of the attribute
statement that you have above.

attribute pin_numbers: STRING;

It is also likely that there is some Lattice specific library that has
this attribute definition included that you could get access to with a
'use' statement.

use work.xxx.all; -- Where xxx is the name of the Lattice lib

Lastly, although you may have no intention of ever porting your design
to any other device, it is generally not a good idea to embed pin
definitions in the source code. If you DO end up moving to a
different device (maybe from QFP to BGA as an example, or a bigger
part) then those pin definitions in the source code are useless...and
in the way now because they are in the source code. Using attributes
is also tool dependent (if you move the code from say Lattice to
Altera, Xilinx, etc.) and the tools that you use will usually give you
an easier way to enter the pin info. Since you will need to archive
the synthesis tool files anyway there is no reason that the pin number
information can't be kept there also. You will likely have other
constraints archived there such as timing constraints so there is no
reason why pin number constraints can't be there also.

Think of it this way, the VHDL you write is intended to define a logic
description. A logic description does not inherently require any
specific technology implementation. So any design constraints that
are dependent on the underlying technology should generally be stored
with whatever tool it is that allows one to implement the logic
description in that technology. Use that as your criteria for
deciding whether or not to define a constraint in the VHDL source code
or elsewhere.

Kevin Jennings
 
D

dgreig

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm using an entity `sorter', that I define using

==
entity sorter is
port(
        CLK: in std_logic;
        BTN_on: in std_logic;
        LED_size: out std_logic;
);

attribute pin_numbers of sorter: entity is
"CLK:1 BTN_on:2 LED_size:14";

end sorter;
==

However, ispLEVER gives me `Reference to unknown attribute definition
pin_numbers'. What am I doing wrong?

Thanks.
- --
Merciadri Luca
Seehttp://www.student.montefiore.ulg.ac.be/~merciadri/
- --

If you fake it, you can't make it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkzlFiUACgkQM0LLzLt8MhzkfgCfZvxK09E4kSF2TmtZJ4OG/Vjc
LmEAn1/BfmjFjae2oE7UIqZPLmctfG/e
=4xSL
-----END PGP SIGNATURE-----

Try the predefined '93 "chip_pin".
The synthesis tool may or may not support it however.

I hate to admit knowing this one..

DG
 
M

Merciadri Luca

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

KJ said:
On Nov 18, 7:03 am, Merciadri Luca <[email protected]>
wrote:



Before you can use an attribute, first you must define what that
attribute is in the first place. The attribute 'pin_numbers' is not a
pre-defined VHDL language attribute, it is a user defined
attribute...so you as the user need to define it. In your case, the
following statement is needed prior to your use of the attribute
statement that you have above.

attribute pin_numbers: STRING;

It is also likely that there is some Lattice specific library that has
this attribute definition included that you could get access to with a
'use' statement.

use work.xxx.all; -- Where xxx is the name of the Lattice lib

Lastly, although you may have no intention of ever porting your design
to any other device, it is generally not a good idea to embed pin
definitions in the source code. If you DO end up moving to a
different device (maybe from QFP to BGA as an example, or a bigger
part) then those pin definitions in the source code are useless...and
in the way now because they are in the source code. Using attributes
is also tool dependent (if you move the code from say Lattice to
Altera, Xilinx, etc.) and the tools that you use will usually give you
an easier way to enter the pin info. Since you will need to archive
the synthesis tool files anyway there is no reason that the pin number
information can't be kept there also. You will likely have other
constraints archived there such as timing constraints so there is no
reason why pin number constraints can't be there also.

Think of it this way, the VHDL you write is intended to define a logic
description. A logic description does not inherently require any
specific technology implementation. So any design constraints that
are dependent on the underlying technology should generally be stored
with whatever tool it is that allows one to implement the logic
description in that technology. Use that as your criteria for
deciding whether or not to define a constraint in the VHDL source code
or elsewhere.
Thanks for your answers.

- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --

Give a man a fish and you feed him for a day; teach a man to fish
and you feed him for a lifetime.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkzmyx8ACgkQM0LLzLt8MhyMlQCfRN5kB/3wXgO+yt93aLVvLNas
R5UAn2Er2OSaljdy9iu0GvXP1El2RSKu
=igyf
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top