Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Assigning ( Attributing ) Pins to Variable

Below is a sample code, how can I assign each of the variables to a Pin ( Switch/LED )in the FPGA.

The Altera online help wasn't very clear.

What changes will need to be made to the Code?

Will assign the pins to variables in the 'Assignment Editor' post this.

-----

entity OR_ent is

port( x: in std_logic ;

y: in std_logic ;

F: out std_logic

);

end OR_ent;

architecture OR_arch of OR_ent is

begin

process(x, y)

begin

-- compare to truth table

if ((x='0') and (y='0')) then

F <= '0';

else

F <= '1';

end if;

end process;

end OR_arch;

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You'll assign physical pins to the in- and output ports, not variables. That can be done most easily in the pin planner tool.

    If you are working with a development kit, you can copy the pin assignment of the example projects.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    You'll assign physical pins to the in- and output ports, not variables. That can be done most easily in the pin planner tool.

    If you are working with a development kit, you can copy the pin assignment of the example projects.

    --- Quote End ---

    So, there is no need to change the code for it ?