Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Basic VHDL question regarding pins

Reply
Thread Tools

Basic VHDL question regarding pins

 
 
googlinggoogler@hotmail.com
Guest
Posts: n/a
 
      07-07-2005
Hiya,

Ive just obtained a FPGA spartan 3 board off of ebay for real cheap and
am currently teaching myself VHDL, so far the language seems pretty
nice in terms on syntax, and i dont see any problems with it. However
there is one thing that I havent managed to grasp the concept of,
something so simple that you'll probably sit there giggling to
yourselves. I havent been able to find a definative answer in the
couple of books i scan read (yea yea yea, so i should read them
properly, and I will when i come to actually start work...)

anyway heres my question, in the below code (found on this group), they
define A and B - I would like to know that if theses are ports? not
pins, how would I just access an individual pin? or would I just review
the bits at the port kinda like A = 10101111 (if you see that i mean,
similar to in BASIC), Ive seen things like clk defined in the entity
section,

so my question I suppose is, is there a config file where all this is
defined? how do you know what is what?

cheers

David

<--code-->

library ieee;
use ieee.std_logic_1164.all;

entity InverterConnect is port(
A : in std_logic;
B : out std_logic);
end InverterConnect;

architecture InverterLogic of InverterConnect is
begin
B <= not A;
end;

</--code--/>

 
Reply With Quote
 
 
 
 
Eric Smith
Guest
Posts: n/a
 
      07-07-2005
writes:
> anyway heres my question, in the below code (found on this group), they
> define A and B - I would like to know that if theses are ports? not
> pins, how would I just access an individual pin?


You can attach the ports to FPGA pins using attributes or a user constraint
file (UCF). There's a constraint editor in the software that makes this
easy.

> or would I just review
> the bits at the port kinda like A = 10101111 (if you see that i mean,
> similar to in BASIC),


The ports in your example are only one bit each. If you want to deal
with multi-bit data, use std_logic_vector.

Best regards,
Eric
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
VHDL (Assigning pins in xilinx) amanpervaiz Hardware 3 12-02-2006 04:37 PM
VHDL design hierarchy, modules/componets and I/O pins Rafal Pietrak VHDL 10 03-09-2006 11:28 PM
Newbie Question: Using MaxIIplus how do you assign a bus to external pins. Don Golding VHDL 2 04-15-2004 06:49 PM
How to connect pins of different width? michele bergo VHDL 1 08-23-2003 07:55 PM



Advertisments